Giter Site home page Giter Site logo

compiling error about ctranslate HOT 7 CLOSED

opennmt avatar opennmt commented on June 14, 2024
compiling error

from ctranslate.

Comments (7)

guillaumekln avatar guillaumekln commented on June 14, 2024

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

from ctranslate.

wsnooker avatar wsnooker commented on June 14, 2024

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.

from ctranslate.

wsnooker avatar wsnooker commented on June 14, 2024

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

from ctranslate.

guillaumekln avatar guillaumekln commented on June 14, 2024

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

from ctranslate.

wsnooker avatar wsnooker commented on June 14, 2024

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?

from ctranslate.

guillaumekln avatar guillaumekln commented on June 14, 2024

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.

from ctranslate.

wsnooker avatar wsnooker commented on June 14, 2024

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.

from ctranslate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.