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

can not include mrpt library #25

Open
ghost opened this issue Apr 24, 2020 · 3 comments
Open

can not include mrpt library #25

ghost opened this issue Apr 24, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 24, 2020

Hi!
I try to use autocalib-sensor-extrinsics project.

First, I built mrpt (from master branch) at my home directory (/hone/username/mrpt/build)
(mrpt build was complete!)

Second, I try to build autocalib-sensor-extrinsics follow your build command at my home directory

git clone https://github.com/karnikram/autocalib-sensor-extrinsics
cd autocalib-sensor-extrinsics
mkdir build && cd build
cmake ..
make
./gui/autocalib-sensor-extrinsics 

But, at make step, the error is occured

Scanning dependencies of target core
[  3%] Building CXX object core/CMakeFiles/core.dir/CObservationTree.cpp.o
In file included from /home/jinho-sesol/auto_calib/autocalib-sensor-extrinsics/core/CObservationTree.h:3:0,
                 from /home/jinho-sesol/auto_calib/autocalib-sensor-extrinsics/core/CObservationTree.cpp:1:
/home/jinho-sesol/auto_calib/autocalib-sensor-extrinsics/core/Utils.h:6:10: fatal error: mrpt/img/TCamera.h: No such file or directory
 #include <mrpt/img/TCamera.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
core/CMakeFiles/core.dir/build.make:62: recipe for target 'core/CMakeFiles/core.dir/CObservationTree.cpp.o' failed
make[2]: *** [core/CMakeFiles/core.dir/CObservationTree.cpp.o] Error 1
CMakeFiles/Makefile2:140: recipe for target 'core/CMakeFiles/core.dir/all' failed
make[1]: *** [core/CMakeFiles/core.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Even though mrpt build was complete, It seems to not find mrpt libs and some files.
How can I fix this problem?

@karnikram
Copy link
Owner

Hi,

Thank you for your interest in this project. It appears that CMake was unable to locate the MRPT library files. After building MRPT, did you run make install? That is required to install the library files to the /usr/local space, from where CMake should automatically be able to pick it up.

Else, modify this line to find_package(MRPT COMPONENTS obs serialization rtti maps gui pbmap QUIET PATHS "/your/mrpt/build/path")

Let me know if this helps. But please also note that this app in its current state doesn't give good results and needs more fixing.

@ghost
Copy link
Author

ghost commented Apr 28, 2020

Thanks for your reply.

I do 'make install' and I check there are some file about mrpt where /usr/local/include and /usr/local/lib.

Also, I modified that line to
find_package(MRPT COMPONENTS obs serialization rtti maps gui pbmap QUIET PATHS "/home/mrpt/build") but same error is occured.

++ I have some question. I'm using virtual environment with anaconda. If I compile this project in virtual env, then cmake can not detect library files in /usr/local ?

(++ thank you for making this project. I hope you will complete this!!!)

@karnikram
Copy link
Owner

Hi,

If adding PATHS did not work you can instead pass your build directory as an argument to cmake as follows,
cmake .. -DCMAKE_PREFIX_PATH=/home/karnik/tools/mrpt/build

With this, cmake will be able to find mrpt irrespective of how your conda environment is configured. However I'm afraid the project still might not build completely due to changes in the dependency sources that this project hasn't been updated for.

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

1 participant