undefined references to `__libc_csu_fini/init when copying glibc files to /usr/lib32
Florian Weimer
fweimer@redhat.com
Tue May 30 06:38:57 GMT 2023
* alexandre schenberg via Libc-help:
> I then did a test, tried to compile the test program passing the dir where libc_nonshared.a is located with:
>
> g++ -m32 -o test-32bit test-32bit.cpp -L/media/34GB/Arquivos-de-Programas-Linux-32bit/Glibc-2.17/usr/lib/
>
> and it returned:
>
> /usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
> /usr/bin/ld: cannot find /lib/libc.so.6
> collect2: error: ld returned 1 exit status
You need to create a complete sysroot with all the startup files. Using
-L is not enough. You should use one of the ready-made cross-tools
scripts.
Without a proper sysroot, something like this will be required:
Building with completely new files
<https://sourceware.org/glibc/wiki/Testing/Builds#Build100PctNew>
Thanks,
Florian
More information about the Libc-help
mailing list