Re: Is MUSL library compatible with your GLIBC?

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

 



On Mon, 2023-11-13 at 10:24 +0000, Dingjun Chen wrote:
> Hi, guys,
> 
> You are experts in glibc libraries, and I need your help. As mentioned
> before I have cross gcc/g++ compilers:
> 'i686-linux-musl-gcc.exe'
> 'i686-linux-musl-g++.exe'
> 
> They were built by crosstool-NG 1.26.0 on X86_64 host machine with gcc
> 13.2 under Cygwin and target machine i686 with Linux kernel 2.4.36.9
> and MUSL.
> 
> I applied this cross compiler to build our C++ application codes.
> There is no problem with compilation, but there is a problem with
> linker 'ld'. Please see below and for more details please see the
> attached text file :
> 
> ........................................................
> ......................................................
> <built-in>: note: this is the location of the previous definition
> [100%] Linking CXX executable
> /home/Dingjun.Chen/DAQ_XYZCross2_cmake_v5/bin/vtem_xyz
> /home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-
> musl/bin/../lib/gcc/i686-linux-musl/13.2.0/../../../../i686-linux-
> musl/bin/ld: warning: libm.so.6, needed by
> /home/Dingjun.Chen/DAQ_XYZCross2_cmake_v5/lib/libvga.so, not found
> (try using -rpath or -rpath-link)
> /home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-
> musl/bin/../lib/gcc/i686-linux-musl/13.2.0/../../../../i686-linux-
> musl/bin/ld: warning: libc.so.6, needed by
> /home/Dingjun.Chen/DAQ_XYZCross2_cmake_v5/lib/libvga.so, not found
> (try using -rpath or -rpath-link)

/* snip */

No.  Glibc is not "our" project, GCC and Glibc are two separate
projects.

Generally you cannot link an executable using a libc to a library using
another libc.  This is not only limited to Glibc vs. Musl.  For some
examples:

If libfoo.so is built with Glibc-2.38 but then you want to link an
executable with libfoo.so and libc.so from Glibc-2.36, the link may
fail.

On Windows if an executable and a dll required by the executable uses
different versions of msvcrt, the program will likely just crash at
runtime.

-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux