You are here

Rosetta-351 and gcc 13

5 posts / 0 new
Last post
Rosetta-351 and gcc 13

I got the following error while compiling (linking) rosetta source 351 on a fedora 38 machine with gcc version 13.1 .1-4:

g++ -o build/src/release/linux/6.3/64/x86/gcc/13/python/drrafter_error_estimation.python.linuxgccrelease -Wl,--disable-new-dtags -Wl,-rpath=/usr/local/rosetta.source.release-351
/main/source/build/src/release/linux/6.3/64/x86/gcc/13/python -Wl,-rpath=/usr/local/rosetta.source.release-351/main/source/build/external/release/linux/6.3/64/x86/gcc/13/python
-Wl,-rpath=\$ORIGIN -Wl,-rpath=\$ORIGIN/../lib build/src/release/linux/6.3/64/x86/gcc/13/python/apps/public/DRRAFTER/drrafter_error_estimation.o -Lexternal/lib -Lbuild/src/relea
se/linux/6.3/64/x86/gcc/13/python -Lsrc -Lbuild/external/release/linux/6.3/64/x86/gcc/13/python -Lexternal -L/usr/local/phenix-1.21rc1-5015/build/lib -L/usr/local/phenix-1.21rc1
-5015/conda_base/lib -L/usr/lib -L/usr/local/lib -ldevel -lprotocols.8 -lprotocols.7 -lprotocols_e.6 -lprotocols_d.6 -lprotocols_c.6 -lprotocols_b.6 -lprotocols_a.6 -lprotocols_
h.5 -lprotocols_g.5 -lprotocols_f.5 -lprotocols_e.5 -lprotocols_d.5 -lprotocols_c.5 -lprotocols_b.5 -lprotocols_a.5 -lprotocols.4 -lprotocols.3 -lprotocols_b.2 -lprotocols_a.2 -
lprotocols.1 -lcore.6 -lcore.5 -lcore.4 -lcore.3 -lcore.2 -lcore.1 -lbasic -lnumeric -lutility -lObjexxFCL -lz -lzlib -lcppdb -lsqlite3 -lcifparse -lxml2 -lzmq -lrdkit -lbcl -lc
maes -lpython2.7 -ldl -lpthread -lutil
Install file: "build/src/release/linux/6.3/64/x86/gcc/13/python/CstfileToTheozymePDB.python.linuxgccrelease" as "bin/CstfileToTheozymePDB.python.linuxgccrelease"
Install file: "build/src/release/linux/6.3/64/x86/gcc/13/python/FlexPepDocking.python.linuxgccrelease" as "bin/FlexPepDocking.python.linuxgccrelease"
g++ -o build/src/release/linux/6.3/64/x86/gcc/13/python/doug_dock_design_min_mod2_cal_cal.python.linuxgccrelease -Wl,--disable-new-dtags -Wl,-rpath=/usr/local/rosetta.source.rel
ease-351/main/source/build/src/release/linux/6.3/64/x86/gcc/13/python -Wl,-rpath=/usr/local/rosetta.source.release-351/main/source/build/external/release/linux/6.3/64/x86/gcc/13
/python -Wl,-rpath=\$ORIGIN -Wl,-rpath=\$ORIGIN/../lib build/src/release/linux/6.3/64/x86/gcc/13/python/apps/public/scenarios/doug_dock_design_min_mod2_cal_cal.o -Lexternal/lib
-Lbuild/src/release/linux/6.3/64/x86/gcc/13/python -Lsrc -Lbuild/external/release/linux/6.3/64/x86/gcc/13/python -Lexternal -L/usr/local/phenix-1.21rc1-5015/build/lib -L/usr/loc
al/phenix-1.21rc1-5015/conda_base/lib -L/usr/lib -L/usr/local/lib -ldevel -lprotocols.8 -lprotocols.7 -lprotocols_e.6 -lprotocols_d.6 -lprotocols_c.6 -lprotocols_b.6 -lprotocols
_a.6 -lprotocols_h.5 -lprotocols_g.5 -lprotocols_f.5 -lprotocols_e.5 -lprotocols_d.5 -lprotocols_c.5 -lprotocols_b.5 -lprotocols_a.5 -lprotocols.4 -lprotocols.3 -lprotocols_b.2
-lprotocols_a.2 -lprotocols.1 -lcore.6 -lcore.5 -lcore.4 -lcore.3 -lcore.2 -lcore.1 -lbasic -lnumeric -lutility -lObjexxFCL -lz -lzlib -lcppdb -lsqlite3 -lcifparse -lxml2 -lzmq
-lrdkit -lbcl -lcmaes -lpython2.7 -ldl -lpthread -lutil
g++ -o build/src/release/linux/6.3/64/x86/gcc/13/python/apps/public/clustering/energy_based_clustering.o -c -std=c++0x -ffor-scope -isystem external/boost_submod/ -isystem exter
nal/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -Wall -Wextra -pedantic -Wno-l
ong-long -Wno-strict-aliasing -march=core2 -mtune=generic -O3 -ffast-math -fno-finite-math-only -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -W
ON=1 -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/13 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/include/python2.7 src/apps/publi
g++: warning: switch '-ffor-scope' is no longer supported
g++ -o build/src/release/linux/6.3/64/x86/gcc/13/python/apps/public/analysis/ensemble_analysis.o -c -std=c++0x -ffor-scope -isystem external/boost_submod/ -isystem external/ -is
ystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -Wall -Wextra -pedantic -Wno-long-long
-Wno-strict-aliasing -march=core2 -mtune=generic -O3 -ffast-math -fno-finite-math-only -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -Wno-unuse
rc -Iexternal/include -Isrc/platform/linux/64/gcc/13 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/include/python2.7 src/apps/public/analys
/usr/bin/ld: build/src/release/linux/6.3/64/x86/gcc/13/python/ undefined reference to `std::ios_base_library_init()'
collect2: error: ld returned 1 exit status
g++ -o build/src/release/linux/6.3/64/x86/gcc/13/python/apps/public/ddg/ensemble_generator_score12_sidechain_ver2.o -c -std=c++0x -ffor-scope -isystem external/boost_submod/ -is
ystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -Wall -Wextra -peda
ntic -Wno-long-long -Wno-strict-aliasing -march=core2 -mtune=generic -O3 -ffast-math -fno-finite-math-only -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-
-DWITH_PYTHON=1 -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/13 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/include/python2.7 src
scons: *** [build/src/release/linux/6.3/64/x86/gcc/13/python/cluster_alns.python.linuxgccrelease] Error 1
/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/ when searching for -lc
g++: warning: switch '-ffor-scope' is no longer supported
g++: warning: switch '-ffor-scope' is no longer supported
scons: building terminated because of errors.


Any hint?


Post Situation: 
Tue, 2023-07-18 03:36

I'm not getting that error when I compile a recent Rosetta with GCC 13 on my machine.

I will note that I didn't compile the extras=python version. Given the main error ("undefined reference to `std::ios_base_library_init()'"), I'm wondering if it's a library compatibility issue -- if you're using a version of the Python libraries which aren't quite compatible with the compiler you're using.

Have you tried compiling the non-python version of Rosetta? The two compiles should be able to coexist in the same directory, and doing the non-python compile should help narrow down whether it's a Python-dependent issue.

Tue, 2023-07-18 11:30

Thank you very much for your answer...the problem is that I am compiling rosetta in order to get the phenix interface I guess I need the python dependencies.

The command which is issued by  rosetta.build_phenix_interface is 'phenix.python source/ bin mode=release extras=python  -j12'.

I have tried without python dependencies and it does not compile either giving the same error message.

Still the problem would remain anyaway on how to compile since phenix has its own python that is different from the system python.

What I can add is that I have succesfully compiled phenix rosetta interface with python extras but I was using gcc 12 and fedora 37 at that time instead of 38...which I don't know if it can make any difference.

Wed, 2023-07-19 06:36

The compilation without Python was simply a debugging step, to see if it's a general Rosetta compiliation issue, or if it was specific to compiling with the python libraries. Since it shows the same error without the extras=python, that indicates it's not a python-build specific issue.

Unfortunately, I'm not sure what's going on. The linker error you're getting ("undefined reference to `std::ios_base_library_init()'
collect2: error: ld returned 1 exit status") is related to C++ standard library internal issues. It's not something that we're pulling in deliberately. I also wasn't able to find much online about the function, or what issues might cause the error.

Best I can guess, there's probably something happening with the build system, where you're pulling in different versions of the C++ standard library in different locations -- so one version expects the ios_base_library_init() function to be present, but the other version doesn't use it and doesn't provide it.  I don't know if that's related to whatever build system hooks Phenix is providing.

My recommendation, if you haven't already, is to try a test compile with other programs, to see if you get similar linking errors. You can also try to uncomment the ENV line in source/tools/build/site.settings to see if that helps, and potentially be explicit with the complier path in that file. If you have multiple compilers on your machine, it might help trying a different one, to see if that helps anything. (Worse comes to worse, you can try installing a side installation of GCC 12 and using that instead of the default GCC 13.)


Wed, 2023-07-19 08:23

I have installed gcc12.3 on my system and compilation runs fine. So...the problem appears to be the compiler version.

Thank you very much


Fri, 2023-07-21 02:53