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

编译报错 #2

Open
isqjsnao opened this issue Mar 19, 2024 · 4 comments
Open

编译报错 #2

isqjsnao opened this issue Mar 19, 2024 · 4 comments

Comments

@isqjsnao
Copy link

CMakeFiles/all_tests.dir/evaluation-test.cc.o:在函数‘EvaluationTest_Simple_Test::TestBody()’中:
evaluation-test.cc:(.text+0x2d0):对‘teaser::SolutionEvaluator::SolutionEvaluator(Eigen::Matrix<double, 3, -1, 0, 3, -1> const&, Eigen::Matrix<double, 3, -1, 0, 3, -1> const&, double)’未定义的引用
evaluation-test.cc:(.text+0x371):对‘teaser::SolutionEvaluator::computeErrorMetric(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)’未定义的引用
evaluation-test.cc:(.text+0x43a):对‘teaser::SolutionEvaluator::~SolutionEvaluator()’未定义的引用
CMakeFiles/all_tests.dir/evaluation-test.cc.o:在函数‘EvaluationTest_Simple_Test::TestBody() [clone .cold]’中:
evaluation-test.cc:(.text.unlikely+0xb9):对‘teaser::SolutionEvaluator::~SolutionEvaluator()’未定义的引用
collect2: error: ld returned 1 exit status
test/teaser/CMakeFiles/all_tests.dir/build.make:296: recipe for target 'test/teaser/all_tests' failed
make[2]: *** [test/teaser/all_tests] Error 1
CMakeFiles/Makefile2:579: recipe for target 'test/teaser/CMakeFiles/all_tests.dir/all' failed
make[1]: *** [test/teaser/CMakeFiles/all_tests.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2

您好,在编译teaser++过程中报错如上,请问如何解决呀

@NudtCalculus
Copy link
Owner

我在Ubuntu18.04上没有遇到过这个问题,你或许可以参考NeBula-Autonomy/LAMP#20.
@isqjsnao

@isqjsnao
Copy link
Author

我在Ubuntu18.04上没有遇到过这个问题,你或许可以参考NeBula-Autonomy/LAMP#20. @isqjsnao

谢谢您,问题已经解决。但是今天在我编译你的代码的时候又报错如下opencv问题,请问opencv版本需要4.0吗,我现在是3版本,但是原版lvi-sam我可以运行成功。
CMake Error at LVI-SAM-modified/CMakeLists.txt:43 (find_package):
Could not find a configuration file for package "OpenCV" that is compatible
with requested version "4".

The following configuration files were considered but not accepted:

/usr/share/OpenCV/OpenCVConfig.cmake, version: 3.2.0

-- Configuring incomplete, errors occurred!
See also "/home/zyp/LVI_SAM_plus/build/CMakeFiles/CMakeOutput.log".
See also "/home/zyp/LVI_SAM_plus/build/CMakeFiles/CMakeError.log".

@isqjsnao
Copy link
Author

我在Ubuntu18.04上没有遇到过这个问题,你或许可以参考NeBula-Autonomy/LAMP#20. @isqjsnao

谢谢您,问题已经解决。但是今天在我编译你的代码的时候又报错如下opencv问题,请问opencv版本需要4.0吗,我现在是3版本,但是原版lvi-sam我可以运行成功。 CMake Error at LVI-SAM-modified/CMakeLists.txt:43 (find_package): Could not find a configuration file for package "OpenCV" that is compatible with requested version "4".

The following configuration files were considered but not accepted:

/usr/share/OpenCV/OpenCVConfig.cmake, version: 3.2.0

-- Configuring incomplete, errors occurred! See also "/home/zyp/LVI_SAM_plus/build/CMakeFiles/CMakeOutput.log". See also "/home/zyp/LVI_SAM_plus/build/CMakeFiles/CMakeError.log".

刚刚这个问题我已经解决,把cmakelists文件中的opnecv改成了3版本,编译成功了。但是我运行ros launch lvi_sam run.launch文件报错如下:[lvi_sam_mapOptmization-8] process has died [pid 13543, exit code 127, cmd /home/zyp/LVI_plus01/devel/lib/lvi_sam/lvi_sam_mapOptmization __name:=lvi_sam_mapOptmization __log:=/home/zyp/.ros/log/7eca333a-e654-11ee-9dcf-6c24085b729f/lvi_sam_mapOptmization-8.log].
log file: /home/zyp/.ros/log/7eca333a-e654-11ee-9dcf-6c24085b729f/lvi_sam_mapOptmization-8*.log
[lvi_sam_visual_feature-9] process has died [pid 13535, exit code -11, cmd /home/zyp/LVI_plus01/devel/lib/lvi_sam/lvi_sam_visual_feature __name:=lvi_sam_visual_feature __log:=/home/zyp/.ros/log/7eca333a-e654-11ee-9dcf-6c24085b729f/lvi_sam_visual_feature-9.log].
log file: /home/zyp/.ros/log/7eca333a-e654-11ee-9dcf-6c24085b729f/lvi_sam_visual_feature-9*.log。这该如何解决

@NudtCalculus
Copy link
Owner

@isqjsnao
你可以将[https://github.com/NudtCalculus/LVI-SAM-modified/blob/dd6fe966206ec733c51e8f9b1b9db5e88f42632d/CMakeLists.txt#L13] 修改为"RelWithDebInfo“或者"Debug"进行调试,寻找报错的代码段。如果你使用的是Ubuntu20.04,可以参考 [https://github.com/NeSC-IV/LVI-SAM-Easyused] 。如果使用OpenCV4编译需要将所有#include <opencv/cv.h>更改为<opencv2/opencv.hpp>( [https://github.com/NeSC-IV/LVI-SAM-Easyused] ),同时需要编译与OpenCV4适配的cv_bridge,否则cv::FileStorage会出错。

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

2 participants