Hi, I used the latest git for the source code for glibc (2.15.90) and I used this configure line: ~/glibc-build # ../glibc/configure --enable-static --disable-shared --prefix=/usr/local/glibc-static (it complained about not recognizing ld, because I'm on debian and using binutils-gold, so I downloaded/compiled gnu binutils and solved that error) after a successful configure, I ran 'make' and it compiled a lot of stuff and finally gave me this error: ... gcc -nostdlib -nostartfiles -o /root/git/glibc-build/iconv/iconvconfig -Wl,-z,relro -Wl,--hash-style=both /root/git/glibc-build/csu/crt1.o /root/git/glibc-build/csu/crti.o `gcc --print-file-name=crtbegin.o` /root/git/glibc-build/iconv/iconvconfig.o /root/git/glibc-build/iconv/strtab.o /root/git/glibc-build/iconv/xmalloc.o /root/git/glibc-build/iconv/hash-string.o /root/git/glibc-build/libc.a -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed /root/git/glibc-build/libc.a -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed `gcc --print-file-name=crtend.o` /root/git/glibc-build/csu/crtn.o /usr/local/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/root/git/glibc-build/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie collect2: ld returned 1 exit status make[2]: *** [/root/git/glibc-build/iconv/iconvconfig] Error 1 make[2]: Leaving directory `/root/git/glibc/iconv' make[1]: *** [iconv/others] Error 2 make[1]: Leaving directory `/root/git/glibc' make: *** [all] Error 2 glibc-build # I'm not sure is it a bug or I'm doing something wrong here. I need to build the static glibc so that I could build static ffmpeg with it, that's my goal. Anyway, if this is not a bug, I really apologize.
FWIW, 1. Glibc developers consider fully-static linking a "step child", and your bug will likely be ignored ... 2. For your stated goal of "static ffmpeg", you don't need to build a --disable-shared glibc. The regular build already supplies libc.a. Just do "gcc -static ... -o ffmpeg" and be done with it.
Thanks a lot :) I'll try that :)
--disable-shared may be useful for porting purpose.
Fixed on 2.17: http://sourceware.org/git/?p=glibc.git;a=commit;h=94b32c39127967ea58adac3d737a1e5d6116fb77