Hello. I'm having trouble compiling Rosetta on an AWS Ubuntu 22.04 instance, using scons with the extras=hdf5 flag. The problem seems to be with finding the HDF5 libraries.
My question - how can I successfully compile Rosetta with the extras=hdf5 flag?
Below, I show how I set up the AWS instance, the compilation errors, and some checks I did on my HDF5 installation (including successful compilation of simple test code with h5c++).
AWS Instance General Software Install Commands
I performed the following install commands prior to attempting my Rosetta compile
sudo apt-get update
sudo apt-get update
sudo apt-get install zlib1g-dev
sudo apt-get install -y libhdf5-serial-dev
sudo apt-get install build-essential
sudo apt-get install python-is-python3
Rosetta Compilation Commands
I'm trying to compile Rosetta with the following command:
~/rosetta_src_2021.16.61629_bundle/main/source$ ./scons.py -j7 mode=release bin extras=hdf5
I first had to fix ~/rosetta*/main/source/src/protocols/features/ReaturesReporter.fwd.hh by adding an #include <cstdint>
After this fix, I still get the typical stream of g++: warning: switch '-ffor-scope' is no longer supported warnings.
More importantly, I have troubles with hdf5:
src/protocols/indexed_structure_store/H5FragmentStoreBackend.cc:22:10: fatal error: H5Cpp.h: No such file or directory
22 | #include "H5Cpp.h"
| ^~~~~~~~~
compilation terminated.
src/protocols/indexed_structure_store/H5StructureStoreBackend.hh:32:10: fatal error: H5Cpp.h: No such file or directory
32 | #include "H5Cpp.h"
| ^~~~~~~~~
Checking HDF5 installation
I checked for HDF5 library installation:
~/rosetta_src_2021.16.61629_bundle/main/source$ find / -iname "*hdf5.h*"
/usr/include/hdf5/serial/hdf5.h
~/rosetta_src_2021.16.61629_bundle/main/source$ find / -iname "*H5Cpp.h*"
/usr/include/hdf5/serial/H5Cpp.h
(ignoring a bunch of "Permission denied" outputs)
I also successfully compiled and ran a simple tutorial HDF5 C++ tutorial code (https://gist.github.com/YukiSakamoto/6319458 - after adding using namespace H5;) using h5c++.
Question - How can I successfully compile Rosetta with the "extras=hdf5" option, which seems required for my work? Do I need to modify SCons configuration set up to find my HDF5 installation?
Thank you.
The issue is that the Rosetta compilation machinery isn't able to find that particular include path. I'm not sure if that's because it's in a slightly different location or layout from what it's expecting.
One way around it is to go into the Rosetta/main/source/tools/build/site.settings file and edit the include_path entry there. (If you don't have a site.settings file for some reason, there should be a site.settings.release file which you should be able to copy over.) If you edit it to be something like the following
I think that should allow the Scons compilation to find the include files you're after.