You are here

Cannot run binaries after successful compilation

7 posts / 0 new
Last post
Cannot run binaries after successful compilation

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
./ mode=release bin



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: error while loading shared libraries: 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?

Post Situation: 
Mon, 2017-08-14 02:56

The issue is that it can't find the 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` 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.

Mon, 2017-08-14 09:15



I ran the search command and this is the path I got:



How do I add this path to my $LD_LIBRARY_PATH variable?

is it this way?

LD_LIBRARY_PATH =/home/acresearch/rosetta_s.........



When I run:


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/ No such file or directory


Tue, 2017-08-15 02:42

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/$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).

Tue, 2017-08-15 07:34

I tried this method but unfortunatly that did not work either.


I think I will compile it as rmoretti advised (using extras=static):

./ mode=release bin extras=static


Is this correct?

Wed, 2017-08-16 02:28

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 ""

Wed, 2017-08-16 05:34

It works now


Thank you

Fri, 2017-08-18 00:57