This happens when compiling arts (KDE sound server) 1.5.4: /usr/bin/ld: ./flow/gslpp/.libs/libgslpp.a(datahandle.o): relocation R_X86_64_PC32 against `vtable for GSL::WaveDataHandle' can not be used when making a shared object; recompile with -fPIC
However, libgslpp.a and datahandle.o were built using -fPIC. This is the extract of the build log for building datahandle.o and libgslpp.a: g++ -DHAVE_CONFIG_H -I../../flow/gslpp -I/usr/src/ark/BUILD/arts/flow/gslpp -I../.. -I/usr/src/ark/BUILD/arts/flow -I/usr/src/ark/BUILD/arts/flow/gsl -I../../flow -I/usr/src/ark/BUILD/arts/mcop -I../../mcop -I../.. -I/usr/include/kde -I/usr/lib64/qt3-gcc4.1/include -I. -I/usr/src/ark/BUILD/arts/libltdl -DQT_THREAD_SUPPORT -D_REENTRANT -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -fomit-frame-pointer -fweb -frename-registers -fPIC -fno-exceptions -fno-check-new -fvisibility=hidden -fvisibility-inlines-hidden -D_GNU_SOURCE -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -fvisibility=hidden -fvisibility-inlines-hidden -ftemplate-depth-99 -fPIC -DPIC -c /usr/src/ark/BUILD/arts/flow/gslpp/datahandle.cpp -o ../../flow/gslpp/.libs/datahandle.o -Wp,-MD,../../flow/gslpp/.deps/datahandle.TUlo /bin/sh ../../libtool --silent --mode=link --tag=CXX g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -fomit-frame-pointer -fweb -frename-registers -fPIC -fno-exceptions -fno-check-new -fvisibility=hidden -fvisibility-inlines-hidden -D_GNU_SOURCE -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -fvisibility=hidden -fvisibility-inlines-hidden -ftemplate-depth-99 -DQT_THREAD_SUPPORT -D_REENTRANT -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -o ../../flow/gslpp/libgslpp.la ../../flow/gslpp/datahandle.lo This worked correctly before; binutils version is 2.17.50.0.3 (just in case this is a binutils bug that just happened not to show up with earlier gccs). -- Summary: [4.2 regression] -fPIC generates non-PIC code Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bero at arklinux dot org GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28781