[ 30%] built target vins_estimator
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation r_x86_64_32 against `.rodata.str1.1' can not be used when ****** a shared object; recompile with -fpic
/usr/local/lib/libgflags.a: 無法新增符號: 錯誤的值
collect2: error: ld returned 1 exit status
vins-mono/camera_model/cmakefiles/camera_model.dir/build.make:450: recipe for target '/home/windistance/catkin_ws/devel/lib/libcamera_model.so' failed
make[2]: *** [/home/windistance/catkin_ws/devel/lib/libcamera_model.so] error 1
cmakefiles/makefile2:1954: recipe for target 'vins-mono/camera_model/cmakefiles/camera_model.dir/all' failed
make[1]: *** [vins-mono/camera_model/cmakefiles/camera_model.dir/all] error 2
make[1]: *** 正在等待未完成的任務..
..
解決方法:
這裡提示gflags庫的libgflags.a: 無法新增符號: 錯誤的值,需要重新編譯,在gflags的cmakelists中新增:
add_compile_options(-fpic)
或者
set(cmake_build_type "release")
set(cmake_cxx_flags "-std=c++11")
set(cmake_cxx_flags_release "-o3 -fpic")
或者直接通過apt安裝編譯好的環境
sudo
apt-get
install libgflags-dev libgoogle-glog-dev
[ 40%] built target camera_model
scanning dependencies of target ar_demo_node
cmakefiles/calibration.dir/src/calib/cameracalibration.cc.o:在函式『camodocal::cameracalibration::optimize(boost::shared_ptr
&, std::vector
>
&, std::vector
>
&) const』中:
cameracalibration.cc:(.text+0x3a72):對『cv::mat::updatecontinuityflag(
)』未定義的引用
cameracalibration.cc:(.text+0x4d45):對『cv::mat::updatecontinuityflag(
)』未定義的引用
cmakefiles/calibration.dir/src/camera_models/pinholecamera.cc.o:在函式『camodocal::pinholecamera::initundistortrectifymap(cv::mat&, cv::mat&, float, float, cv::size_, float, float, cv::mat) const』中:
pinholecamera.cc:(.text+0x985):對『cv::mat::updatecontinuityflag(
)』未定義的引用
pinholecamera.cc:(.text+0x16fa):對『cv::mat::updatecontinuityflag(
)』未定義的引用
cmakefiles/calibration.dir/src/camera_models/catacamera.cc.o:在函式『camodocal::catacamera::initundistortrectifymap(cv::mat&, cv::mat&, float, float, cv::size_, float, float, cv::mat) const』中:
catacamera.cc:(.text+0xb9f):對『cv::mat::updatecontinuityflag(
)』未定義的引用
cmakefiles/calibration.dir/src/camera_models/catacamera.cc.o:catacamera.cc:(.text+0x168f): 跟著更多未定義的參考到 cv::mat::updatecontinuityflag(
)[ 41%] building cxx object vins-mono/ar_demo/cmakefiles/ar_demo_node.dir/src/ar_demo_node.cpp.o
解決方法:
cv::mat::updatecontinuityflag()opencv 3.4.2及其最新版本中存在,但是我之前安裝的是opencv3.4.6,所以是ros自帶的opencv2.4.9衝突了,改一下camera_model/cmakelists檔案
find_package(opencv 3.4.6 required)
安裝MySQL問題總結
此次安裝mysql怕是該遇上的都遇上了,網上搜的解決辦法不詳細,今日記下,與君共勉。問題一 版本選擇,在mysql官網有兩種版本安裝包,一種是壓縮包,一種是mis 選擇mis安裝就像平時裝軟體一樣,但是限於英語,不知道每一步做什麼配置,裝起來很沒底。而且和別人的教程看起來不太對,裝錯了都不知道怎麼改...
petalinux安裝問題總結
1,安裝所需要的庫 apt install build essential vim tofrodos 出現解決 1 sudo rm var cache apt archives lock 2 sudo rm var lib dpkg lock 3 sudo dpkg configure a 4 su...
ubuntu mongo安裝問題總結
1.作業系統不符合,我用的debain,但是用了ubuntu的作業系統 ubuntu xenial echo deb arch amd64,arm64 xenial mongodb org 3.4 multiverse sudo tee etc apt sources.list.d mongodb ...