Hi all. I am trying to compile KenLM using an anaconda environment but compilation fails for target "bin/probing_hash_table_benchmark due to undefined reference to memcpy@GLIBC_2.14"error.
I am trying to compile both git KenLM and the KenLM from the official documentation.
When I run cmake .. and make -j 4 commands a get the following outputs, respectively:
CMake Warning at /usr/local/lib/cmake/boost_program_options-1.72.0/libboost_program_options-variant-x64-shared.cmake:64 (message):
Target Boost::program_options already has an imported location
'/usr/local/lib/libboost_program_options-mt-x64.so.1.72.0', which will be
overwritten with '/usr/local/lib/libboost_program_options-x64.so.1.72.0'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_program_options-1.72.0/boost_program_options-config.cmake:57 (include)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
/usr/local/share/cmake-3.10/Modules/FindBoost.cmake:242 (find_package)
CMakeLists.txt:85 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_system-1.72.0/libboost_system-variant-x64-shared.cmake:64 (message):
Target Boost::system already has an imported location
'/usr/local/lib/libboost_system-mt-x64.so.1.72.0', which will be
overwritten with '/usr/local/lib/libboost_system-x64.so.1.72.0'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_system-1.72.0/boost_system-config.cmake:57 (include)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
/usr/local/share/cmake-3.10/Modules/FindBoost.cmake:242 (find_package)
CMakeLists.txt:85 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_unit_test_framework-1.72.0/libboost_unit_test_framework-variant-x64-shared.cmake:64 (message):
Target Boost::unit_test_framework already has an imported location
'/usr/local/lib/libboost_unit_test_framework-mt-x64.so.1.72.0', which will
be overwritten with
'/usr/local/lib/libboost_unit_test_framework-x64.so.1.72.0'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_unit_test_framework-1.72.0/boost_unit_test_framework-config.cmake:57 (include)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package)
/usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
/usr/local/share/cmake-3.10/Modules/FindBoost.cmake:242 (find_package)
CMakeLists.txt:85 (find_package)
-- Boost 1.41.0 found.
-- Found Boost components:
program_options;system;thread;unit_test_framework
-- Configuring done
-- Generating done
-- Build files have been written to: /home/christina/Downloads/kenlm/build
32%] Built target kenlm_util
[ 33%] Linking CXX executable ../bin/probing_hash_table_benchmark
[ 37%] Built target kenlm_filter
[ 58%] Built target kenlm
[ 60%] Built target fragment
[ 62%] Built target query
[ 64%] Built target build_binary
/home/christina/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libboost_thread-mt-x64.so.1.72.0: undefined reference to `memcpy@GLIBC_2.14'
collect2: error: ld returned 1 exit status
util/CMakeFiles/probing_hash_table_benchmark.dir/build.make:102: recipe for target 'bin/probing_hash_table_benchmark' failed
make[2]: *** [bin/probing_hash_table_benchmark] Error 1
CMakeFiles/Makefile2:129: recipe for target 'util/CMakeFiles/probing_hash_table_benchmark.dir/all' failed
make[1]: *** [util/CMakeFiles/probing_hash_table_benchmark.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 65%] Linking CXX executable ../../bin/filter
[ 66%] Linking CXX executable ../bin/kenlm_benchmark
[ 73%] Built target kenlm_builder
/home/christina/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libboost_thread-mt-x64.so.1.72.0: undefined reference to `memcpy@GLIBC_2.14'
collect2: error: ld returned 1 exit status
lm/filter/CMakeFiles/filter.dir/build.make:104: recipe for target 'bin/filter' failed
make[2]: *** [bin/filter] Error 1
CMakeFiles/Makefile2:608: recipe for target 'lm/filter/CMakeFiles/filter.dir/all' failed
make[1]: *** [lm/filter/CMakeFiles/filter.dir/all] Error 2
/home/christina/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/local/lib/libboost_program_options-x64.so.1.72.0: undefined reference to `memcpy@GLIBC_2.14'
collect2: error: ld returned 1 exit status
lm/CMakeFiles/kenlm_benchmark.dir/build.make:103: recipe for target 'bin/kenlm_benchmark' failed
make[2]: *** [bin/kenlm_benchmark] Error 1
CMakeFiles/Makefile2:391: recipe for target 'lm/CMakeFiles/kenlm_benchmark.dir/all' failed
make[1]: *** [lm/CMakeFiles/kenlm_benchmark.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Hi all. I am trying to compile KenLM using an anaconda environment but compilation fails for target
"bin/probing_hash_table_benchmark due to undefined reference to memcpy@GLIBC_2.14"
error. I am trying to compile both git KenLM and the KenLM from the official documentation. When I runcmake ..
andmake -j 4
commands a get the following outputs, respectively:My anaconda install is as follows:
Originally posted by @christina-tzogka in https://github.com/kpu/kenlm/issues/218#issuecomment-880671775