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:
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.
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,
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.
error info,
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!
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.)
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.