can not be used when making a shared object; recompile with -fPIC的解决方法

在运行

roslaunch moveit_setup_assistant setup_assistant.launch

发现process[moveit_setup_assistant-2]: started with pid [13920]
/opt/ros/noetic/lib/moveit_setup_assistant/moveit_setup_assistant: error while loading shared libraries: libfcl.so.0.6: cannot open shared object file: No such file or directory
缺少libfcl.so.0.6
找到https://github.com/flexible-collision-library/fcl 按照其安装。先安装libccd

之后的步骤中在make时,出现
relocation R_X86_64_PC32 against symbol
can not be used when making a shared object; recompile with -fPIC
参考https://stackoverflow.com/questions/61652407/linker-error-relocation-r-x86-64-pc32-against-symbol-xmlfree-recompile-w,我们在fcl的目录下,

./configure CFLAGS=-fPIC

即可解决。

在安装libccd时,在/libccd/src下的Makefile中,找到CFLAGS行,在最后添加-fPIC,然后再进行make,和sudo make install

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值