chennuo0125-HIT / lidar_imu_calib

automatic calibration of 3D lidar and IMU extrinsics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LZ4_streamDecode_t

horverno opened this issue · comments

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: ethz-asl/lidar_align#16 (comment)

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

it looks like this is a duplicate of #6