Dear all,
I have been trying to compile rosetta 3.8 for a while now without success (meathod worked will with 3.7). I have a 17.04 Ubuntu Gnome Operating System.
Compile Commands:
sudo apt install zlib1g-dev scons build-essential -y
tar -xvzf rosetta_src_3.8_bundle.tgz
cd {ROSETTA}/main/source
./scons.py mode=release bin
Result:
Successfully compiles everything, no errors printed.
Command to test a binary:
/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/bin/AbinitioRelax.default.linuxgccrelease
Result:
/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/bin/AbinitioRelax.default.linuxgccrelease: error while loading shared libraries: libsqlite3.so: cannot open shared object file: No such file or directory
I am not sure how to diagnose this issue because I DO have binaries in the {ROSETTA}/main/source/bin directory (the execute command is not miss spelled because it is typed with TAB auto complete).
Please help?
The issue is that it can't find the libsqlite3.so library file (not the executable file). During the normal compiliation, things should be setup such that the executable has an internal path to that file. However, that can be broken in a few ways.
Did you move the directory after compilation? Or is it in on a mounted drive which has different full directory name from how it was mounted when it was compiled? Either of these can mess up the auto-pathing which happens.
If neither of these is the case, there may be issues with the rpath mechanism on your system (though I don't know why that would be the case). A workaround is to add the appropriate path to your $LD_LIBRARY_PATH variable. This path will be something like /home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/2.6/64/x86/gcc/5.2/default/ -- but it may be different depending on your compiler and version. Do a `find /home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/ -name libsqlite3.so` to find the appropriate directory.
Failing that, you can always try compiling with `extras=static` to get the static version of the executables, which shouldn't have the libary pathing issue.
Ok.
I ran the search command and this is the path I got:
/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/4.10/64/x86/gcc/6.3/default/libsqlite3.so
How do I add this path to my $LD_LIBRARY_PATH variable?
is it this way?
LD_LIBRARY_PATH
=
/home/acresearch/rosetta_s.........------UPDATE------
When I run:
$LD_LIBRARY_PATH=/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/4.10/64/x86/gcc/6.3/default/libsqlite3.so
I get this:
bash: /home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/4.10/64/x86/gcc/6.3/default/libsqlite3.so=/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/4.10/64/x86/gcc/6.3/default/libsqlite3.so: No such file or directory
Here's how to add that variable in bash (I would put this in your .bashrc) (Remember, if you put it in your .bashrc file, you'll want to source it first [source ~/.bashrc] or open up a new terminal).
export LD_LIBRARY_PATH=/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/4.10/64/x86/gcc/6.3/default/libsqlite3.so:$LD_LIBRARY_PATH
(The above should be all one line [sorry, having trouble with formatting])
This sets the variable "LD_LIBRARY_PATH" to include that path WITHOUT overwriting what else is in your LD_LIBRARY_PATH (i.e. it appends your new path to existing paths).
I tried this method but unfortunatly that did not work either.
I think I will compile it as rmoretti advised (using extras=static):
./scons.py mode=release bin extras=static
Is this correct?
Sorry, I realized the variable I posted is wrong. You need to put the path where the library is located, whereas I accidently copied the full path for the file. You should use this instead:
export LD_LIBRARY_PATH=/home/acresearch/rosetta_src_2017.08.59291_bundle/main/source/build/external/release/linux/4.10/64/x86/gcc/6.3/default/:$LD_LIBRARY_PATH
The difference is dropping the "libsqlite3.so"
It works now
Thank you