You are here

Building error

18 posts / 0 new
Last post
Building error

I am new to linux and gcc and scons. I am trying to install Rosetta 3.1 on ubuntu 10.10. The installation seems to be working properly until it gives this error:

g++ -o build/src/release/linux/2.6/64/x86/gcc/4.4/core/scoring/sasa.os -c -std=c++98 -pipe -ffor-scope -W -Wall -pedantic -Wno-long-long -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/4.4 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_38_0 -I/usr/local/include -I/usr/include src/core/scoring/
src/core/scoring/ In function 'core::Real core::scoring::calc_per_atom_sasa(const core::pose::Pose&, core::id::AtomID_Map&, utility::vector1 >&, core::Real, bool, core::id::AtomID_Map&)':
src/core/scoring/ internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
scons: *** [build/src/release/linux/2.6/64/x86/gcc/4.4/core/scoring/sasa.os] Error 1
scons: building terminated because of errors.

I realize that this may be a problem because I am using gcc 4.4. After reading the forums I felt using "scons bin mode=release cxx=gcc cxx_ver=3.4" would help, as it seemed to have worked for another user with a similar problem.

However, I do not have any version of gcc other than gcc4.4, and scons bin mode=release cxx=gcc cxx_ver=4.4 does not work.

I felt that switching to gcc 4.1 maybe as simple as executing "sudo apt -get install gcc-4.1" but doing this and running "scons bin mode=release cxx=gcc cxx_ver=4.1" gives the following error:

/home/abdulah/Desktop/rosetta_source/external/scons-local/scons-local-0.98.5/SCons/Tool/ DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
svn: '.' is not a working copy
scons: done reading SConscript files.
scons: Building targets ...
g++41 -o build/src/release/linux/2.6/64/x86/gcc/4.1/numeric/constants.os -c -std=c++98 -pipe -ffor-scope -W -Wall -pedantic -Wno-long-long --param inline-unit-growth=1000 --param large-function-growth=50000 -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/4.1 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_38_0 -I/usr/local/include -I/usr/include src/numeric/
sh: g++41: not found
scons: *** [build/src/release/linux/2.6/64/x86/gcc/4.1/numeric/constants.os] Error 127
scons: building terminated because of errors.

This seems to be the problem line: sh: "g++41: not found" So I tried "sudo apt -get install gcc-4.1 g++-4.1" and then running "scons bin mode=release cxx=gcc cxx_ver=4.1" again. But this didnt change anything.

Thank you in advance for your help,
Abdullah Ahmed

Post Situation: 
Wed, 2010-12-01 05:28


I'm glad to see that you've already tried the advice I gave that other user. It's not clear to me you've convinced SCons to try using 4.1. Try a couple of things:

A) type "which gcc-4.1" into the command line. It should return something like "/usr/X11R6/bin/gcc-4.1". This means you did get gcc-4.1 installed properly.

B) try overriding the cxx_ver flag with user.settings instead of on command line. Go to the file tools/build/user.settings. Look for the second "overrides". Add these lines:
"cc" : "gcc-4.1",
"cxx" : "g++-4.1",

gcc 4.2 should work as well as 4.1 if that helps.

If this advice fails, let me know, I'll ping the developer list to see if anyone else is using 10.10 yet.

Thu, 2010-12-02 06:50

Hi smlewis,

The command "which gcc-4.1" gives "/usr/bin/gcc-4.1" I suppose this means that it is properly installed.

I was also able to uninstall gcc-4.4 using "sudo apt-get remove gcc-4.4"
However, the command "gcc --version" gives "/usr/bin/gcc: No such file or directory" This is because the gcc file(?) is named gcc-4.1. A name change should work, I think. But I do not have the rights to rename this file (after right clicking, "rename" is inaccessable).

Unfortunately, I was unable to use the second piece of advice because I do not know where the file "tool/build/user.settings" is.

Thanks for your help,

Thu, 2010-12-02 08:52

In your Rosetta code directory, you should have directories bin, build, src, test, tools, and a few others. It's THAT tools. (rosetta code directory)/tools/build/user.settings.

Fri, 2010-12-03 06:25


I don't know if this is a problem or not, but I noticed that I have no g++-4.1, just the default g++ that comes with sudo apt-get install build-essential. Using apt-get install gcc-4.1 does not make a g++4.1 because it is considered to be obsolete for ubuntu 10.10 & 10.04 (maybe others also, I just checked these). There is a g++-4.4 though and a g++ linked to it.

I think I may have to install gcc-4.1 from the source code. That's what the ubuntu forums suggest in these situations, but I was hoping to find an easier way.

Thanks in advance for your help,

Fri, 2010-12-03 09:49

Can you get 4.2 instead of 4.1? It ought to work as well. Compiling the compiler is a nontrivial task, it is likely to be easier to fiddle with instead.

Fri, 2010-12-03 11:16

I asked around and found there's a commit to the developers' trunk (38831) that probably addresses this. If you can't get 4.2 installed, give me your email address and I will get you replacement copies of and sasa.hh that (might) work. (We might have to fiddle with them a little more to accommodate changes made between 3.1 and two months ago.)

Fri, 2010-12-03 11:20

Hi smlewis,

I am also getting this at the beginning of compilation:
sh: svnversion: not found
sh: svn: not found

Would using "apt-get install svn" to install subversion be a good idea, or is this something that can be ignored?

I can't install gcc-4.2 from the command line because it gives an error. The package seems to be obsolete.

I changed the file that you mentioned (tools/build/user.settings). But this does not seem to have helped.

I was however, able to install g++-4.1, but I still get an error saying: "sh: g++41: not found"

My email address is:

Thank you again for all the help,

Mon, 2010-12-06 07:36

The svn errors are irrelevant. It is the result of some leftover developer code that lets us know exactly which checkout version we are using (we use SVN for version control), all it means is that you won't get the version number stamp. Don't bother with svn, you don't have an SVN copy of the code anyway, so it will still fail even if you do install SVN.

I will email you a copy of later today. It is reasonably likely to have an error or two (because it will have been ported from current developer trunk to an old version), but we can iron those out with little difficulty.

Tue, 2010-12-07 06:39

Is there any plans to provide snapshot of the development version or read access to the svn repro. I am also having problem compiling Rosessta 3.1 with gcc 4.5 in Fedora. Are there any plans to provide any patch for gcc 4.4 and above. My e-mail adresse is knutjorgen(at)

Fri, 2010-12-10 03:49

It is believed, but not guaranteed, that 3.2 will compile on those architectures.

Under the assumption that your error is also in, I have emailed you a different version of the file that might fix it.

Fri, 2010-12-10 06:30

I think that the issue with has been resolved thanks to the file you sent me. Thank you.

However, I seem to have run into another problem. My computer hangs/stops functioning at the "archive manager" stage. On another thread you suggested the following to skip the archive manager as it may have been taking up too much memory (

"Off the top of my head, to remove ArchiveManager you'll need to remove those files from protocols.src.settings (add # in front of those files; preferably everything in its immediate directory "archive" *but NOT all of JD2*) and then modify protocols/jd2/JobDistributorFactory to remove all references to ArchiveManager and its sibling classes (again, everything from "archive"). You might have to start killing code elsewhere to get it to compile after that; it could get ugly fast. Hopefully not."

I tried this, but I am getting issues with the files in the src/protocols/abinitio folder as they seem to be calling files from the archive folder (src/protocols/abinitio/IterativeAbrelax.hh:30:48: error: protocols/jd2/archive/ArchiveBase.hh: No such file or directory)

I won't be using IterativeAbrelax. All I need from rosetta is the energy minimization functionality and if possible ddg. Is there some way to just install them and skip the rest?

Thanks again for the help,

Mon, 2010-12-13 03:12

I assume you mean that it stops ~compiling~ when working through the archive manager. There's no way to build just the executeables you want without building the underlying libraries. We're making the libraries less tightly linked together as we go (and a dependency of InterativeAbinitio on ArchiveBase is likely to be considered a problem, once we get as far as protocols).

Go ahead and continue commenting out files that won't compile (IterativeAbrelax.hh/cc, etc). Let me know what your total list is and I'll tell you if you should be worried.

You can also trying dummying out functions in the archive manager by deleting the guts of functions bodies in the cc file it fails on and replacing them with something simple (return, or return followed by a constructor for whatever variable it's supposed to return ought to work).

I can't reproduce your error or I'd give you a patch that will fix it...

Mon, 2010-12-13 11:10

Thanks for the help. I switched to a more powerful machine and it seems to have worked. This is the message I get at the end:

"Install file: "build/src/release/linux/2.6/64/x86/gcc/score_jd2.linuxgccrelease" as "bin/score_jd2.linuxgccrelease"
scons: done building targets."

I assume this means that the installation was successful. Is this correct?

This may seem like a silly question because I haven't read all of the manual yet, but are there some tests (demos, or a list of commands) I can run to check if everything is running ok?
Alternatively, are there "benchmarks" (certain files/commands that give known results) for Rosetta? That way I could check if my results correspond to them, and hence whether or not the installation is correct.

And really really Thank you again for all the help,

Tue, 2010-12-14 09:33

"scons: done building targets" means you're golden. score_jd2 is irrelevant, the order that the apps compile in is not important.

It's almost impossible to have Rosetta compile, but not compile right. (that said, we had a nagging issue in the options parser for a year...)

Several testing suites are embedded in the release. None are really meant for end-user use but there's no reason you can't use them.

A) unit tests

The unit tests suite (most of the code in the test/) directory are, well, unit tests. Check Wikipedia. Our test coverage is quite poor, but these tests have KNOWN answers constant across all systems. Those answers are embedded in the tests. To run the unit tests, you'll need to compile them and then run them. They are "supposed" to run in debug mode (30 mins to run tests):

scons (to compile the debug libraries)
scons cat=test (to compile the tests)
cd to rosetta_source
test/ -database (database) -mute all

It's usually faster in release mode (a few mins to run tests):
(scons mode=release not necessary, since you already compiled)
scons cat=test mode=release
modify test/ to use release executeables; look for the system call to scons then add mode=release to that line
test/ -database (database) -mute all

Results should look like:
-------- Unit test summary --------
Total number of tests: 698
number tests passed: 698
number tests failed: 0
Success rate: 100%
---------- End of Unit test summary
Except that you'll have fewer tests than that.

B) Integration tests
These tests run short Rosetta protocols (mostly too short to produce useful results, but long enough to put the code through its paces). Rosetta is unavoidably sensitive to numerical noise, so these trajectories are not guarunteed to match across different hardware (so we don't distribute what it "should" look like). You can run them with:

cd test/integration -j(num procs) -d database

It will report a "failure" in that it doesn't have both a ref and new directory to compare, but you can look around in the ref directory to ensure that all the tests produce something that resembled useful results (usually a PDB or silent file). If you run the script twice, it should report perfect success (comparing new to ref on your machine). It should take about 30 seconds per test to run, but you can multithread it with -j.

C) Scientific tests

We also have scientific tests, which attempt to measure if Rosetta is doing things "right". These test objective measures like sequence recovery in design, or RMSD in structure prediction. Go to test/scientific. I think the script will run it. This takes hours and hours and hours.

Tue, 2010-12-14 10:47

Thank you for your help. Everything seems to be working well.

Mon, 2010-12-20 02:59


I've been having the same error when i try to build rosetta 3.1. should i try to change the gcc??

Mon, 2010-12-20 14:03

You can try a different compiler/version.

If it is failing on, post your email and I'll send along the patch. You can also try stubbing out the function if you don't need SASA values.

If it is failing on the MPI archive stuff, follow the advice above.

If those bits of advice fail, feel free to ask again. Go ahead and create your own thread so I can keep failure cases separate.

Mon, 2010-12-20 14:13