http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50597
Bug #: 50597 Summary: printf_fp.o: relocation R_X86_64_PC32 against `hack_digit.6607' can not be used when making a shared object; recompile with -fPIC Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: mustarddr...@gmail.com <System Configuration> OS : CentOS 5.7 GCC to build GCC 4.6.1 : 4.1.2 MPC : 0.9 MPFR : 3.0.1 GMP : 5.0.2 With the above system configuration and the below configure options, I was sucessful to build gcc 4.3.6, gcc 4.4.0, gcc 4.5.3. However, I failed to build gcc 4.6.1. <Configure options> In a directory named 'build', ../gcc-5.6.1/configure --prefix=/home/dwlee/softwares/gcc/gcc46 --with-gmp=/home/dwlee/softwares/gcc/gmp --with-mpfr=/home/dwlee/softwares/gcc/mpfr --with-mpc=/home/dwlee/softwares/gcc/mpc --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,d --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/home/dwlee/softwares/java/jre1.6.0_27 --with-cpu=generic & make <Error Message> The error below occurs during 'make' process. ... omitted ... make[3]: Entering directory `/home/dwlee/softwares/gcc/gcc46/build/x86_64-unknown-linux-gnu/libquadmath' /bin/sh ./libtool --tag=CC --mode=link /home/dwlee/softwares/gcc/gcc46/build/./gcc/xgcc -B/home/dwlee/softwares/gcc/gcc46/build/./gcc/ -B/home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/bin/ -B/home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/lib/ -isystem /home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/include -isystem /home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/sys-include -g -O2 -version-info `grep -v '^#' ../../../gcc-4.6.1/libquadmath/libtool-version` -Wl,--version-script=../../../gcc-4.6.1/libquadmath/quadmath.map -lm -o libquadmath.la -rpath /home/dwlee/softwares/gcc/gcc46/lib/../lib64 math/acoshq.lo math/fmodq.lo math/acosq.lo math/frexpq.lo math/rem_pio2q.lo math/asinhq.lo math/hypotq.lo math/remainderq.lo math/asinq.lo math/rintq.lo math/atan2q.lo math/isinfq.lo math/roundq.lo math/atanhq.lo math/isnanq.lo math/scalblnq.lo math/atanq.lo math/j0q.lo math/scalbnq.lo math/cbrtq.lo math/j1q.lo math/signbitq.lo math/ceilq.lo math/jnq.lo math/sincos_table.lo math/complex.lo math/ldexpq.lo math/sincosq.lo math/copysignq.lo math/lgammaq.lo math/sincosq_kernel.lo math/coshq.lo math/llroundq.lo math/sinhq.lo math/cosq.lo math/log10q.lo math/sinq.lo math/cosq_kernel.lo math/log1pq.lo math/sinq_kernel.lo math/erfq.lo math/logq.lo math/sqrtq.lo math/expm1q.lo math/lroundq.lo math/tanhq.lo math/expq.lo math/modfq.lo math/tanq.lo math/fabsq.lo math/nanq.lo math/tgammaq.lo math/finiteq.lo math/nextafterq.lo math/truncq.lo math/floorq.lo math/powq.lo math/fmaq.lo math/cacoshq.lo math/cacosq.lo math/casinhq.lo math/casinq.lo math/catanhq.lo math/catanq.lo math/cimagq.lo math/conjq.lo math/cprojq.lo math/crealq.lo math/fdimq.lo math/fmaxq.lo math/fminq.lo math/ilogbq.lo math/llrintq.lo math/log2q.lo math/lrintq.lo math/nearbyintq.lo math/remquoq.lo printf/addmul_1.lo printf/add_n.lo printf/cmp.lo printf/divrem.lo printf/flt1282mpn.lo printf/fpioconst.lo printf/lshift.lo printf/mul_1.lo printf/mul_n.lo printf/mul.lo printf/printf_fphex.lo printf/printf_fp.lo printf/quadmath-printf.lo printf/rshift.lo printf/submul_1.lo printf/sub_n.lo strtod/strtoflt128.lo strtod/mpn2flt128.lo strtod/tens_in_limb.lo libtool: link: /home/dwlee/softwares/gcc/gcc46/build/./gcc/xgcc -B/home/dwlee/softwares/gcc/gcc46/build/./gcc/ -B/home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/bin/ -B/home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/lib/ -isystem /home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/include -isystem /home/dwlee/softwares/gcc/gcc46/x86_64-unknown-linux-gnu/sys-include -shared math/.libs/acoshq.o math/.libs/fmodq.o math/.libs/acosq.o math/.libs/frexpq.o math/.libs/rem_pio2q.o math/.libs/asinhq.o math/.libs/hypotq.o math/.libs/remainderq.o math/.libs/asinq.o math/.libs/rintq.o math/.libs/atan2q.o math/.libs/isinfq.o math/.libs/roundq.o math/.libs/atanhq.o math/.libs/isnanq.o math/.libs/scalblnq.o math/.libs/atanq.o math/.libs/j0q.o math/.libs/scalbnq.o math/.libs/cbrtq.o math/.libs/j1q.o math/.libs/signbitq.o math/.libs/ceilq.o math/.libs/jnq.o math/.libs/sincos_table.o math/.libs/complex.o math/.libs/ldexpq.o math/.libs/sincosq.o math/.libs/copysignq.o math/.libs/lgammaq.o math/.libs/sincosq_kernel.o math/.libs/coshq.o math/.libs/llroundq.o math/.libs/sinhq.o math/.libs/cosq.o math/.libs/log10q.o math/.libs/sinq.o math/.libs/cosq_kernel.o math/.libs/log1pq.o math/.libs/sinq_kernel.o math/.libs/erfq.o math/.libs/logq.o math/.libs/sqrtq.o math/.libs/expm1q.o math/.libs/lroundq.o math/.libs/tanhq.o math/.libs/expq.o math/.libs/modfq.o math/.libs/tanq.o math/.libs/fabsq.o math/.libs/nanq.o math/.libs/tgammaq.o math/.libs/finiteq.o math/.libs/nextafterq.o math/.libs/truncq.o math/.libs/floorq.o math/.libs/powq.o math/.libs/fmaq.o math/.libs/cacoshq.o math/.libs/cacosq.o math/.libs/casinhq.o math/.libs/casinq.o math/.libs/catanhq.o math/.libs/catanq.o math/.libs/cimagq.o math/.libs/conjq.o math/.libs/cprojq.o math/.libs/crealq.o math/.libs/fdimq.o math/.libs/fmaxq.o math/.libs/fminq.o math/.libs/ilogbq.o math/.libs/llrintq.o math/.libs/log2q.o math/.libs/lrintq.o math/.libs/nearbyintq.o math/.libs/remquoq.o printf/.libs/addmul_1.o printf/.libs/add_n.o printf/.libs/cmp.o printf/.libs/divrem.o printf/.libs/flt1282mpn.o printf/.libs/fpioconst.o printf/.libs/lshift.o printf/.libs/mul_1.o printf/.libs/mul_n.o printf/.libs/mul.o printf/.libs/printf_fphex.o printf/.libs/printf_fp.o printf/.libs/quadmath-printf.o printf/.libs/rshift.o printf/.libs/submul_1.o printf/.libs/sub_n.o strtod/.libs/strtoflt128.o strtod/.libs/mpn2flt128.o strtod/.libs/tens_in_limb.o -lm -Wl,--version-script=../../../gcc-4.6.1/libquadmath/quadmath.map -Wl,-soname -Wl,libquadmath.so.0 -o .libs/libquadmath.so.0.0.0 /usr/bin/ld: printf/.libs/printf_fp.o: relocation R_X86_64_PC32 against `hack_digit.6607' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[3]: *** [libquadmath.la] Error 1 make[3]: Leaving directory `/home/dwlee/softwares/gcc/gcc46/build/x86_64-unknown-linux-gnu/libquadmath' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/dwlee/softwares/gcc/gcc46/build/x86_64-unknown-linux-gnu/libquadmath' make[1]: *** [all-target-libquadmath] Error 2 make[1]: Leaving directory `/home/dwlee/softwares/gcc/gcc46/build' make: *** [all] Error 2