Jump to content


Photo
- - - - -

glibc


  • Please log in to reply
4 replies to this topic

#1 kingospam

kingospam

    SUP3R 31337

  • Members
  • 177 posts

Posted 26 September 2007 - 02:13 PM

I'm trying to compile glibc (to get a base for the elf interpreter), and I always get these errors, no matter what CFLAGS I use (I googed beforehand and tried some flags that other people have said to do). I'm running Ubuntu 7.10 (gutsy beta). I've also tested it on Ubuntu 7.04 with the same results.

gcc   -nostdlib -nostartfiles -shared -o /home/shawn/downloads/programming/glibc-build/elf/ld.so						\
				  -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs	   \
				  /home/shawn/downloads/programming/glibc-build/elf/librtld.os -Wl,--version-script=/home/shawn/downloads/programming/glibc-build/ld.map	   \
				  -Wl,-soname=ld-linux.so.2 -T /home/shawn/downloads/programming/glibc-build/elf/ld.so.lds
/home/shawn/downloads/programming/glibc-build/elf/librtld.os: In function `print_statistics':
/home/shawn/downloads/programming/glibc-2.6.1/elf/rtld.c:2800: undefined reference to `__stack_chk_fail_local'
/home/shawn/downloads/programming/glibc-build/elf/librtld.os: In function `process_dl_debug':
/home/shawn/downloads/programming/glibc-2.6.1/elf/rtld.c:2436: undefined reference to `__stack_chk_fail_local'
/home/shawn/downloads/programming/glibc-build/elf/librtld.os: In function `process_envvars':
/home/shawn/downloads/programming/glibc-2.6.1/elf/rtld.c:2695: undefined reference to `__stack_chk_fail_local'
/home/shawn/downloads/programming/glibc-build/elf/librtld.os: In function `dl_main':
/home/shawn/downloads/programming/glibc-2.6.1/elf/rtld.c:2316: undefined reference to `__stack_chk_fail_local'
/home/shawn/downloads/programming/glibc-build/elf/librtld.os: In function `print_search_path':
/home/shawn/downloads/programming/glibc-2.6.1/elf/dl-load.c:1567: undefined reference to `__stack_chk_fail_local'
/home/shawn/downloads/programming/glibc-build/elf/librtld.os:/home/shawn/downloads/programming/glibc-2.6.1/elf/dl-load.c:1787: more undefined references to `__stack_chk_fail_local' follow
collect2: ld returned 1 exit status
make[2]: *** [/home/shawn/downloads/programming/glibc-build/elf/ld.so] Error 1
make[2]: Leaving directory `/home/shawn/downloads/programming/glibc-2.6.1/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/shawn/downloads/programming/glibc-2.6.1'
make: *** [install] Error 2

does anyone have any idea what's going on? The configure args were standard. I ran make as:
env LANGUAGE=C LC_ALL=C make install
that's what the gnu documentation said to run. Like I said, I also tried different CFLAGS with the same results.
CFLAGS being "-fno-stack-protector -fno-stack-protector-all". I don't have shell access to any other system (gentoo, slack, etc.) so I can't test on any other distribution.

#2 epoise

epoise

    DDP Fan club member

  • Members
  • 50 posts

Posted 28 September 2007 - 05:59 AM

Hi,

Could you give a few more specifics on your environment?

I've just compiled glibc-2.61 without any additions (other than changing the install prefix) without errors on ArchLinux (Don't Panic, x86_64, fully updated).

It might be something to do with your compiler version and its configured-in options:

I have gcc-4.2.1 ( --prefix=/usr --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread-Modell: posix ) and although there were a few warnings, glibc-2.6.1 compiled cleanly. glibc-2.6.1 is running already on my machine, however... (package version: 2.6.1-2)

If you want a pretty "clean" environment, just set up the buildtools from linuxfromscratch and compile whatever you want in the chroot environment. There are bound to be lots of patches, special options etc. built into the UbuntuLinux "development tools."

HTH

#3 superkippah

superkippah

    HACK THE PLANET!

  • Members
  • 58 posts

Posted 30 September 2007 - 09:51 PM

try a different C compiler. CC=gcc-2.95, CC=gcc-3.4

#4 superkippah

superkippah

    HACK THE PLANET!

  • Members
  • 58 posts

Posted 30 September 2007 - 10:14 PM

i just compiled it on the same version of Ubuntu as you have done and got the same error. but I then tried to compile it with gcc-3.4 and it worked, make sure you do a make clean before you do.

#5 kingospam

kingospam

    SUP3R 31337

  • Members
  • 177 posts

Posted 30 September 2007 - 10:29 PM

Thanks a lot for your help. I haven't gotten around to doing what you guys have suggested, but I will soon.




BinRev is hosted by the great people at Lunarpages!