You are here

Error compiling Rosetta-337 in Ubuntu 9.4.0-1ubuntu1~20.04.1

5 posts / 0 new
Last post
Error compiling Rosetta-337 in Ubuntu 9.4.0-1ubuntu1~20.04.1
#1

Hello everyone,

I ran into this problem when I compiled Rosetta-337 and my system is Ubuntu-20.04.1. The error is displayed as follows.

./scons.py --nover -j 8 mode=release bin extras=mpi
src/platform/linux src/protocols/peptide_deriver/PeptideDeriverMarkdownStreamOutputter.cc
g++: warning: switch '-ffor-scope' is no longer supported
src/protocols/peptide_deriver/PeptideDeriverMarkdownStreamOutputter.cc:26:10: fatal error: utility/version.hh: No such file or directory
   26 | #include <utility/version.hh>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [build/src/release/linux/5.15/64/x86/gcc/9/mpi/protocols/peptide_deriver/PeptideDeriverMarkdownStreamOutputter.os] Error 1
scons: building terminated because of errors

I found the file utility/version.hh is not really in the src/utility/ directory.

Looking forward to the help!

Thanks,

Dongfei.

Category: 
Post Situation: 
Wed, 2023-04-12 18:32
liudfgoo

The utility/version.hh file should be autogenerated by the build system. It's a little odd that yours wasn't. (Or perhaps the build system tried to, but ran into an error.)

Try manually running the `version.py` script in the `Rosetta/source/` directory, and see if that works for you, or gives you errors.

Thu, 2023-04-13 12:42
rmoretti

Thank you very much! After manually running the `version.py`, the version.hh file was generated in the utility directory. I reran the compiling code and it seemed to have worked in the end. The final output is as follows,

mpiCC -o build/src/release/linux/5.15/64/x86/gcc/9/mpi/libdevel.so -Wl,--disable-new-dtags -shared -Wl,-rpath=/home/liudf/rosetta/rosetta.source.release-337/main/source/build/external/release/linux/5.15/64/x86/gcc/9/mpi -Wl,-rpath=\$ORIGIN -Wl,-rpath=\$ORIGIN/../lib build/src/release/linux/5.15/64/x86/gcc/9/mpi/devel/init.os -Lexternal/lib -Lbuild/src/release/linux/5.15/64/x86/gcc/9/mpi -Lsrc -Lbuild/external/release/linux/5.15/64/x86/gcc/9/mpi -Lexternal -Lbin -L/lib/x86_64-linux-gnu -L/usr/local/lib -L/opt/intel/compilers_and_libraries_2020.4.304 -L/opt/intel/advisor_2020.3.0.607294/lib32 -L/opt/intel/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/libfabric/lib -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib -L/opt/intel/compilers_and_libraries_2020.4.304/linux/ipp/lib/intel64 -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8 -L/opt/intel/debugger_2020/python/intel64/lib -L/opt/intel/debugger_2020/libipt/intel64/lib -L/opt/intel/compilers_and_libraries_2020.4.304/linux/daal/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64_lin/gcc4.4 -L/opt/intel/compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64_lin/gcc4.8 -L/usr/lib -L/usr/local/lib -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 -lcppdb -lsqlite3 -lz -lzlib -lcppdb -lsqlite3 -lcifparse -lxml2 -lzmq -lrdkit -lbcl -lcmaes
scons: done building targets.

Next, I want to check if it was successfully installed and run the unit tests (https://www.rosettacommons.org/docs/latest/development_documentation/test/run-unit-test#organization-of-unit-test-code). And when I compile the following unit test code, there is an error.

cd Rosetta/main/source
scons.py -j 8 mode=debug cat=test

error info,

external/cxxtest/cxxtestgen.py --have-std --part -o build/test/debug/linux/5.15/64/x86/gcc/9/default/basic/resource_manager/locator/FileSystemResourceLocatorTests.cxxtest.cpp test/basic/resource_manager/locator/FileSystemResourceLocatorTests.cxxtest.hh
g++ -o build/test/debug/linux/5.15/64/x86/gcc/9/default/ObjexxFCL.test -Wl,--disable-new-dtags -Wl,-rpath=/home/liudf/rosetta/rosetta.source.release-337/main/source/build/src/debug/linux/5.15/64/x86/gcc/9/default -Wl,-rpath=/home/liudf/rosetta/rosetta.source.release-337/main/source/build/external/debug/linux/5.15/64/x86/gcc/9/default build/test/debug/linux/5.15/64/x86/gcc/9/default/ObjexxFCL/ObjexxFCL.cxxtest.o -Lexternal/lib -Lbuild/src/debug/linux/5.15/64/x86/gcc/9/default -Lbuild/external/debug/linux/5.15/64/x86/gcc/9/default -Lbin -L/lib/x86_64-linux-gnu -L/usr/local/lib -L/opt/intel/compilers_and_libraries_2020.4.304 -L/opt/intel/advisor_2020.3.0.607294/lib32 -L/opt/intel/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/libfabric/lib -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib -L/opt/intel/compilers_and_libraries_2020.4.304/linux/ipp/lib/intel64 -L/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8 -L/opt/intel/debugger_2020/python/intel64/lib -L/opt/intel/debugger_2020/libipt/intel64/lib -L/opt/intel/compilers_and_libraries_2020.4.304/linux/daal/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64_lin/gcc4.4 -L/opt/intel/compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64_lin/gcc4.8 -L/usr/lib -L/usr/local/lib -lutility -lObjexxFCL -lz -lzlib -lcppdb -lsqlite3 -lcifparse -lxml2 -lzmq -lrdkit -lbcl -lcmaes
/usr/bin/ld: cannot find -lutility
/usr/bin/ld: cannot find -lObjexxFCL
/usr/bin/ld: cannot find -lzlib
/usr/bin/ld: cannot find -lcppdb
/usr/bin/ld: cannot find -lcifparse
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lzmq
/usr/bin/ld: cannot find -lrdkit
/usr/bin/ld: cannot find -lbcl
/usr/bin/ld: cannot find -lcmaes
collect2: error: ld returned 1 exit status
scons: *** [build/test/debug/linux/5.15/64/x86/gcc/9/default/ObjexxFCL.test] Error 1
g++ -o build/test/debug/linux/5.15/64/x86/gcc/9/default/basic/resource_manager/locator/FileSystemResourceLocatorTests.cxxtest.o -c -std=c++0x -ffor-scope -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem external/cxxtest/ -pipe -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=core2 -mtune=generic -O0 -g -ggdb -ffloat-store -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -D_GLIBCXX_DEBUG -Iexternal/cxxtest -I. -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/9 -Itest -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux build/test/debug/linux/5.15/64/x86/gcc/9/default/basic/resource_manager/locator/FileSystemResourceLocatorTests.cxxtest.cpp
g++: warning: switch '-ffor-scope' is no longer supported
scons: building terminated because of errors.

The message above shows that the corresponding dynamic library is missing.  How shall I solve this problem? What settings are required if I need to recompile?

Looking forward to your reply! Thanks!

Fri, 2023-04-14 19:16
liudfgoo

First off, the unit tests are primarily for people who are changing the code base. While you could use them as a check if Rosetta compiled correctly, that probably is unnecessary.

 

But if you do want to run the unit tests, you have to run scons with the similar settings you compiled the main Rosetta with, just with `cat=test` instead of `bin`. So in your case it would be

./scons.py -j 8 mode=release extras=mpi cat=test

 

BTW, I *just* noticed the --nover in your original command. That would explain your issue with the version file -- the --nover option turns off the version file generation step. (Something only recommended for development.)

Sun, 2023-04-16 05:37
rmoretti

Thank you very much!

I have recompiled the code using the code  without the --nover. Finally, it worked and there was no error in the compiling process.

 

Sun, 2023-04-16 09:21
liudfgoo