ELDK gcc linker error in ld.so.1

I have ELDK-3.1 installed in an Ubuntu box, it works fine.

On another machine running 64 bits of OpenSuse 12.1, I cloned the ELDK installation and worked very well for some time.

Now when I try to set up my projects, I see:

configure: error: C compiler cannot create executables See `config.log' for more details 

And the magazine shows:

 configure:3411: ppc-linux-gcc conftest.c >&5 /opt/ELDK-3.1/usr/bin/../lib/gcc-lib/ppc-linux/3.3.3/../../../../ppc-linux/bin/ld: warning: ld.so.1, needed by /opt/ELDK-3.1//usr/../ppc_8xx/lib/libc.so.6, not found (try using -rpath or -rpath-link) /opt/ELDK-3.1//usr/../ppc_8xx/lib/libc.so.6: undefined reference to ` _dl_lookup_versioned_symbol_skip@GLIBC _PRIVATE' ... 

The ld.so.1 file is in the same directory as libc.so.6 .

 s -l /opt/ELDK-3.1//usr/../ppc_8xx/lib/ld.so.1 lrwxrwxrwx 1 root root 11 Jan 31 11:43 /opt/ELDK-3.1//usr/../ppc_8xx/lib/ld.so.1 -> ld-2.3.1.so 

As far as I can tell, I correctly define all the necessary environment and try to build using the same build system as in the Ubuntu field (project β€œautomatic”).

So, I wrote a script, trying to imitate everything that my automaked configure does:

 #!/bin/bash if [ ! -f confdefs.c ]; then cat > confdefs.c << EOF /* confdefs.h */ #define PACKAGE_NAME "xyz" #define PACKAGE_TARNAME "xyz" #define PACKAGE_VERSION "1.00" #define PACKAGE_STRING "xyz 1.00" #define PACKAGE_BUGREPORT "< contact@company >" #define PACKAGE_URL "" #define PACKAGE "xyz" #define VERSION "1.00" /* end confdefs.h. */ int main () { ; return 0; } EOF fi ARCH=powerpc export CROSS_COMPILE=ppc_8xx TOOLCHAIN=ppc-linux- TOOLCHAIN_ROOT=/opt/ELDK LD=`which ${TOOLCHAIN}ld` CC=`which ${TOOLCHAIN}gcc` GCC=$CC export CFLAGS="-Wall -g -I${TOOLCHAIN_ROOT}/ppc_8xx/usr/include/" export CPPFLAGS=$CFLAGS # export LDFLAGS="-shared" $CC $CFLAGS $LDFLAGS confdefs.c -o confdefs 

This gives me the same error as configure .

If I uncomment the line export LDFLAGS="-shared" , on the other hand, it builds great!

 > ls -l confdefs -rwxr-xr-x 1 myself users 16136 Fev 1 09:52 confdefs > file confdefs confdefs: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, not stripped 

Can someone here please let me know what I’m missing is that my projects work on one box and not on another?

Thanks!

+6
source share
1 answer

I am not 100% sure that it solves all problems, but it works for us.

We found that symlink "ld.so.1 β†’ ../../../ppc_8xx/lib/ld.so.1" in eldk-3.1 / usr / ppc-linux / lib solves the binding problem.

I suspect something has changed in the environment between F15 and F16. The same goes for OpenSUSE (11-> 12). An error was also posted against Fedora https://bugzilla.redhat.com/show_bug.cgi?id=754695 , which was interrupted as intentional changes to the ABI.

+6
source

Source: https://habr.com/ru/post/907389/


All Articles