chennuo0125-HIT / lidar_imu_calib

automatic calibration of 3D lidar and IMU extrinsics
501 stars 113 forks source link

LZ4_streamDecode_t #7

Closed horverno closed 2 years ago

horverno commented 3 years ago

If you got the following error:

Errors     << lidar_imu_calib:make /home/he/catkin_ws/logs/lidar_imu_calib/build.make.003.log                                     
In file included from /home/he/catkin_ws/src/lidar_imu_calib/include/calibExRLidar2Imu.h:16:0,
                 from /home/he/catkin_ws/src/lidar_imu_calib/src/lib/calibExRLidar2Imu.cpp:1:
/usr/include/lz4.h:196:57: error: conflicting declaration ‘typedef struct LZ4_stream_t LZ4_stream_t’
 typedef struct { long long table[LZ4_STREAMSIZE_U64]; } LZ4_stream_t;

In file included from /home/he/catkin_ws/src/lidar_imu_calib/include/calibExRLidar2Imu.h:16:0,
                 from /home/he/catkin_ws/src/lidar_imu_calib/src/lib/calibExRLidar2Imu.cpp:1:
/usr/include/lz4.h:249:72: error: conflicting declaration ‘typedef struct LZ4_streamDecode_t LZ4_streamDecode_t’
 typedef struct { unsigned long long table[LZ4_STREAMDECODESIZE_U64]; } LZ4_streamDecode_t;
                                                                        ^~~~~~~~~~~~~~~~~~

there is a fix in ethz-asl/lidar_align#16 exactly here: https://github.com/ethz-asl/lidar_align/issues/16#issuecomment-504348488

System: Ubuntu 18.04 ROS: melodic Reason: /usr/include/lz4.h conflict with /usr/include/flann/ext/lz4.h

I thing this will be fixed in next release version of system or ROS. But you could try these commands to fix this problem.

sudo mv /usr/include/flann/ext/lz4.h /usr/include/flann/ext/lz4.h.bak sudo mv /usr/include/flann/ext/lz4hc.h /usr/include/flann/ext/lz4.h.bak

sudo ln -s /usr/include/lz4.h /usr/include/flann/ext/lz4.h sudo ln -s /usr/include/lz4hc.h /usr/include/flann/ext/lz4hc.h

horverno commented 3 years ago

it looks like this is a duplicate of chennuo0125-HIT/lidar_imu_calib#6