You are here

Rosetta 3.5 on Mac osx 10.9

14 posts / 0 new
Last post
Rosetta 3.5 on Mac osx 10.9

Firstly let me start by saying that I'm fairly new to Linux, so go easy on the explanations...

I've installed scons and tried to unpack Rosetta but I keep getting the same error:

scons: Reading SConscript files ... reports this is a non-version-control release version of Rosetta
scons: done reading SConscript files.
scons: Building targets ...
gcc-4.2 -o build/external/debug/macos/13.0/64/x86/gcc/4.2/default/dbio/sqlite3/sqlite3.os -c -isystem external/boost_1_46_1/ -pipe -m64 -march=nocona -mtune=generic -O0 -g -ggdb -ffloat-store -fno-fast-math -fPIC -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include external/dbio/sqlite3/sqlite3.c
sh: gcc-4.2: command not found
scons: *** [build/external/debug/macos/13.0/64/x86/gcc/4.2/default/dbio/sqlite3/sqlite3.os] Error 127
scons: building terminated because of errors.

I (think I) know it's the gcc compiler thats the problem - i can do which gcc and it gives me a path and "gcc-v" gives me this:

Configured with: --prefix=/Applications/ --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Now I understand that as I'm on 10.9 i'm using clang now, but have no idea how to fix it.

Help please!!

Post Situation: 
Mon, 2013-12-16 22:10

By default, Rosetta tries to build with gcc. You have to tell Rosetta to use the clang compiler by passing the option "cxx=clang" to the scons commandline. E.g. something like

scons -j4 mode=release cxx=clang bin

Depending on the version of clang you have, you may also need to edit the rosetta_source/tools/build/basic.settings but I'd recommend trying it as-is first.

(Just a note that I believe we changed things such that the very recent weekly release version can autodetect that you're on a recent MacOS version, and default to clang instead of gcc, but for Rosetta3.5 you'll need to explicitly call for the clang compiler.)

Tue, 2013-12-17 07:34

Also having the same problem (Mac OS 10.9), and thanks for the above suggestions rmoretti.

I first tried:

scons mode=release cxx=clang bin

Ultimately, you get a error:

KeyError: "Unknown version number 5.0 for compiler 'clang'"

Next I tried editing line 16 of the "options.settings" file from

"clang" : [ "1.7", "2.1", "2.0", "2.8", "2.9", "3.0", "3.1", "*" ],


"clang" : [ "1.7", "2.1", "2.0", "2.8", "2.9", "3.0", "3.1", "5.0", "*" ],

Then tried running again, but you get a very long list of errors. For example:

scons: done reading SConscript files.
scons: Building targets ...
clang++ -o build/src/release/macos/13.0/64/x86/clang/5.0/apps/public/AbinitioRelax.o -c -pipe -ffor-scope -W -Wall -pedantic -Wno-long-long -march=native -O3 -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/64/clang/5.0 -Isrc/platform/macos/64/clang -Isrc/platform/macos/64 -Isrc/platform/macos -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include src/apps/public/
/Applications/ error: implicit instantiation of undefined template
typedef typename allocator_type::value_type value_type;
/Applications/ note: in instantiation of template class
'std::__1::allocator_traits >' requested here
typedef typename __alloc_traits::size_type size_type;
src/utility/vectorL_bool.hh:42:10: note: in instantiation of template class 'std::__1::vector >' requested here
private std::vector< bool, A >
src/utility/vector1_bool.hh:38:9: note: in instantiation of template class 'utility::vectorL<1, bool, std::allocator >' requested here
public vectorL< 1, bool, A >
src/utility/options/VectorOption_T_.hh:68:20: note: in instantiation of template class 'utility::vector1 >' requested here
typedef typename Values::const_iterator const_iterator;
src/utility/options/BooleanVectorOption.hh:37:9: note: in instantiation of template class 'utility::options::VectorOption_T_'
requested here
public VectorOption_T_< BooleanVectorOptionKey, bool >
src/utility/vector1.fwd.hh:35:44: note: template is declared here
namespace std { template< typename > class allocator; }
etc, etc.

Any suggestions are most appreciated.

Wed, 2013-12-18 06:32

It looks like there's something off with the instantiation of a vector1. But it doesn't make much sense for such an error to pop up during the compilation of src/apps/public/ - if there's some issues with vector1's, you'd have seen it much, much earlier. It's doubly strange, as doesn't actually use vector1's (though it does reference them).

I'm guessing there was some issue with the compilation where it got itself wedged into a bad state. Try deleting everything in the rosetta_source/build directory, and then recompiling. Starting a fresh compile may fix things.

If it doesn't, another thing to try is to manually edit the rosetta_source/src/apps/public/ file, and delete the two lines which reference vector1 (the "#include " and "using utility::vector1;" lines), as they're superflous there. Then restart the compilation (just reexecute the same command as before), and hopefully this will skirt the problem.

If you're still having problems, re-run the compile command, and post the full output of that second compile run as a text file here on the forums.

Wed, 2013-12-18 07:45

Thanks for the support guys. I tried your line rmoretti, but it didn't work, and to be honest I didnt know what I was entering so I couldn't troubleshoot it. I did however re-download the latest release and it worked flawlessly.....So thanks very much, onto the next challenge - using the software!

Thu, 2013-12-26 23:27

Unfortunately, still not working for me.

Also, I can't get access to the weekly releases as I am a commercial user. I will try and post some more errors if useful, but essentially as above.

Wed, 2014-01-08 06:49

Are you planning to use AbinitioRelax? If the errors are confined to a few files in the src/apps/public/ directory, and you aren't going to use those applications, the simplest fix is to edit rosetta_source/src/apps.src.settings, and add a "#" to the beginning of the line which lists that application. That will comment out compilation of the application, and re-running scons will avoid those errors.

If you only have a few applications you want to use, you can avoid editing them all together by simply listing them on the scons commandline, instead of the entire bin directory. E.g.

scons -j4 mode=release relax score enzyme_design

(I believe that should work for Rosetta3.5 - if not, use the full name of the final executable, e.g. "bin/relax.linuxgccrelease".) If you need another one later, simply re-run scons with the desired executable.

If one of the programs you need is still running into the error, post the error messages you're now getting for that compilation here, and we'll see what we can figure out.

Wed, 2014-01-08 08:45

Thanks rmoretti - I shall give it ago later on this week and see how it goes.

However, would it be possible to get my hands on the fixes in the weekly release? I have a commercial licence so not sure if this is possible?

Thu, 2014-01-09 04:15

We're sorting out some licensing issues, but as soon as that's done, commercial licensees should be getting access to weekly releases. Unfortunately we don't have an estimate on when all the administrative details will be completed. Sorry about that.

Thu, 2014-01-09 09:02

I am having a little bit of a different problem, trying to compile 3.5 in mavericks (mac os x 10.9)
I installed scons succesfully.

cd'ing to the rosetta_source dir, I do

> ./ -j8 mode=release bin

and I had several errors, basically not being able to find g++.4-2 (indeed, I do have /usr/bin/g++, but no g++.4-2) (full set of messages copied further below) ; so I followed some advices in this forum, changing the file in tools/build/basic.settings in two successive ways (that do not fix the problem):

1) editing the blocks around line 450, like
"gcc, 4.1, macos" : {
"overrides" : {
"cc" : "gcc-4.1",
"cxx" : "g++-4.1",

to indicate instead gcc and g++

2) editing the line on the main gcc bloc (around line 125)
"compile" : [ "pipe", "ffor-scope" ] ; to
"compile" : [ "pipe", "ffor-scope", "ftemplate-depth=1024" ]

3) making soft links to gcc and g++ like
sudo ln -s /usr/bin/g++ /usr/bin/g++-4.2
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2 (this option generates a huge amount of errors)

unfortunately nothing works....

As a matter of fact, workaround #1, gives a different kind of error messages like:

clangclang: : errorerror: : unknown argument: '-finline-limit=20000' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

Any help will be much appreciated!

Sat, 2014-04-12 20:15

It looks like you're calling the clang compiler, instead of gcc, despite apparently using the "g++" command. (Out of curiosity, what does "g++ --version" print for you? Your system may have g++ symlinked to clang.) I'd recommend adding the "cxx=clang" option to the scons commandline, as discussed above, to tell Rosetta that you're using the clang compiler. Alternatively, you can download and install a "real" gcc version, and try to use that. (Although I'm not sure how tricky that is on 10.9).

Another possibility is to just delete any occurrence of "'-finline-limit=20000" from rosetta_source/tools/build/basic.settings and see if that gets you anywhere.

Mon, 2014-04-14 08:50

Thanks a lot. At least I could move forward quite a bit, ...and have new error messages (unfortunately!).
So, yes, it appears that g++ and gcc are not the "real" guys

>g++ --version
Configured with: --prefix=/Applications/ --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix


...with a help of a colleague (thanks Ronan!), I eventually found out that I had a fink installation of gcc (under /sw/bin ; gcc-fsf-4.8 and g++-fsf-4.8)

Edited the rosetta_source/tools/build/basic.settings, to use these gcc & g++, and compilation finally started OK...although, after some time, this error came along:

ld: warning: directory not found for option '-Lbuild/external/release/macos/13.1/64/x86/gcc/4.2/default'
Undefined symbols for architecture x86_64:
"std::ctype::_M_widen_init() const", referenced from:
ObjexxFCL::get(std::basic_istream >&, ObjexxFCL::Fstring&) in Fstring.os
ObjexxFCL::getline(std::basic_istream >&, ObjexxFCL::Fstring&) in Fstring.os
ObjexxFCL::date(ObjexxFCL::Fstring&) in Time_Date.os
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
scons: *** [build/src/release/macos/13.1/64/x86/gcc/4.2/default/libObjexxFCL.dylib] Error 1
scons: building terminated because of errors.

...already tried to add the corresponding /sw/ directories lib and include in the basic.settings, but the error still shows up.
Your help is very much appreciated!

Tue, 2014-04-15 00:17

It looks like you still have versioning issues. It looks like Rosetta is thinking that the gcc version should be 4.2 (rather than the 4.8 that it is). That may be the reason for the issues you're having. Additionally, some Googling indicates that the error message you're seeing is likely the result of compiler mismatches. I'm guessing that it's still trying to use some of the old clang-based compilation stuff in conjunction with the new gcc compilation, resulting in confusion.

I'd recommend cleaning out the build directory (just delete everything under rosetta_source/build/) and then recompiling, but this time be sure to explicitly specify the compiler you're using and the version you want to use. (e.g. "scons cxx=gcc cxx_ver=4.8 mode=release bin")

Mon, 2014-04-21 08:38

If your still having problems, try compiling straight with clang. Add cxx=clang like Rocco's recommendation for gcc. Clang is much faster to compile and may work when gcc does not. Also, since your on mac, be sure to update your Xcode dev tools with the upgrade with 10.9. I had really horrible issues compiling after upgrading to Mavericks without also updating the dev tools.

Mon, 2014-04-21 13:43