Ubuntu: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC



Question:

I got this error after I run make -j4 after cmake ..

Linking CXX shared library ../../lib/libCnoidUtil.so

/usr/bin/ld: ../../lib/libyaml.a(api.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

../../lib/libyaml.a: error adding symbols: Bad value

collect2: error: ld returned 1 exit status

make[2]: *** [lib/libCnoidUtil.so.1.6] Error 1

make[1]: *** [src/Util/CMakeFiles/CnoidUtil.dir/all] Error 2

make: *** [all] Error 2

Do you have any idea how to solve this problem? I've tried to read many answer, but I cannot really understand how to solve it. I've quite new to ubuntu.

Anyone please help!!


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »