Problem compiling glibc

Smlacc1 smlacc1 at gmail.com
Mon Oct 3 12:23:58 PDT 2011


Hi,

Im having issues compiling glibc stage one on a rhel6 box.  Here is the output of the part of the compile just before it dies:
 
x86_64-lfs-linux-gnu-gcc -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2 iconvconfig.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes   -DGCONV_PATH='"/tools/lib/gconv"' -DGCONV_DIR='"/tools/lib/gconv"'   -I../include -I/opt/makelinux/buildroot/glibc-build/iconv -I/opt/makelinux/buildroot/glibc-build -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /tools/lib/gcc/x86_64-lfs-linux-gnu/4.6.1/include -isystem /tools/lib/gcc/x86_64-lfs-linux-gnu/4.6.1/include-fixed -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1   -DNOT_IN_libc -o /opt/makelinux/buildroot/glibc-build/iconv/iconvconfig.o -MD -MP -MF /opt/makelinux/buildroot/glibc-build/iconv/iconvconfig.o.dt -MT /opt/makelinux/buildroot/glibc-build/iconv/iconvconfig.o
rm -f /opt/makelinux/buildroot/glibc-build/libc.so.6.new
/bin/sh ../scripts/rellns-sh /opt/makelinux/buildroot/glibc-build/libc.so /opt/makelinux/buildroot/glibc-build/libc.so.6.new
mv -f /opt/makelinux/buildroot/glibc-build/libc.so.6.new /opt/makelinux/buildroot/glibc-build/libc.so.6
x86_64-lfs-linux-gnu-gcc -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2 -pie -Wl,-O1 -nostdlib -nostartfiles -o /opt/makelinux/buildroot/glibc-build/iconv/iconvconfig  -Wl,-dynamic-linker=/tools/lib/ld-linux-x86-64.so.2   -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,now -Wl,--warn-shared-textrel,--fatal-warnings /opt/makelinux/buildroot/glibc-build/csu/Scrt1.o /opt/makelinux/buildroot/glibc-build/csu/crti.o `x86_64-lfs-linux-gnu-gcc -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2  --print-file-name=crtbeginS.o` /opt/makelinux/buildroot/glibc-build/iconv/iconvconfig.o /opt/makelinux/buildroot/glibc-build/iconv/strtab.o /opt/makelinux/buildroot/glibc-build/iconv/xmalloc.o /opt/makelinux/buildroot/glibc-build/iconv/hash-string.o  -Wl,-rpath-link=/opt/makelinux/buildroot/glibc-build:/opt/makelinux/buildroot/glibc-build/math:/opt/makelinux/buildroot/glibc-build/elf:/opt/makelinux/buildroot/glibc-build/dlfcn:/opt/makelinux/buildroot/glibc-build/nss:/opt/makelinux/buildroot/glibc-build/nis:/opt/makelinux/buildroot/glibc-build/rt:/opt/makelinux/buildroot/glibc-build/resolv:/opt/makelinux/buildroot/glibc-build/crypt:/opt/makelinux/buildroot/glibc-build/nptl /opt/makelinux/buildroot/glibc-build/libc.so.6 /opt/makelinux/buildroot/glibc-build/libc_nonshared.a  /opt/makelinux/buildroot/glibc-build/elf/ld.so  -lgcc -lgcc_eh  `x86_64-lfs-linux-gnu-gcc -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2  --print-file-name=crtendS.o` /opt/makelinux/buildroot/glibc-build/csu/crtn.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/bin/ld: /opt/makelinux/buildroot/glibc-build/iconv/strtab.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/makelinux/buildroot/glibc-build/iconv/strtab.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [/opt/makelinux/buildroot/glibc-build/iconv/iconvconfig] Error 1
make[2]: Leaving directory `/opt/makelinux/buildroot/glibc-2.12.2/iconv'
make[1]: *** [iconv/others] Error 2
make[1]: Leaving directory `/opt/makelinux/buildroot/glibc-2.12.2'
make: *** [all] Error 2

I looked online, and it may be related to this issue:

http://jaytaylor.com/blog/2010/10/06/howto-fix-fpic-errors/

Im about to go home now, so wont be able to test this fix until tomorrow.  But it seems to me if that flag was needed, i wouldent be the only one experiencing this problem.  Im wondering if anyone else has had this issue, and how they fixed it?

Thans,
Smlacc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20111003/6cc6d9c1/attachment.html>


More information about the hlfs-dev mailing list