[fpc-pascal] Linking Problems while cross compiling for arm
Dariusz Mazur
darekm at emadar.com
Tue Dec 8 23:25:21 CET 2009
Jonas Maebe pisze:
>
> On 08 Dec 2009, at 15:06, Dariusz Mazur wrote:
>
>> Hartmut Eilers pisze:
>>
>>> DeviceServer.pas(609,2) Error: Error while linking
>>> DeviceServer.pas(609,2) Fatal: There were 1 errors compiling module,
>>> stopping
>>> Fatal: Compilation aborted
>>>
>>> ubuntu at kubuntu904:~/OpenLabTools/DeviceServer$ ls
>>> /usr/local/xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/lib
>>> ldscripts libgomp.a libmudflap.la
>>> libnsl.so.0 libssp_nonshared.la libsupc++.a
>>> ld-uClibc-0.9.30.so libgomp.la libmudflap.so
>>> libpthread-0.9.30.so libssp.so libsupc++.la
>>> ld-uClibc.so.0 libgomp.so libmudflap.so.0
>>> libpthread.so.0 libssp.so.0 libthread_db-0.9.30.so
>>> libcrypt-0.9.30.so libgomp.so.1 libmudflap.so.0.0.0
>>> libresolv-0.9.30.so libssp.so.0.0.0 libthread_db.so.1
>>> libcrypt.so.0 libgomp.so.1.0.0 libmudflapth.a
>>> libresolv.so.0 libstdc++.a libuClibc-0.9.30.so
>>> libc.so.0 libgomp.spec libmudflapth.la
>>> librt-0.9.30.so libstdc++.la libutil-0.9.30.so
>>> libdl-0.9.30.so libiberty.a libmudflapth.so
>>> librt.so.0 libstdc++_pic.a libutil.so.0
>>> libdl.so.0 libm-0.9.30.so libmudflapth.so.0 libssp.a
>>>
>> add softlink libdl.so to libdl.so.0
>
> I have purposely not suggested this because this will either
> a) result in other problems
> b) work until the next library for which no .so link is missing is
> required (most of the above libraries don't have a .so link).
>
> That's why I suggested to look into the way the cross-compilation
> toolkit was installed, because the above setup is almost certainly
> intended for installation on the actual device, rather than for a
> compilation environment (in which case who know how many more things
> are missing, and we can keep mailing forever in this thread for no
> good reason).
>
Yes, You have right
I download mentioned toolchain and try to compile simple program
as i notice libdl.so exists, but in other path ( its /sys-root/usr/lib)
I combine several directives and at last linker pass through first phase
-XP../xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/bin/
-XR.../xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/
-Fl.../xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/sys-root/usr/lib
no others Xr, k,
I also not modify $PATH
By the way:
when XR path is set then XP should be default, but its not
FPC search arm-linux-as
maybe better search also "as" in <XR path>/bin/as
--
Darek
More information about the fpc-pascal
mailing list