Sign in to follow this  
Followers 0
kingospam

glibc

5 posts in this topic

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.

[code]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[/code]

does anyone have any idea what's going on? The configure args were standard. I ran make as:
[code]env LANGUAGE=C LC_ALL=C make install[/code]
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0