neubig / travatar

This is a repository for the Travatar forest-to-string translation decoder
GNU Lesser General Public License v3.0
28 stars 11 forks source link

Boost issue while running make #40

Closed chaitanyamalaviya closed 6 years ago

chaitanyamalaviya commented 6 years ago

Hi, I was trying to install travatar, but have been facing the following issue. I installed boost through conda and the version is 1.61.0. Do you know what the issue might be? I'm already specifying LD_LIBRARY_PATH to the boost libraries.

Thanks a lot!

Making all in src
make[1]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src'
Making all in liblbfgs
make[2]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src/liblbfgs'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src/liblbfgs'
Making all in marisa
make[2]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src/marisa'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src/marisa'
Making all in tercpp
make[2]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src/tercpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src/tercpp'
Making all in kenlm
make[2]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src/kenlm'
Making all in util
make[3]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src/kenlm/util'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src/kenlm/util'
Making all in lm
make[3]: Entering directory `/projects/tir1/users/cmalaviy/travatar/src/kenlm/lm'
/bin/sh ../../../libtool  --tag=CXX   --mode=link g++ -g -O3 -Wall -DKENLM_MAX_ORDER=6 -W -Wall -Wno-sign-compare  -I./.. -pthread -I/usr/include -g -O2   -o query query_main.o libklm.la ../util/libklm_util.la -lz -L/usr/lib64 -lboost_program_options-mt -lboost_thread-mt -lboost_system -lpthread -lrt 
libtool: link: g++ -g -O3 -Wall -DKENLM_MAX_ORDER=6 -W -Wall -Wno-sign-compare -I./.. -pthread -I/usr/include -g -O2 -o .libs/query query_main.o  ./.libs/libklm.so ../util/.libs/libklm_util.so -lz -L/usr/lib64 -lboost_program_options-mt -lboost_thread-mt -lboost_system -lpthread -lrt -pthread -Wl,-rpath -Wl,/usr/local/lib
./.libs/libklm.so: undefined reference to `boost::thread::start_thread_noexcept()'
../util/.libs/libklm_util.so: undefined reference to `boost::thread::join_noexcept()'
./.libs/libklm.so: undefined reference to `boost::system::system_category()'
./.libs/libklm.so: undefined reference to `boost::system::generic_category()'
collect2: error: ld returned 1 exit status
make[3]: *** [query] Error 1
make[3]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src/kenlm/lm'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src/kenlm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/projects/tir1/users/cmalaviy/travatar/src'
make: *** [all-recursive] Error 1
neubig commented 6 years ago

This is probably because you have two versions of boost on your system and it's finding one when compiling then one when linking. I'd suggest not install boost through conda, and just using the system boost.

chaitanyamalaviya commented 6 years ago

Your diagnosis seems right. However, the system boost (1.41) is much older than the minimum version required by travatar (1.49). Do you know how I could make travatar look for the conda boost both when compiling and linking?

neubig commented 6 years ago

You're on tir, right? Please use singularity. I've installed boost and confirmed the version is 1.58.

chaitanyamalaviya commented 6 years ago

Yes, that should work then. Thanks!