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

How to build it in ubuntu16.04? #1

Open
lsongseven opened this issue Nov 23, 2018 · 6 comments
Open

How to build it in ubuntu16.04? #1

lsongseven opened this issue Nov 23, 2018 · 6 comments

Comments

@lsongseven
Copy link

Could you please specify how to build it in ubuntu16.04 or explain the steps? Googled a lot but still cannot build it.

@MattClarkson
Copy link
Member

Did you try cmake?

@lsongseven
Copy link
Author

lsongseven commented Nov 23, 2018 via email

@jackm
Copy link

jackm commented Jan 2, 2019

Just to clarify, is this the correct way to build the package?

Starting at the repository root directory:

cd cmake
cmake ..

Do I need to run make as well? When I try to do that, I get the following error:

Scanning dependencies of target apriltags
[  6%] Building CXX object CMakeFiles/apriltags.dir/src/FloatImage.cc.o
[ 13%] Building CXX object CMakeFiles/apriltags.dir/src/Quad.cc.o
/home/user/apriltags/src/Quad.cc:1:23: fatal error: Eigen/Dense: No such file or directory
compilation terminated.
CMakeFiles/apriltags.dir/build.make:86: recipe for target 'CMakeFiles/apriltags.dir/src/Quad.cc.o' failed
make[2]: *** [CMakeFiles/apriltags.dir/src/Quad.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/apriltags.dir/all' failed
make[1]: *** [CMakeFiles/apriltags.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I get the same error if I try to run make from the repo root directory as well.

@MattClarkson
Copy link
Member

No. You should not build within the source folder. Given you have

/home/user/apriltags/src/

I suggest you delete it and reclone the src repository to make sure it is clean. Then,

mkdir /home/user/apriltags/build
cd /home/user/apriltags/build
ccmake ../src

set whichever options you need, but probably leave default. Then generate.
Then compile with

make

If you are unsure of CMake try stuff like: https://cliutils.gitlab.io/modern-cmake/chapters/intro/running.html

@jackm
Copy link

jackm commented Jan 3, 2019

Still no good. I believe that cmake is not finding or was not given the eigen3 library include directory. On my system running Ubuntu 16.04.5 LTS, the eigen library is found at /usr/include/eigen3/.

A quick hack was to add the line set(Eigen_DIR "/usr/include/eigen3/") to the root CMakeLists.txt before the first configure_file() line. After this, I was able to compile everything using make without errors.

Could you please update the main README to include build steps?

@onlineth
Copy link

onlineth commented Mar 1, 2020

This should definitely be added, thank you @jackm

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

4 participants