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

Failed build due to GTSAM #2

Open
cmakelabs opened this issue Oct 26, 2024 · 1 comment
Open

Failed build due to GTSAM #2

cmakelabs opened this issue Oct 26, 2024 · 1 comment

Comments

@cmakelabs
Copy link

Thank you for sharing, I am trying to build Leg-Kilo, however I encountered this issue:


Errors  /usr/bin/ld: CMakeFiles/legkilo_mapOptmization.dir/src/mapOptmization_node.cpp.o:(.data.rel.ro._ZTVN5gtsam17NoiseModelFactorNIJNS_5Pose3ES1_EEE[_ZTVN5gtsam17NoiseModelFactorNIJNS_5Pose3ES1_EEE]+0x20): undefined reference to `gtsam::NonlinearFactor::error(gtsam::HybridValues const&) const'
/usr/bin/ld: CMakeFiles/legkilo_mapOptmization.dir/src/mapOptmization_node.cpp.o:(.data.rel.ro._ZTVN5gtsam13BetweenFactorINS_5Pose3EEE[_ZTVN5gtsam13BetweenFactorINS_5Pose3EEE]+0x20): undefined reference to `gtsam::NonlinearFactor::error(gtsam::HybridValues const&) const'
/usr/bin/ld: CMakeFiles/legkilo_mapOptmization.dir/src/mapOptmization_node.cpp.o:(.data.rel.ro._ZTVN5gtsam17NoiseModelFactorNIJNS_5Pose3EEEE[_ZTVN5gtsam17NoiseModelFactorNIJNS_5Pose3EEEE]+0x20): undefined reference to `gtsam::NonlinearFactor::error(gtsam::HybridValues const&) const'
/usr/bin/ld: CMakeFiles/legkilo_mapOptmization.dir/src/mapOptmization_node.cpp.o:(.data.rel.ro._ZTVN5gtsam11PriorFactorINS_5Pose3EEE[_ZTVN5gtsam11PriorFactorINS_5Pose3EEE]+0x20): undefined reference to `gtsam::NonlinearFactor::error(gtsam::HybridValues const&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/legkilo_mapOptmization.dir/build.make:501: /home/user/Leg-KILO/devel/.private/legkilo/lib/legkilo/legkilo_mapOptmization] Error 1
make[1]: *** [CMakeFiles/Makefile2:2594: CMakeFiles/legkilo_mapOptmization.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I would like to note, that I have installed gtsam exactly as recommended in the README, and I got this at the end of the installation:

sudo apt install libgtsam-dev libgtsam-unstable-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libgtsam-dev is already the newest version (4.0.3-1ubuntu1).
libgtsam-unstable-dev is already the newest version (4.0.3-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 274 not upgraded.

You guidance is highly appreciated

@ouguangjun
Copy link
Owner

Thank you very much for your attention. legkilo's compilation environment is basically the same as liosam, and gtsam is the main cause of compilation errors. You can refer to the liosam issue. The most direct way is to delete the original Gtsam in the system file and recompile it, or download the gtsam source code and recompile it yourself. At present, I am busy looking for a job and have no time to manage the project. In the future, I plan to rewrite and optimize the algorithm to reduce the compilation problems. Thanks again for your attention.

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