help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (dynamic-link "libm") doesn't work on guile


From: Alex Vong
Subject: Re: (dynamic-link "libm") doesn't work on guile
Date: Sat, 09 Jan 2016 22:08:13 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Alex Vong <address@hidden> skribis:
>
>> I think it is weird. It seems only dynamic linking with "libc" or "libm"
>> fails, dynamic linking with external library like "libpcre2-8" or
>> anyhome-made shared library would work. And yes, "libc-2.22" and
>> "libm-2.22" also works for me.
>
> I think that’s because libm.so and libc.so are linker scripts, whereas
> libm-2.22.so and libc-2.22.so are the actual ELF files:
>
> $ cat ~/.guix-profile/lib/libm.so
> /* GNU ld script
> */
> OUTPUT_FORMAT(elf64-x86-64)
> GROUP ( /gnu/store/qv7bk62c22ms9i11dhfl71hnivyc82k2-glibc-2.22/lib/libm.so.6  
> AS_NEEDED ( 
> /gnu/store/qv7bk62c22ms9i11dhfl71hnivyc82k2-glibc-2.22/lib/libmvec.so.1 ) )
> $ cat ~/.guix-profile/lib/libc.so
> /* GNU ld script
>    Use the shared library, but some functions are only in
>    the static library, so try that secondarily.  */
> OUTPUT_FORMAT(elf64-x86-64)
> GROUP ( /gnu/store/qv7bk62c22ms9i11dhfl71hnivyc82k2-glibc-2.22/lib/libc.so.6 
> /gnu/store/qv7bk62c22ms9i11dhfl71hnivyc82k2-glibc-2.22/lib/libc_nonshared.a  
> AS_NEEDED ( 
> /gnu/store/qv7bk62c22ms9i11dhfl71hnivyc82k2-glibc-2.22/lib/ld-linux-x86-64.so.2
>  ) )
>
I think you are right, libm.so is a binary file in Debian, while it is a
linker script in guix. That's why it is not working.

To understand the problem, I find this thread on the glibc mailing list
<https://sourceware.org/ml/libc-alpha/2011-07/msg00139.html>,
where the developer said ``no one is saying that dlopening the C library
is wrong, but we are saying that dlopening "libc.so" instead of
"libc.so.6" is wrong.``.

Is there way to specify an ABI version (I suppose 6 is the ABI version
since we have libm.so.6) when dlopening a shared library to avoid this
glitch?

> Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]