Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

compiling error #5

Closed
wsnooker opened this issue Jan 19, 2017 · 7 comments
Closed

compiling error #5

wsnooker opened this issue Jan 19, 2017 · 7 comments

Comments

@wsnooker
Copy link

I installed boost but also an error occured in compiling, as follows:

cmake -DEIGEN_ROOT=../../eigen-3.3.1/ -DBOOST_ROOT=/usr/include/boost/ ..
-- Boost version: 1.54.0
-- Could NOT find Boost
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ww110750/CTranslate/build

@guillaumekln
Copy link
Collaborator

guillaumekln commented Jan 19, 2017

Did you install boost system-wide? If so, you don't need to set -DBOOST_ROOT.

@wsnooker
Copy link
Author

I did it system-wide, and the error existed anyway. But how to check where boost used in CTranslate or Makefile? A little hard unix problem maybe.

@wsnooker
Copy link
Author

I reinstalled libboost, sudo apt-get install libboost-all-dev. The boost maybe found by cmake, but the output libonmt.so & cli/translate were not generated.

Command & cmake info as follows:

root@35f78adae197:/home/ww110750/CTranslate/build# cmake -DEIGEN_ROOT=../../eigen-3.3.1/ ..
-- Boost version: 1.54.0
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ww110750/CTranslate/build

@guillaumekln
Copy link
Collaborator

Oh, you need to run make. I will add that to the README.

@wsnooker
Copy link
Author

wsnooker commented Jan 20, 2017

make failed, command & log as follows:

cmake -DEIGEN_ROOT=../../eigen-3.3.1/ ..
make

[ 21%] Built target TH
Scanning dependencies of target onmt
[ 28%] Building CXX object CMakeFiles/onmt.dir/src/th/Env.cc.o
[ 35%] Building CXX object CMakeFiles/onmt.dir/src/th/Obj.cc.o
[ 42%] Building CXX object CMakeFiles/onmt.dir/src/th/Utils.cc.o
[ 50%] Building CXX object CMakeFiles/onmt.dir/src/Dictionary.cc.o
[ 57%] Building CXX object CMakeFiles/onmt.dir/src/PhraseTable.cc.o
[ 64%] Building CXX object CMakeFiles/onmt.dir/src/TranslatorFactory.cc.o
In file included from /home/ww110750/CTranslate/include/onmt/Translator.h:3:0,
from /home/ww110750/CTranslate/include/onmt/TranslatorFactory.h:5,
from /home/ww110750/CTranslate/src/TranslatorFactory.cc:1:
/home/ww110750/CTranslate/include/onmt/Eigen/MatrixBatch.h:3:23: fatal error: Eigen/Dense: No such file or directory
#include <Eigen/Dense>
^
compilation terminated.
make[2]: *** [CMakeFiles/onmt.dir/src/TranslatorFactory.cc.o] Error 1
make[1]: *** [CMakeFiles/onmt.dir/all] Error 2
make: *** [all] Error 2

It seems that the eigen header files could not be found, but I check the required file exists in Eigen dir:

root@35f78adae197:/home/ww110750/CTranslate/build# ll ../../eigen-3.3.1/Eigen/
total 148
drwxr-xr-x 3 128957 users 4096 Jan 20 01:55 ./
drwxr-xr-x 14 128957 users 4096 Jan 20 02:02 ../
-rw-r--r-- 1 128957 users 694 Dec 6 10:43 CMakeLists.txt
-rw-r--r-- 1 128957 users 1129 Dec 6 10:43 Cholesky
-rw-r--r-- 1 128957 users 1900 Dec 6 10:43 CholmodSupport
-rw-r--r-- 1 128957 users 17339 Dec 6 10:43 Core
-rw-r--r-- 1 128957 users 122 Dec 6 10:43 Dense
-rw-r--r-- 1 128957 users 35 Dec 6 10:43 Eigen
-rw-r--r-- 1 128957 users 1763 Dec 6 10:43 Eigenvalues
-rw-r--r-- 1 128957 users 2050 Dec 6 10:43 Geometry
-rw-r--r-- 1 128957 users 874 Dec 6 10:43 Householder
-rw-r--r-- 1 128957 users 2083 Dec 6 10:43 IterativeLinearSolvers
-rw-r--r-- 1 128957 users 939 Dec 6 10:43 Jacobi
-rw-r--r-- 1 128957 users 1374 Dec 6 10:43 LU
-rw-r--r-- 1 128957 users 991 Dec 6 10:43 MetisSupport
-rw-r--r-- 1 128957 users 2483 Dec 6 10:43 OrderingMethods
-rw-r--r-- 1 128957 users 1676 Dec 6 10:43 PaStiXSupport
-rwxr-xr-x 1 128957 users 1116 Dec 6 10:43 PardisoSupport*
-rw-r--r-- 1 128957 users 1258 Dec 6 10:43 QR
-rw-r--r-- 1 128957 users 930 Dec 6 10:43 QtAlignedMalloc
-rw-r--r-- 1 128957 users 1162 Dec 6 10:43 SPQRSupport
-rw-r--r-- 1 128957 users 1570 Dec 6 10:43 SVD
-rw-r--r-- 1 128957 users 888 Dec 6 10:43 Sparse
-rw-r--r-- 1 128957 users 1371 Dec 6 10:43 SparseCholesky
-rw-r--r-- 1 128957 users 2240 Dec 6 10:43 SparseCore
-rw-r--r-- 1 128957 users 1713 Dec 6 10:43 SparseLU
-rw-r--r-- 1 128957 users 1222 Dec 6 10:43 SparseQR
-rw-r--r-- 1 128957 users 744 Dec 6 10:43 StdDeque
-rw-r--r-- 1 128957 users 677 Dec 6 10:43 StdList
-rw-r--r-- 1 128957 users 750 Dec 6 10:43 StdVector
-rw-r--r-- 1 128957 users 2243 Dec 6 10:43 SuperLUSupport
-rw-r--r-- 1 128957 users 1382 Dec 6 10:43 UmfPackSupport
drwxr-xr-x 27 128957 users 4096 Jan 19 09:22 src/

Are there any misconfiguration in the cmakefile?

@guillaumekln
Copy link
Collaborator

You should follow Eigen installation instructions first. You typically do that in Eigen source directory:

mkdir build && cd build
mkdir -p ~/lib/eigen
cmake -DCMAKE_INSTALL_PREFIX=~/lib/eigen ..
make install

Then you can set -DEIGEN_ROOT=~/lib/eigen when configuring CTranslate.

@wsnooker
Copy link
Author

wsnooker commented Jan 20, 2017

Oh, I followed Method 1. Installing without using CMake, just copy the Eigen header dir and it didn't work.
Now using the CMake installation method, compiling right. Thanks for your kindly help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants