Open shenweiyan opened 1 year ago
I want to install LinearDesign on our computer cluster and encountered similar compilation errors. Is there a way to fix this error?
src/Utils/libraries/LinearDesign_linux64.so: error: undefined reference to 'log', version 'GLIBC_2.29'
collect2: error: ld returned 1 exit status
Try another .so file.
src/beam_cky_parser.cc:977: error: undefined reference to 'func1(std::__cxx11::basic_string<char, std::char_traits
I want to install LinearDesign on our computer cluster and encountered similar compilation errors. Is there a way to fix this error?
src/Utils/libraries/LinearDesign_linux64.so: error: undefined reference to 'log', version 'GLIBC_2.29' collect2: error: ld returned 1 exit status Try another .so file. src/beam_cky_parser.cc:977: error: undefined reference to 'func1(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, signed char)' collect2: error: ld returned 1 exit status Compilation failed! Make sure it is either Linux-64 or Mac.
I want to install LinearDesign on our computer cluster and encountered similar compilation errors. Is there a way to fix this error?
src/Utils/libraries/LinearDesign_linux64.so: error: undefined reference to 'log', version 'GLIBC_2.29' collect2: error: ld returned 1 exit status Try another .so file. src/beam_cky_parser.cc:977: error: undefined reference to 'func1(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, signed char)' collect2: error: ld returned 1 exit status Compilation failed! Make sure it is either Linux-64 or Mac.
maybe you could try to create a new conda env by conda create -n LinearDesign python=2.7
, and load your gcc
I encountered the same problem, my system is rocky8, gcc version is 8.5.0. I used conda to create a new environment, but still prompted an error.
make
Compiling lineardesign_2D from src/beam_cky_parser.cc ...
chmod +x lineardesign
mkdir -p ./bin
export LD_LIBRARY_PATH=.:D_LIBRARY_PATH
if g++ -std=c++11 -Ofast -DFINAL_CHECK -DSPECIAL_HP -fpermissive src/linear_design.cpp -o bin/LinearDesign_2D src/Utils/libraries/LinearDesign_linux64.so; then \
echo "Linux system; compiled with g++; finished."; \
echo "Compilation Succeed!"; \
else \
echo "Try another .so file."; \
if g++ -std=c++11 -Ofast -DFINAL_CHECK -DSPECIAL_HP -fpermissive src/linear_design.cpp -o bin/LinearDesign_2D src/Utils/libraries/LinearDesign_linux64_old.so; then \
echo "Linux system; compiled with g++; finished."; \
echo "Compilation Succeed!"; \
else \
echo "Compilation failed! Make sure it is either Linux-64 or Mac."; \
fi \
fi
src/Utils/libraries/LinearDesign_linux64.so:对‘log@GLIBC_2.29’未定义的引用
collect2: 错误:ld 返回 1
Try another .so file.
/tmp/ccEiM3wT.o:在函数‘LinearDesign::BeamCKYParser<int, int, std::pair<int, int> >::special_hp(LinearDesign::DFA<int, std::pair<int, double>, std::pair<int, int>, std::tuple<std::pair<int, int>, signed char, double> >&, signed char)’中:
linear_design.cpp:(.text._ZN12LinearDesign13BeamCKYParserIiiSt4pairIiiEE10special_hpERNS_3DFAIiS1_IidES2_St5tupleIJS2_adEEEEa[_ZN12LinearDesign13BeamCKYParserIiiSt4pairIiiEE10special_hpERNS_3DFAIiS1_IidES2_St5tupleIJS2_adEEEEa]+0x8d5):对‘func1(std::__cxx11::basic_string<char, std::char_traits
I'm having a similar problem on Linux Mint.
$ cat /proc/version Linux version 5.4.0-144-generic (buildd@lcy02-amd64-069) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #161~18.04.1-Ubuntu SMP Fri Feb 10 15:55:22 UTC 2023 $ gcc --version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
$ make
src/Utils/libraries/LinearDesign_linux64.so: undefined reference to log@GLIBC_2.29' collect2: error: ld returned 1 exit status Try another .so file. /tmp/cc687CMi.o: In function
LinearDesign::BeamCKYParser<int, int, std::pair<int, int> >::special_hp(LinearDesign::DFA<int, std::pair<int, double>, std::pair<int, int>, std::tuple<std::pair<int, int>, signed char, double> >&, signed char)':
linear_design.cpp:(.text._ZN12LinearDesign13BeamCKYParserIiiSt4pairIiiEE10special_hpERNS_3DFAIiS1_IidES2_St5tupleIJS2_adEEEEa[_ZN12LinearDesign13BeamCKYParserIiiSt4pairIiiEE10special_hpERNS_3DFAIiS1_IidES2_St5tupleIJS2_adEEEEa]+0x72b): undefined reference to `func1(std::__cxx11::basic_string<char, std::char_traits
these problems above,may be caused by environment,need to install “g++、cmake” (except “gcc、clang”)
Hi,
I faced a similar issue with LinearDesign and was able to resolve it by upgrading GLIBC to version 2.29.
Check the current version of GLIBC on your computer by running the following command:
ldd --version
If the version is older than 2.29, you may need to upgrade GLIBC.
Although RHEL 6 is no longer maintained, my server is RHEL 6. Now I want to install LinearDesign on my server, and I have encountered some problems. Any suggestions? Thank you.