-
Notifications
You must be signed in to change notification settings - Fork 795
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
libmetis-gtsam issue #380
Comments
@CrazyPopLin Hmm that is odd indeed. I got
Please let us know if the following doesn't work for you. (Let's make sure we get OdometryExample working by itself before we try linking it with ROS catkin packages) Also I do not think you need the following:
And you should be linking Also consider populating the arguments for |
hi @acxz ,thanks for your reply. I did just like the quick start but installed the gtsam a self-defined path, so this time the pure CMakeLists.txt (without ROS env) like below: project(test_gtsam)
cmake_minimum_required(VERSION 2.8)
### GTSAM
set(GTSAM_DIR /home/lin/develop/3rd/gtsam/install/lib/cmake/GTSAM)
find_package(GTSAM)
if(GTSAM_FOUND)
message(STATUS "Found GTSAM ${GTSAM_VERSION}")
else()
message(STATUS "GTSAM Not Found")
endif()
include_directories(${GTSAM_INCLUDE_DIR})
add_executable(OdometryExample OdometryExample.cpp)
target_link_libraries(OdometryExample gtsam) Same issue occurred. Maybe I used Ubuntu 20.04, because this system not tested according Important Installation Notes? |
Can you give the exact commands you followed? Without them I am afraid I cannot reproduce your situation and therefore have limited knowledge in helping you.
That list sort of outdated anyways tbh. I'm running on Arch Linux with GCC 10.1.0. People that I know use GTSAM on Ubuntu 20.04 as well so it is not a system issue. Also just to make sure, that local install is the only installation of GTSAM you have on your system right? If not can you ensure that. |
The install commands shown below: $ cd <my_path>/
$ git clone https://github.com/borglab/gtsam
$ cd gtsam
$ mkdir build && mkdir install
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=<my_path>/gtsam/install ..
$ make check
$ install The gtsam test project build steps are just like your suggestion. |
And how did you compile your own project? |
Weird those instructions shouldn't even compile your project if GTSAM is installed locally. After installing GTSAM to a local directory, I built my project with the following commands:
and just to iterate, where I installed GTSAM locally as follows after cloning:
With these steps I still do not receive the libmetis-gtsam issue. |
Build gtsam$ cd
$ mkdir local
$ cd local
$ git clone https://github.com/borglab/gtsam
$ cd gtsam
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/local
$ make install The CMake output for building gtsam:
build projectproject structuretest_gtsam CMakeLists.xtxproject(test_gtsam)
cmake_minimum_required(VERSION 2.8)
set(GTSAM_DIR /home/lin/local/lib/cmake/GTSAM)
find_package(GTSAM)
if(GTSAM_FOUND)
message(STATUS "Found GTSAM ${GTSAM_VERSION}")
else()
message(STATUS "GTSAM Not Found")
endif()
include_directories(${GTSAM_INCLUDE_DIR})
add_executable(OdometryExample OdometryExample.cpp)
target_link_libraries(OdometryExample gtsam) build project$ cd /home/lin/develop/dev/test_gtsam/build
$ cmake ..
$ make
$ ./OdometryExample issue
|
Before this is dealt with you can always use LD_LIBRARY_PATH to get going. |
Hi @ProfFan , could you be more specific? |
@CrazyPopLin followed your steps command by command (except replacing Can you give us the output of As well as the contents of It would be much appreciated if you can post your file as a gist or as a dropdown element in the issue comment. |
ls ~/local/lib
install_manifest.txtplease check here. Thanks. |
I used the same build steps to install gtsam and build project in Jetson TX2 with jetpack 4.4.2(Ubuntu 18.04), got same error; |
@CrazyPopLin I mean you can add |
@CrazyPopLin so it seems like that Glad to hear it's working on Ubuntu 16, but still very weird that it is not working for you on 18 or 20. Can you change your CMakeLists.txt as follows and post the output, noting the new
I get the following output:
|
@ProfFan ,thanks.
|
Thanks ! Will close for now |
I am puzzled but out of ideas. Nevetheless, glad to hear you got it working, and I hope you enjoy using GTSAM! |
Same issue when upgrading ROS Melodic code from 4.0.2 to 4.0.3 on Ubuntu 18.04. ROS code compiled correctly however at runtime gave error: Adding Thank you for the solution. |
Perhaps ldconfig should be called after installing gtsam. See https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-ldconfig |
Thank you this fixed the problem. |
This is a packaging bug. |
ldconfig should not be necessary, and LD_LIBRARY_PATH is a no no for portability There's clearly a lot missing in the generated GTSAMConfig.cmake and GTSAM-exports.cmake When installed to a custom path( which is usually the PREFERED way to build and link against a thirdparty project from source), the libgtsam.so is unable to find libmetis-gtsam.so (as seen by AFAIK, either the old fashioned way, define GTSAM_LIBRARIES and GTSAM_LIBRARY_DIR, or the modern way, define cmake targets with correct dependencies... Correct me if I'm wrong I'm no cmake expert... |
When I try to fix this by creating a libgtsam4.triggers file in the debian directory:
I get the following cryptic lintian error when packaging: For now I will not include the ldconfig trigger also because it is not clear if it is still needed with the new package that uses the system-provided libmetis. |
For the records:
So good to see progress on #292 ! |
This is because you have multiple versions of GTSAM installed in different locations. Please search and remove them. |
Thanks a lot ! Indeed that was the problem. |
Under 20.04 and GTSAM 4.2.0 following solved it for me: |
I see that even the issue is closed, users encounter it from time to time.
Then, the installed library will have the RUNPATH property (I set CMAKE_INSTALL_PREFIX to /tmp/install):
If this doesn't work, sometimes Maybe it should be added by |
This works: |
Hi, I am in Ubuntu 20.04 and built gtsam follow the quick start and build the github branch successfully with a install path.
Then I try to build the OdometryExample.cpp with cmake(with ROS but plain gtsam). The CMakeLists.txt is shown below. The build was successfully, too.
Then I run the executable, got the error:
Any suggestions? Thank you so much!
The text was updated successfully, but these errors were encountered: