Skip to content
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

Compile error #3

Open
jiejiezhang opened this issue Oct 23, 2023 · 2 comments
Open

Compile error #3

jiejiezhang opened this issue Oct 23, 2023 · 2 comments

Comments

@jiejiezhang
Copy link

In file included from /opt/ros/melodic/include/roslz4/lz4s.h:38,
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/jason/code/path/kr_param_map_ws/src/kr_param_map/param_env/src/read_grid_map.cpp:11:
/usr/include/lz4.h:196:57: error: conflicting declaration ‘typedef struct LZ4_stream_t LZ4_stream_t’
196 | typedef struct { long long table[LZ4_STREAMSIZE_U64]; } LZ4_stream_t;
| ^~~~~~~~~~~~
In file included from /usr/include/flann/util/serialization.h:9,
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/jason/code/path/kr_param_map_ws/src/kr_param_map/param_env/src/read_grid_map.cpp:5:
/usr/include/flann/ext/lz4.h:196:57: note: previous declaration as ‘typedef struct LZ4_stream_t LZ4_stream_t’
196 | typedef struct { long long table[LZ4_STREAMSIZE_U64]; } LZ4_stream_t;
| ^~~~~~~~~~~~
In file included from /opt/ros/melodic/include/roslz4/lz4s.h:38,
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/jason/code/path/kr_param_map_ws/src/kr_param_map/param_env/src/read_grid_map.cpp:11:
/usr/include/lz4.h:249:72: error: conflicting declaration ‘typedef struct LZ4_streamDecode_t LZ4_streamDecode_t’
249 | typedef struct { unsigned long long table[LZ4_STREAMDECODESIZE_U64]; } LZ4_streamDecode_t;
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/flann/util/serialization.h:9,
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/jason/code/path/kr_param_map_ws/src/kr_param_map/param_env/src/read_grid_map.cpp:5:
/usr/include/flann/ext/lz4.h:249:72: note: previous declaration as ‘typedef struct LZ4_streamDecode_t LZ4_streamDecode_t’
249 | typedef struct { unsigned long long table[LZ4_STREAMDECODESIZE_U64]; } LZ4_streamDecode_t;
| ^~~~~~~~~~~~~~~~~~

@yuwei-wu
Copy link
Collaborator

Hi, it looks like a dependency issue, could you elaborate more about your versions of dependencies?

@Abner0907
Copy link

Abner0907 commented Feb 1, 2024

you can try this:

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.hc.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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants