在 Ubuntu 上建造动脉失败

Building Artery on Ubuntu fails

当我尝试在 Ubuntu 16.04 上构建 Artery 时。调用后发生以下情况 $ cmake --build /home/hardt/Veins/artery-master/build

[ 23%] Linking CXX shared library libartery.so
/usr/bin/ld: /usr/local/lib/libvanetza_btp.a(data_request.cpp.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared  
object; recompile with -fPIC
/usr/local/lib/libvanetza_btp.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/artery/CMakeFiles/artery.dir/build.make:954: recipe for target'src/artery/libartery.so' failed
make[2]: *** [src/artery/libartery.so] Error 1
CMakeFiles/Makefile2:229: recipe for target 'src/artery/CMakeFiles/artery.dir/all' failed
make[1]: *** [src/artery/CMakeFiles/artery.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

由于我不太熟悉在 Unix 系统上构建源代码,所以我不太确定如何处理此错误。 我正在使用 cmake 版本 3.9.3、boost 1.65.1 和 crypto++ 5.6.4,geographiclib 也没有错误构建。

看到评论,问题解决了
cmake 配置中 vanetza 目录 VANETZA_DIR 的路径错误。通过 ccmake 更正此问题已解决。