Hello, I am trying to compile some code but when I run make I get the following error: make[1]: Entering directory `/home/amok/local/nci/suif/suif2b/common' /usr/bin/g++ -shared -o /home/amok/local/nci/solib/libcommon.so \ formatted.o MString.o text_util.o suif_map.o suif_hash_map.o lstring.o hash_table.o i_integer.o sparse_vector.o suif_gc_obj.o suif_gc_map.o -L/home/amok/local/nci/solib \ -L/home/amok/local/nci/solib /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: formatted.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC formatted.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [/home/amok/local/nci/solib/libcommon.so] Error 1 make[1]: Leaving directory `/home/amok/local/nci/suif/suif2b/common' make: *** [dummy] Error 2 what does this mean? Regards -- Epur Si Muove
* Argiris Mokios <amok@auth.gr> [051017 13:25]:
Hello,
I am trying to compile some code but when I run make I get the following error:
make[1]: Entering directory `/home/amok/local/nci/suif/suif2b/common' /usr/bin/g++ -shared -o /home/amok/local/nci/solib/libcommon.so \ formatted.o MString.o text_util.o suif_map.o suif_hash_map.o lstring.o hash_table.o i_integer.o sparse_vector.o suif_gc_obj.o suif_gc_map.o -L/home/amok/local/nci/solib \ -L/home/amok/local/nci/solib /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: formatted.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC formatted.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [/home/amok/local/nci/solib/libcommon.so] Error 1 make[1]: Leaving directory `/home/amok/local/nci/suif/suif2b/common' make: *** [dummy] Error 2
what does this mean?
You have compiled formatted.o without -fPIC, thus you cannot link it to a shared library. Probably all the other object files as well. PIC means: Position Independant Code -fPIC is necessary for all shared objects.
Regards
-- Epur Si Muove
regards, Stefan -- SUSE LINUX Products GmbH, Maxfeldstr. 5 Mail: sf@suse.de D-90409 Nuernberg Phone: +49-911-740 53 - 0 GPG 1024D/91614BBC B226 E3DA 37B0 2170 7403 D19C 18AF E579 9161 4BBC
Stefan Fent wrote:
* Argiris Mokios <amok@auth.gr> [051017 13:25]:
Hello,
I am trying to compile some code but when I run make I get the following error:
make[1]: Entering directory `/home/amok/local/nci/suif/suif2b/common' /usr/bin/g++ -shared -o /home/amok/local/nci/solib/libcommon.so \ formatted.o MString.o text_util.o suif_map.o suif_hash_map.o lstring.o hash_table.o i_integer.o sparse_vector.o suif_gc_obj.o suif_gc_map.o -L/home/amok/local/nci/solib \ -L/home/amok/local/nci/solib /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: formatted.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC formatted.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [/home/amok/local/nci/solib/libcommon.so] Error 1 make[1]: Leaving directory `/home/amok/local/nci/suif/suif2b/common' make: *** [dummy] Error 2
what does this mean?
You have compiled formatted.o without -fPIC, thus you cannot link it to a shared library. Probably all the other object files as well.
PIC means: Position Independant Code
-fPIC is necessary for all shared objects.
Regards
-- Epur Si Muove
regards,
Stefan
Thank you very much Stefan, indeed that was the case.. -- Epur Si Muove
participants (2)
-
Argiris Mokios
-
Stefan Fent