LinearDesignSoftware / LinearDesign

The LinearDesign mRNA design software.
Other
146 stars 50 forks source link

Installation failure on RHEL 6 #2

Open shenweiyan opened 1 year ago

shenweiyan commented 1 year ago

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.

$ python -V
Python 2.7.16
$ gcc --version
gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ 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
In file included from src/Utils/common.h:12:0,
                 from src/Utils/network.h:19,
                 from src/beam_cky_parser.h:13,
                 from src/linear_design.cpp:2:
src/Utils/base.h:128:13: warning: specialization of ‘template<class _Tp> struct std::hash’ in different namespace [-fpermissive]
 struct std::hash<std::tuple<Ts...>> {
             ^
In file included from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/basic_string.h:5471:0,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/string:52,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/locale_classes.h:40,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/ios_base.h:41,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/iomanip:40,
                 from src/linear_design.cpp:1:
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/functional_hash.h:58:12: warning:   from definition of ‘template<class _Tp> struct std::hash’ [-fpermissive]
     struct hash;
            ^
In file included from src/Utils/common.h:12:0,
                 from src/Utils/network.h:19,
                 from src/beam_cky_parser.h:13,
                 from src/linear_design.cpp:2:
src/Utils/base.h:135:13: warning: specialization of ‘template<class _Tp> struct std::hash’ in different namespace [-fpermissive]
 struct std::hash<std::pair<T1, T2>> {
             ^
In file included from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/basic_string.h:5471:0,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/string:52,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/locale_classes.h:40,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/ios_base.h:41,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/iomanip:40,
                 from src/linear_design.cpp:1:
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/functional_hash.h:58:12: warning:   from definition of ‘template<class _Tp> struct std::hash’ [-fpermissive]
     struct hash;
            ^
/tmp/ccgqS8R0.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]+0xbf5): undefined reference to `func1(std::string&, signed char)'
src/Utils/libraries/LinearDesign_linux64.so: undefined reference to `memcpy@GLIBC_2.14'
src/Utils/libraries/LinearDesign_linux64.so: undefined reference to `log@GLIBC_2.29'
src/Utils/libraries/LinearDesign_linux64.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
collect2: error: ld returned 1 exit status
Try another .so file.
In file included from src/Utils/common.h:12:0,
                 from src/Utils/network.h:19,
                 from src/beam_cky_parser.h:13,
                 from src/linear_design.cpp:2:
src/Utils/base.h:128:13: warning: specialization of ‘template<class _Tp> struct std::hash’ in different namespace [-fpermissive]
 struct std::hash<std::tuple<Ts...>> {
             ^
In file included from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/basic_string.h:5471:0,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/string:52,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/locale_classes.h:40,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/ios_base.h:41,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/iomanip:40,
                 from src/linear_design.cpp:1:
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/functional_hash.h:58:12: warning:   from definition of ‘template<class _Tp> struct std::hash’ [-fpermissive]
     struct hash;
            ^
In file included from src/Utils/common.h:12:0,
                 from src/Utils/network.h:19,
                 from src/beam_cky_parser.h:13,
                 from src/linear_design.cpp:2:
src/Utils/base.h:135:13: warning: specialization of ‘template<class _Tp> struct std::hash’ in different namespace [-fpermissive]
 struct std::hash<std::pair<T1, T2>> {
             ^
In file included from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/basic_string.h:5471:0,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/string:52,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/locale_classes.h:40,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/ios_base.h:41,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/iomanip:40,
                 from src/linear_design.cpp:1:
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/functional_hash.h:58:12: warning:   from definition of ‘template<class _Tp> struct std::hash’ [-fpermissive]
     struct hash;
            ^
src/Utils/libraries/LinearDesign_linux64_old.so: undefined reference to `__log_finite@GLIBC_2.15'
collect2: error: ld returned 1 exit status
Compilation failed! Make sure it is either Linux-64 or Mac.
fangzhe3 commented 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, std::allocator >&, signed char)' collect2: error: ld returned 1 exit status Compilation failed! Make sure it is either Linux-64 or Mac.

elmiele commented 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, 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

SaberLee112354 commented 1 year ago

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, std::allocator >&, signed char)’未定义的引用 collect2: 错误:ld 返回 1 Compilation failed! Make sure it is either Linux-64 or Mac.

felixhorns commented 1 year ago

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 functionLinearDesign::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, std::allocator >&, signed char)' collect2: error: ld returned 1 exit status Compilation failed! Make sure it is either Linux-64 or Mac.

zwmike2007 commented 1 year ago

these problems above,may be caused by environment,need to install “g++、cmake” (except “gcc、clang”)

ChongLu121 commented 1 year ago

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.