- Posts: 12
- Thank you received: 0
×
CodeTyphon Cross-Build Development, discussions and problems
Question Cross-compile linker error
- Francesco Salvi
- Topic Author
- Away
- New Member
-
Less
More
2 weeks 2 days ago #15430
by Francesco Salvi
Cross-compile linker error was created by Francesco Salvi
Hello, happy new year to all and stay healthy!
I've got a problem with the linker during a cross-compilation from Win64 to ARM32 on Linux (Raspberry PI2 and PI3 too).
Explanation: after having succesfully compiled all the units of my customer's project (which I can't disclose),
the linker gives the following error:
c:\codetyphon\fpc\fpc32\bin\i386-win32\arm-linux-ld.exe: C:\codetyphon\binLibraries\arm-linux-Raspbian2\crtbegin.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
C:\codetyphon\binLibraries\arm-linux-Raspbian2\crtbegin.o: error adding symbols: Bad value
screensimulatorraspberrypi2.ppr(27,0) Error: Error while linking
When linking for Win32 or Win64, all goes ok.
After searching info about the -fPIC option, I've found the following info "add --enable-shared at ./configure options".
This info is on page stackoverflow.com/questions/13812185/how-to-recompile-with-fpic
but unfortunately I don't know how to configure it.
Please tell me what menu to open and what setting to look for.
Sorry for wasting your time: please just point me in the right direction.
Thanks, Francesco.
I've got a problem with the linker during a cross-compilation from Win64 to ARM32 on Linux (Raspberry PI2 and PI3 too).
Explanation: after having succesfully compiled all the units of my customer's project (which I can't disclose),
the linker gives the following error:
c:\codetyphon\fpc\fpc32\bin\i386-win32\arm-linux-ld.exe: C:\codetyphon\binLibraries\arm-linux-Raspbian2\crtbegin.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
C:\codetyphon\binLibraries\arm-linux-Raspbian2\crtbegin.o: error adding symbols: Bad value
screensimulatorraspberrypi2.ppr(27,0) Error: Error while linking
When linking for Win32 or Win64, all goes ok.
After searching info about the -fPIC option, I've found the following info "add --enable-shared at ./configure options".
This info is on page stackoverflow.com/questions/13812185/how-to-recompile-with-fpic
but unfortunately I don't know how to configure it.
Please tell me what menu to open and what setting to look for.
Sorry for wasting your time: please just point me in the right direction.
Thanks, Francesco.
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
1 week 6 days ago #15439
by Sternas Stefanos
PilotLogic Architect and Core Programmer
Replied by Sternas Stefanos on topic Cross-compile linker error
Thanks Sir
I think is a load Library problem.
Please check your external libraries your program use
I think is a load Library problem.
Please check your external libraries your program use
PilotLogic Architect and Core Programmer
Please Log in or Create an account to join the conversation.
- Francesco Salvi
- Topic Author
- Away
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
1 week 5 days ago #15440
by Francesco Salvi
Replied by Francesco Salvi on topic Cross-compile linker error
Thanks, unfortunately my code contains only dynamically loaded DLL and not any statically-linked DLL, so I am sure that some third party library or component causes the error. Will try to erase almost all working code, leaving just "empty" units and then remove the uses, one by one, until the error disappears. This check will require some time to complete.
Question: does any setting affect the linker optimization during this phase, kind of a "automatically skip unused libraries while linking"?
Question: does any setting affect the linker optimization during this phase, kind of a "automatically skip unused libraries while linking"?
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
1 week 5 days ago #15441
by Sternas Stefanos
PilotLogic Architect and Core Programmer
Replied by Sternas Stefanos on topic Cross-compile linker error
No
in cross-build way these "tricks" are very limited.
My suggestion is to try CT and your App to a real PI4,
CT works OK, to Arm32 and Arm64 Raspberry Pi OS.
in cross-build way these "tricks" are very limited.
My suggestion is to try CT and your App to a real PI4,
CT works OK, to Arm32 and Arm64 Raspberry Pi OS.
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Francesco Salvi
Please Log in or Create an account to join the conversation.
- Francesco Salvi
- Topic Author
- Away
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
1 week 5 days ago #15443
by Francesco Salvi
Replied by Francesco Salvi on topic Cross-compile linker error
Thanks for the clue: will try and give feedback later this week.
Please Log in or Create an account to join the conversation.
- Francesco Salvi
- Topic Author
- Away
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
1 week 3 days ago #15447
by Francesco Salvi
Replied by Francesco Salvi on topic Cross-compile linker error
I don't have a real PI4 at the moment: will try tomorrow on an Odroid xu4, Armbian, CPU Cortex-A7 (32 bit), but will have to install CT for this task only ...
Please Log in or Create an account to join the conversation.
- Francesco Salvi
- Topic Author
- Away
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
1 day 8 hours ago #15481
by Francesco Salvi
Replied by Francesco Salvi on topic Cross-compile linker error
Success!
It took some days for setting up the whole environment.Success! See attached picture for details.
It took some days for setting up the whole environment.Success! See attached picture for details.
Please Log in or Create an account to join the conversation.
- Matis A.
-
- Away
- Moderator
-
1 day 6 hours ago - 1 day 6 hours ago #15482
by Matis A.
PilotLogic Core Programmer
Replied by Matis A. on topic Cross-compile linker error
Thanks
CT ver 7.30 is our suggestion.
PS: please, your arm board ?
CT ver 7.30 is our suggestion.
PS: please, your arm board ?
PilotLogic Core Programmer
Last edit: 1 day 6 hours ago by Matis A..
Please Log in or Create an account to join the conversation.
- Francesco Salvi
- Topic Author
- Away
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
1 day 4 hours ago #15483
by Francesco Salvi
Replied by Francesco Salvi on topic Cross-compile linker error
Odroid xu4, Armbian, CPU Cortex-A7 (32 bit)
Please Log in or Create an account to join the conversation.
- Matis A.
-
- Away
- Moderator
-