Closed haohaoalt closed 7 months ago
源码编译后安装成功了4.1.1 但还有报错
process[test_gtsam_testGtsam-2]: started with pid [64835]
/home/hayden/dev/0221_ws/devel/lib/test_gtsam/test_gtsam_testGtsam: Symbol `_ZTVN5gtsam6FactorE' has different size in shared object, consider re-linking
/home/hayden/dev/0221_ws/devel/lib/test_gtsam/test_gtsam_testGtsam: Symbol `_ZTVN5gtsam20NonlinearFactorGraphE' has different size in shared object, consider re-linking
/home/hayden/dev/0221_ws/devel/lib/test_gtsam/test_gtsam_testGtsam: Symbol `_ZTVN5gtsam16NoiseModelFactorE' has different size in shared object, consider re-linking
[ INFO] [1708501184.276228144]: ----> testGtsam Started.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[test_gtsam_testGtsam-2] process has died [pid 64835, exit code -6, cmd /home/hayden/dev/0221_ws/devel/lib/test_gtsam/test_gtsam_testGtsam __name:=test_gtsam_testGtsam __log:=/home/hayden/.ros/log/611a0d84-d08c-11ee-8fca-4739f33cd47f/test_gtsam_testGtsam-2.log].
log file: /home/hayden/.ros/log/611a0d84-d08c-11ee-8fca-4739f33cd47f/test_gtsam_testGtsam-2*.log
[test_gtsam_testGtsam-2] restarting process
@haohaoalt 清理你的构建目录,并重新构建整个项目。我用的gtsam是2023年七月的版本,是4.0
@haohaoalt 清理你的构建目录,并重新构建整个项目。我用的gtsam是2023年七月的版本,是4.0
最终成功了,可能的原因在安装gtsam时eigen版本选择
从/home/hayden/app/gtsam-4.2a9/CMakeLists.txt
找到/home/hayden/app/gtsam-4.2a9/cmake/HandleEigen.cmake
修改
option(GTSAM_USE_SYSTEM_EIGEN "Find and use system-installed Eigen. If 'off', use the one bundled with GTSAM" ON)
然后
cmake ..
make
make install
安装成功gtsam-4.2a9版本,之前遇到的报错都没了
@zhao-zhibo eigen确定经常冲突,之前我也遇到过类似的问题,Eigen官方明确说明在一台设备上只安装一个版本的eigen。
终端部分报错