This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

relocation R_X86_64_PC32: but fPIC used


I'm trying to build smilutils, a video conversion utility, on amd64.

g++ -shared -nostdlib
/usr/lib/gcc/x86_64-redhat-linux/4.0.0/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.0.0/crtbeginS.o  .libs/avi.o
.libs/filehandler.o .libs/frame.o .libs/playlist.o .libs/riff.o
.libs/error.o .libs/preferences.o .libs/gnome-stubs.o  -L/usr/lib64
-lgdk_pixbuf-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lquicktime
-lpng -ldl /usr/lib64/libdv.so -lxml2 -lz -lpthread
-L/usr/lib/gcc/x86_64-redhat-linux/4.0.0
-L/usr/lib/gcc/x86_64-redhat-linux/4.0.0/../../../../lib64
-L/usr/lib/gcc/x86_64-redhat-linux/4.0.0/../../.. -L/lib/../lib64
-L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/x86_64-redhat-linux/4.0.0/crtendS.o
/usr/lib/gcc/x86_64-redhat-linux/4.0.0/../../../../lib64/crtn.o  
-mtune=athlon64 -fPIC -Wl,-soname -Wl,libkinolegacy.so.0 -o
.libs/libkinolegacy.so.0.0.0
/usr/bin/ld: .libs/filehandler.o: relocation R_X86_64_PC32 against
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::~basic_string()@@GLIBCXX_3.4' 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

But they're al built with -fPIC:

 file .libs/*.o
.libs/avi.o:         ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/error.o:       ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/filehandler.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/frame.o:       ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/gnome-stubs.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/playlist.o:    ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/preferences.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped
.libs/riff.o:        ELF 64-bit LSB relocatable, AMD x86-64, version 1
(SYSV), not stripped


For example:

g++ -DHAVE_CONFIG_H -I. -I. -I.. -Wno-deprecated
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/gtk-2.0 -I/usr/include/libxml2 -O3 -fPIC -ffast-math
-fomit-frame-pointer -funit-at-a-time -mtune=athlon64 -ftree-vectorize
-fvisibility-inlines-hidden -I/usr/include/ffmpeg -MT filehandler.lo
-MD -MP -MF .deps/filehandler.Tpo -c filehandler.cc -fPIC -DPIC -o
.libs/filehandler.o

Puzzled.

sean


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]