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 #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" 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!