[fpc-pascal] Re: problem linking when using "cthreads" when cross-compiling for arm

Seth Grover sethdgrover at gmail.com
Mon May 24 22:54:39 CEST 2010


Marco said:

>
> (btw:
>  -XP should be followed by the prefix, not the path. IOW if you do
>  -XParm-linux- then you wouldn't need those symlinks.
>
> The makefile name of this is BINUTILSPREFIX
> )

Thank you, I have adjusted my setup accordingly.

>
> The problem is that libdl misses functions that it should have. A list of
> symbols link libdl.a (nm -a ) might help.
>
> I suspect the target simply doesn't support dynloading of libraries.

Thank you for pointing me in the right direction! I have found the
solution. Originally, on my device I had installed the "libc6-dev"
package because it contained various object files (crti.o, for
example) that FPC needed to link. After I copied the contents of
/usr/lib and /lib to my cross-compile build VM, I removed the package
from my device to conserve disk space.

The file "libdl.a" was included in this libc6-dev package, so I had
copied it over to my build vm. However, on a whim I moved the file
into the trash and tried compiling again. The compiler complained
about not being able to find libdl, so I put a symlink for libdl.so.2
as libdl.so and then it compiled fine, and ran correctly as well once
I copied it to the target device. So apparently having that libdl.a
around was confusing things.

Thanks again for your help.

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover
sethdgrover[at]gmail[dot]com



More information about the fpc-pascal mailing list