在将TrajOpt安装到我的catkin工作区时,我如何解决此Cmake错误



我正在尝试将TrajOpt安装到我的catkin工作区。我已经达到make -j。请参阅下面的终端输出。

如何继续?提前谢谢!

$ make -j
Scanning dependencies of target json
Scanning dependencies of target utils
Scanning dependencies of target bpmpd_caller
Scanning dependencies of target gtest
[  1%] Building CXX object src/sco/CMakeFiles/bpmpd_caller.dir/bpmpd_caller.cpp.o
[  3%] Building CXX object src/utils/CMakeFiles/utils.dir/stl_to_string.cpp.o
[  5%] Building CXX object src/utils/CMakeFiles/utils.dir/config.cpp.o
[  7%] Building CXX object src/utils/CMakeFiles/utils.dir/logging.cpp.o
[  9%] Building CXX object src/utils/CMakeFiles/utils.dir/clock.cpp.o
[ 10%] Building CXX object ext/json/CMakeFiles/json.dir/src/lib_json/json_value.cpp.o
[ 12%] Building CXX object ext/json/CMakeFiles/json.dir/src/lib_json/json_reader.cpp.o
[ 14%] Building CXX object ext/json/CMakeFiles/json.dir/src/lib_json/json_writer.cpp.o
[ 16%] Building CXX object ext/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 18%] Linking CXX executable ../../bin/bpmpd_caller
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(bpmdll.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(mprnt.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(pddrv.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(readpar.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(rowact.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(rowdup.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(rowsng.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(scale.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(wrimps.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(aggreg.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(bndchk.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(bpmpd.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(cdiag.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(cdircc.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(cdirpc.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(cfixvar.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(chepdu.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(coldbl.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(colsng.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(cstpcrt.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(cstplen.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(dblrow.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(duchek.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(facts5c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(factsnb3.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(fbtran8.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(itrefsol.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(lindep.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(nfacts5c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(nfactsb3.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(pbcgm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(pbqmr.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(refactm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(rngchk.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(setlam.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(sparsr.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(supnode.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(symfactq.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(symmfo.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(unroll.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(warmstrt.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(affsdir.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(ordctl.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(metis.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(mfillind.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/sophie/caris_ws/trajopt/3rdpartylib/bpmpd_linux64.a(mfillin.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
src/sco/CMakeFiles/bpmpd_caller.dir/build.make:95: recipe for target 'bin/bpmpd_caller' failed
make[2]: *** [bin/bpmpd_caller] Error 1
CMakeFiles/Makefile2:286: recipe for target 'src/sco/CMakeFiles/bpmpd_caller.dir/all' failed
make[1]: *** [src/sco/CMakeFiles/bpmpd_caller.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 20%] Linking CXX shared library ../../lib/libjson.so
[ 20%] Built target json
[ 21%] Linking CXX shared library ../../lib/libutils.so
[ 21%] Built target utils
[ 23%] Linking CXX static library ../../lib/libgtest.a
[ 23%] Built target gtest
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

我遇到了同样的问题。看起来主trajopt存储库已经几年没有更新了,但有一个分叉存储库,它最近有一些分支,这个链接上的分支为我解决了这个错误。然后,我遇到了另一个问题,我按照这些说明解决了这个问题。

结账新trajopt分行:

git checkout https://github.com/cedriclmenard/trajopt.git
cd trajopt
git checkout --track origin/fixes-cedric

修复新错误:

sudo apt-get install libopenscenegraph-dev
sudo cp /usr/include/osg/CameraNode usr/local/include/osg/
sudo apt-get remove libopenscenegraph-dev

完成trajopt(我在make命令中添加了1,这样我就不会出现"内存不足"错误(:

cd ..
mkdir build_trajopt
cmake path/to/trajopt
make -j 1

最新更新