Daniel Feiglin wrote:
Hello folks!
During the course of trying to build an app from the tgz sources, I received an odd looking message that gcc could not create an executable.
After a little research, I tried to compile the canonical "Hello, world" program with this:
gcc -o hello hello.c
and I got this:
daniel@danny:~> gcc -o hello hello.c /usr/lib/gcc/i586-suse-linux/4.1.2/../../../crt1.o: In function `_start': (.text+0xc): undefined reference to `__libc_csu_fini' /usr/lib/gcc/i586-suse-linux/4.1.2/../../../crt1.o: In function `_start': (.text+0x11): undefined reference to `__libc_csu_init' collect2: ld returned 1 exit status
I've never seen anything like that before (since SuSE 6.1). Can anyone tell me what's going on here & how to fix it?
Environment: openSUSE 10.2, kernel 2.6.18.8-0.3-default. I'm using gcc as provided. gcc -v gives: Using built-in specs. Target: i586-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix=-4.1 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-suse-linux Thread model: posix gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
ld -v gives: GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)
Cheers,
Daniel
Problem solved: Bad symlink for libc.so