[fpc-pascal] CThreads problem when cross-compiling to ARM/RPi.

Bruce Tulloch pascal at causal.com
Thu May 23 14:35:47 CEST 2013


Just noticed another INPUT statement also refers to dl as:

/usr/local/lib/fpc/2.7.1/units/arm-linux/rtl/dl.o

This appears ahead of the -ldl statement.

Could this be the problem? -b





On Thu, May 23, 2013 at 10:32 PM, Bruce Tulloch <pascal at causal.com> wrote:

> Yes, it's in the search path as:
>
> root at beria:/lib/arm-linux-gnueabihf# ls -l libdl*
> -rw-r--r-- 1 root root 9812 Feb 23 00:37 libdl-2.13.so
> lrwxrwxrwx 1 root root   13 Feb 23 00:37 libdl.so.2 -> libdl-2.13.so
>
> It's referred to in an INPUT statement in link.res as:
>
> INPUT(
> -lpthread
> -ldl
> )
>
> and there are two search statements:
>
>
> SEARCH_DIR("/usr/local/opt/chroot/raspbian/rootfs/usr/lib/arm-linux-gnueabihf/")
>
> SEARCH_DIR("/usr/local/opt/chroot/raspbian/rootfs/lib/arm-linux-gnueabihf/")
>
> at the top of the file which suggest it should be found okay.
>
>
>
> On Thu, May 23, 2013 at 10:28 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>wrote:
>
>>
>> On 23 May 2013, at 14:25, Bruce Tulloch wrote:
>>
>>  On Thu, May 23, 2013 at 10:18 PM, Jonas Maebe <jonas.maebe at elis.ugent.be
>>> >**wrote:
>>>
>>>  On 23 May 2013, at 14:10, Bruce Tulloch wrote:
>>>>
>>>>  Linking arm-test-threads
>>>>> /usr/local/lib/fpc/2.7.1/
>>>>> units/arm-linux/rtl/cthreads.****o: In function
>>>>> `CTHREADS_$$_LOADPTHREADS$$****BOOLEAN':
>>>>> cthreads.pp:(.text.n_cthreads_****$$_loadpthreads$$boolean+**0xc):
>>>>> warning:
>>>>>
>>>>> Using
>>>>> 'dlopen' in statically linked applications requires at runtime the
>>>>> shared
>>>>> libraries from the glibc version used for linking
>>>>>
>>>>>
>>>> Why/how are you trying to create a statically linked binary? As the
>>>> message above explains, statically linking libdl relies on a bunch of
>>>> library magic. At the very least you'll probably also have to link libc
>>>> explicitly, but I would really recommend to link dynamically instead.
>>>> Support for binaries statically linked against C libraries is generally
>>>> very much untested, and known not to work on certain platforms (e.g.
>>>> Linux/x86-64).
>>>>
>>>>  Okay, so I'm not trying to link statically, not intentionally anyway.
>>>
>>
>> Do you have a libdl.so in your library search path? And what kind of
>> reference to libdl does link.res contain?
>>
>>
>>
>> Jonas
>> ______________________________**_________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
>> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130523/a302b5ee/attachment.html>


More information about the fpc-pascal mailing list