ram-lab / MLC

A multi-LiDAR calibration package which is written by C++ and MATLAB.
GNU General Public License v3.0
56 stars 15 forks source link

catkin_make error: undefined reference to `vtkRenderingOpenGL2_AutoInit_Destruct()' #2

Closed yanliang-wang closed 3 years ago

yanliang-wang commented 3 years ago

Hello, the work is very excellent!

I was trying to reproduce it. But there was an error about vtk. The error log is as follows:

[ 43%] Linking CXX executable /home/wang/wang/git_files/test/ws_MLC/devel/lib/lego_loam/check_overlapping_4
CMakeFiles/check_overlapping_4.dir/src/check_overlapping_4.cpp.o: In function `vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit()':
check_overlapping_4.cpp:(.text._ZN25vtkRenderingCore_AutoInitD2Ev[_ZN25vtkRenderingCore_AutoInitD5Ev]+0x13): undefined reference to `vtkRenderingOpenGL2_AutoInit_Destruct()'
CMakeFiles/check_overlapping_4.dir/src/check_overlapping_4.cpp.o: In function `_GLOBAL__sub_I_N_SCAN':
check_overlapping_4.cpp:(.text.startup+0x3c93): undefined reference to `vtkObjectFactoryRegistryCleanup::vtkObjectFactoryRegistryCleanup()'
check_overlapping_4.cpp:(.text.startup+0x3c9a): undefined reference to `vtkObjectFactoryRegistryCleanup::~vtkObjectFactoryRegistryCleanup()'
check_overlapping_4.cpp:(.text.startup+0x3cbc): undefined reference to `vtkRenderingOpenGL2_AutoInit_Construct()'
collect2: error: ld returned 1 exit status
LeGO-LOAM/LeGO-LOAM/CMakeFiles/check_overlapping_4.dir/build.make:506: recipe for target '/home/wang/wang/git_files/test/ws_MLC/devel/lib/lego_loam/check_overlapping_4' failed
make[2]: *** [/home/wang/wang/git_files/test/ws_MLC/devel/lib/lego_loam/check_overlapping_4] Error 1
CMakeFiles/Makefile2:1442: recipe for target 'LeGO-LOAM/LeGO-LOAM/CMakeFiles/check_overlapping_4.dir/all' failed
make[1]: *** [LeGO-LOAM/LeGO-LOAM/CMakeFiles/check_overlapping_4.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed

Have you ever met this error? I think this error may result from the version of PCL. My PCL is 1.8.1 installed by building its source. So I wonder which version of your PCL is.

yanliang-wang commented 3 years ago

Hi, this error may also result from the version of libpointmatcher. My version of libpointmatcher is 1.3.1. Which version of libpointmatcher are you using?

gogojjh commented 3 years ago

Hi wang, sorry for my late response. This error seems to happen in compiling function of vtk (the Visualization Toolkit Files). It is not the PCL issue. I suggest you check the VTK problem. About the version of libpointmatcher, I used the V1.3.0 (https://github.com/ethz-asl/libpointmatcher/releases/tag/1.3.0).

yanliang-wang commented 3 years ago

Hi wang, sorry for my late response. This error seems to happen in compiling function of vtk (the Visualization Toolkit Files). It is not the PCL issue. I suggest you check the VTK problem. About the version of libpointmatcher, I used the V1.3.0 (https://github.com/ethz-asl/libpointmatcher/releases/tag/1.3.0).

Thank you for your reply. I fixed the issue by recompiling VTK7.1.1 and PCL1.8.1.

yanliang-wang commented 3 years ago

Hi wang, sorry for my late response. This error seems to happen in compiling function of vtk (the Visualization Toolkit Files). It is not the PCL issue. I suggest you check the VTK problem. About the version of libpointmatcher, I used the V1.3.0 (https://github.com/ethz-asl/libpointmatcher/releases/tag/1.3.0).

Thank you for your reply. I fixed the issue by recompiling VTK7.1.1 and PCL1.8.1.

Recently, I ran into this problem again. Now I think the real reason should be that I had two different versions of PCL, which was installed by source and apt respectively. Finally, I sloved the problem by removing the version installed by source. And I reproduced the project in my simulation experiment successfully, which had a good performance.

A good job!

gogojjh commented 3 years ago

Hi wang, sorry for my late response. This error seems to happen in compiling function of vtk (the Visualization Toolkit Files). It is not the PCL issue. I suggest you check the VTK problem. About the version of libpointmatcher, I used the V1.3.0 (https://github.com/ethz-asl/libpointmatcher/releases/tag/1.3.0).

Thank you for your reply. I fixed the issue by recompiling VTK7.1.1 and PCL1.8.1.

Recently, I ran into this problem again. Now I think the real reason should be that I had two different versions of PCL, which was installed by source and apt respectively. Finally, I sloved the problem by removing the version installed by source. And I reproduced the project in my simulation experiment successfully, which had a good performance.

A good job!

Hi wang, thanks for your interest. If you find that project is helpful, I encourage you to keep going and solve more challenging problems. If you are interested in multi-LiDAR fusion, you can have a look at my latest journal work: https://github.com/gogojjh/M-LOAM, thanks.