APRIL-ZJU / lidar_IMU_calib

[IROS 2020] Targetless Calibration of LiDAR-IMU System Based on Continuous-time Batch Estimation
GNU General Public License v3.0
942 stars 224 forks source link

Build Error #18

Open mysterybc opened 3 years ago

mysterybc commented 3 years ago

There is an error when i was trying to build this project :

[ 55%] Linking CXX shared library /home/lovebc/workspace/ros/slam_simulation_ws/devel/lib/libli_calib_lib.so
/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 making a shared object; recompile with -fPIC
/usr/local/lib/libgflags.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
slam_simulation/lidar_IMU_calib-master/CMakeFiles/li_calib_lib.dir/build.make:630: recipe for target '/home/lovebc/workspace/ros/slam_simulation_ws/devel/lib/libli_calib_lib.so' failed
make[2]: *** [/home/lovebc/workspace/ros/slam_simulation_ws/devel/lib/libli_calib_lib.so] Error 1
CMakeFiles/Makefile2:2889: recipe for target 'slam_simulation/lidar_IMU_calib-master/CMakeFiles/li_calib_lib.dir/all' failed
make[1]: *** [slam_simulation/lidar_IMU_calib-master/CMakeFiles/li_calib_lib.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

I tried with compile option -fPIC,but it didn't work, so I just build static library, will that be a problem?

And by the way, I suggest you could point out that ndt_omp should be your version, instead of https://github.com/koide3/ndt_omp.

Thanks for your help in advance!

Chrislzy1993 commented 3 years ago

hi, @mysterybc , this is a flag error, please check you gflag install sucessfully, use ''sudo apt-get install gflag'' command to install gflag instead