-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building error with catin build #16
Comments
Errors << lidar_align:make /home/vinz/catkin_ws/logs/lidar_align/build.make.001.log |
Sorry for late reply. I have hit this issue before and honestly don't really have a good fix. The problem is that when you install ros you get two separate and incompatible versions of LZ4. One is used by ros for serialization and the other by the flann kdtree in pcl. It seems only some combinations of OS, workspace and ros versions have this issue. I remember when I hit it on one computer I just went in and hack fixed the flann version by commenting out the functions, though this isn't really a suggested solution. |
@ZacharyTaylor Hi, I'm having the same problem here. You mentioned you hack fixed it. Could you please share how you did it? |
System: Ubuntu 18.04 I thing this will be fixed in next release version of system or ROS. 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 |
a temporary fix that worked for us:
|
Thank you very much. Got it working! |
and also does works. thanks to @KevinLADLee @Eeppii |
In case you need a solution that does not require modification of system wide files is the following:
I know it's ugly, but modifying system wide files is not ideal sometimes. |
I also see this error, when build my project. completed it as @ KevinLADLee commented on Jun 21, 2019 |
Hi There,
When trying to build the package I get the following error:
Errors << lidar_align:make /home/vinz/catkin_ws/logs/lidar_align/build.make.001.log In file included from /usr/include/flann/util/serialization.h:9:0, from /usr/include/flann/util/matrix.h:35, from /usr/include/flann/flann.hpp:41, from /usr/include/pcl-1.8/pcl/kdtree/flann.h:50, from /usr/include/pcl-1.8/pcl/kdtree/kdtree_flann.h:45, from /home/vinz/catkin_ws/src/lidar_align/include/lidar_align/sensors.h:8, from /home/vinz/catkin_ws/src/lidar_align/include/lidar_align/loader.h:7, from /home/vinz/catkin_ws/src/lidar_align/src/loader.cpp:5: /usr/include/flann/ext/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 /opt/ros/melodic/include/roslz4/lz4s.h:38:0, from /opt/ros/melodic/include/rosbag/stream.h:46, from /opt/ros/melodic/include/rosbag/chunked_file.h:46, from /opt/ros/melodic/include/rosbag/bag.h:41, from /home/vinz/catkin_ws/src/lidar_align/src/loader.cpp:2: /usr/include/lz4.h:196:57: note: previous declaration as ‘typedef struct LZ4_stream_t LZ4_stream_t’ typedef struct { long long table[LZ4_STREAMSIZE_U64]; } LZ4_stream_t; ^~~~~~~~~~~~ In file included from /usr/include/flann/util/serialization.h:9:0, from /usr/include/flann/util/matrix.h:35, from /usr/include/flann/flann.hpp:41, from /usr/include/pcl-1.8/pcl/kdtree/flann.h:50, from /usr/include/pcl-1.8/pcl/kdtree/kdtree_flann.h:45, from /home/vinz/catkin_ws/src/lidar_align/include/lidar_align/sensors.h:8, from /home/vinz/catkin_ws/src/lidar_align/include/lidar_align/loader.h:7, from /home/vinz/catkin_ws/src/lidar_align/src/loader.cpp:5: /usr/include/flann/ext/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; ^~~~~~~~~~~~~~~~~~ In file included from /opt/ros/melodic/include/roslz4/lz4s.h:38:0, from /opt/ros/melodic/include/rosbag/stream.h:46, from /opt/ros/melodic/include/rosbag/chunked_file.h:46, from /opt/ros/melodic/include/rosbag/bag.h:41, from /home/vinz/catkin_ws/src/lidar_align/src/loader.cpp:2: /usr/include/lz4.h:249:72: note: previous declaration as ‘typedef struct LZ4_streamDecode_t LZ4_streamDecode_t’ typedef struct { unsigned long long table[LZ4_STREAMDECODESIZE_U64]; } LZ4_streamDecode_t; ^~~~~~~~~~~~~~~~~~ make[2]: *** [CMakeFiles/lidar_align.dir/src/loader.cpp.o] Error 1 make[1]: *** [CMakeFiles/lidar_align.dir/all] Error 2 make: *** [all] Error 2 cd /home/vinz/catkin_ws/build/lidar_align; catkin build --get-env lidar_align | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
Do you have any suggestions on how I could fix this?
Thanks
The text was updated successfully, but these errors were encountered: