kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.5k stars 513 forks source link

build problem with dependencies Boost #311

Closed kezakool closed 3 years ago

kezakool commented 3 years ago

Hi,

thx for all your work! :)

i'm setting my env on ubuntu 20.04 and struggling in the cmake step.

first i've installed all dependencies without error sudo apt-get install build-essential libboost-all-dev cmake zlib1g-dev libbz2-dev liblzma-dev

then this is ok to : wget -O - https://kheafield.com/code/kenlm.tar.gz |tar xz mkdir kenlm/build cd kenlm/build

and during the cmake step i'm getting this error :

/projets/fluencylm/kenlm/build$ cmake .. -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /bin/cc -- Check for working C compiler: /bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /bin/c++ -- Check for working CXX compiler: /bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Boost: /lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.41.0") found components: program_options system thread unit_test_framework -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") -- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.8") -- Looking for BZ2_bzCompressInit -- Looking for BZ2_bzCompressInit - found -- Looking for lzma_auto_decoder in /usr/lib/x86_64-linux-gnu/liblzma.so -- Looking for lzma_auto_decoder in /usr/lib/x86_64-linux-gnu/liblzma.so - found -- Looking for lzma_easy_encoder in /usr/lib/x86_64-linux-gnu/liblzma.so -- Looking for lzma_easy_encoder in /usr/lib/x86_64-linux-gnu/liblzma.so - found -- Looking for lzma_lzma_preset in /usr/lib/x86_64-linux-gnu/liblzma.so -- Looking for lzma_lzma_preset in /usr/lib/x86_64-linux-gnu/liblzma.so - found -- Found LibLZMA: /usr/lib/x86_64-linux-gnu/liblzma.so (found version "5.2.4") -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5")
-- Configuring done CMake Error in util/CMakeLists.txt: Imported target "Boost::program_options" includes non-existent path

"/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

CMake Error in util/CMakeLists.txt: Imported target "Boost::program_options" includes non-existent path

"/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

the i need to build the arpa file so the query oly build (which work) is not enough, do you have any idea the issue?

thx

kezakool commented 3 years ago

I solved my case! XD

the boosting package found was not the right one, solved with :

sudo rm -rf /usr/lib/x86_64-linux-gnu//usr/lib/x86_64-linux-gnu/boost sudo rm -rf /usr/lib/x86_64-linux-gnu//usr/lib/x86_64-linux-gnu/Boost

be sure that it use the one installed in /usr/local/lib

apoca909 commented 3 years ago

I solved my case! XD

the boosting package found was not the right one, solved with :

sudo rm -rf /usr/lib/x86_64-linux-gnu//usr/lib/x86_64-linux-gnu/boost sudo rm -rf /usr/lib/x86_64-linux-gnu//usr/lib/x86_64-linux-gnu/Boost

be sure that it use the one installed in /usr/local/lib

same likes, rm -rf /usr/lib/x86_64-linux-gnu/cmake/*

chirico85 commented 2 years ago

@kezakool and @apoca909 Wow... I spent several hours looking for a solution and your indication probably saved me some more hours. Thank you!