HKUST-Aerial-Robotics / EPSILON

MIT License
564 stars 205 forks source link

Relocation R_X86_64_PC32 against symbol `_ZTI12SimpleVector' can not be used when making a shared object; recompile with -fPIC #27

Open FaboNo opened 6 months ago

FaboNo commented 6 months ago

Dear all

A got the following error with catkin_make:

/usr/bin/c++ -fPIC -std=c++11  -g -fPIC -O3 -Wall -O3 -Wall  -shared -Wl,-soname,libhkust_pl_ooqp_itf.so -o 
/home/fabrice/catkin_epsilon/devel/lib/libhkust_pl_ooqp_itf.so CMakeFiles/hkust_pl_ooqp_itf.dir/src/common/solver
/ooqp_interface.cc.o CMakeFiles/hkust_pl_ooqp_itf.dir/src/common/solver/qp_solver.cc.o /home/fabrice
/catkin_epsilon/src/EPSILON/core/common/thirdparty/ooqp/lib/libooqpgensparse.a /home/fabrice/catkin_epsilon
/src/EPSILON/core/common/thirdparty/ooqp/lib/libooqpsparse.a /home/fabrice/catkin_epsilon/src/EPSILON
/core/common/thirdparty/ooqp/lib/libooqpgondzio.a /home/fabrice/catkin_epsilon/src/EPSILON/core/common
/thirdparty/ooqp/lib/libooqpbase.a /home/fabrice/catkin_epsilon/src/EPSILON/core/common/thirdparty/ooqp/lib
/libma27.a -lblas -lgfortran 

/usr/bin/ld: /home/fabrice/catkin_epsilon/src/EPSILON/core/common/thirdparty/ooqp/lib
/libooqpgensparse.a(QpGenSparseSeq.o): relocation R_X86_64_PC32 against symbol `_ZTI12SimpleVector' can not be 
used when making a shared object; recompile with -fPIC

What I did is compile OOQP and copy the requested lib and .h in the corresponding EPSILON directories. But I still have this message asking me to compile with -fPIC - meaning recompile OOQP with -fPIC?

Thank you for your help