llmv-g++4.2 for mac os 10.8.5 to compile Rosetta3.5

Member Site Forums PyRosetta PyRosetta – Build/Install llmv-g++4.2 for mac os 10.8.5 to compile Rosetta3.5

Viewing 2 reply threads
  • Author
    Posts
    • #1830
      Anonymous

        Hello all,
        I try to build reosetta on a mac os 10.8.5 to use Erraser within Phenix 1.8.4-1496.
        When I type
        benoit1$ python external/scons-local/scons.py -j2 bin mode=release
        Verbose gives
        scons: Reading SConscript files …
        Running versioning script … Done. (0.0 seconds)
        scons: done reading SConscript files.
        scons: Building targets …
        llvm-g++-4.2 -o build/src/release/macos/10.8/64/x86/gcc/4.2/default/apps/public/AbinitioRelax.o -c -isystem external/boost_1_46_1/ -isystem external/include/ -pipe -ffor-scope -Wall -Wextra -pedantic -Wno-long-long -m64 -march=nocona -mtune=generic -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/64/gcc/4.2 -Isrc/platform/macos/64/gcc -Isrc/platform/macos/64 -Isrc/platform/macos -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include src/apps/public/AbinitioRelax.cc
        sh: llvm-g++-4.2: command not found
        scons: *** [build/src/release/macos/10.8/64/x86/gcc/4.2/default/apps/public/AbinitioRelax.o] Error 127
        llvm-g++-4.2 -o build/src/release/macos/10.8/64/x86/gcc/4.2/default/devel/init.os -c -isystem external/boost_1_46_1/ -isystem external/include/ -pipe -ffor-scope -Wall -Wextra -pedantic -Wno-long-long -m64 -march=nocona -mtune=generic -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/64/gcc/4.2 -Isrc/platform/macos/64/gcc -Isrc/platform/macos/64 -Isrc/platform/macos -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include src/devel/init.cc
        sh: llvm-g++-4.2: command not found
        scons: *** [build/src/release/macos/10.8/64/x86/gcc/4.2/default/devel/init.os] Error 127
        scons: building terminated because of errors.
        Apparently llmv-g++-4.2 is not installed on my machine. Anyone know how to do that since I didn’t manage even after updating the Xcode5.0.2 command line.
        Thanks in advanceā€¦
        benoit

      • #9792
        Anonymous

          What compiler do you want to use? (Which ones do you have installed? IIRC, you need to explicitly install the developer tools on Macs to get a compiler – the default installation doesn’t have a compiler installed.)

          There’s a number of options that the Rosetta scons setup takes which can control which compiler is used for builds. In the absence of the flags, it tries to do autodiscovery, which *usually* works. Run with the -h option to see the full description of what options are available, but the ones you’re most interested in are likely cxx and cxx_version. Adding something like “cxx=clang” or “cxx=clang cxx_ver=3.3” to the commandline might help. (Change compiler and version as appropriate for your system.)

          By the way, if the compiler you do want to run is actually llvm-g++-4.2 and it’s installed, a likely cause of the error message is some issue with your path. You need to be at a point where doing a “which llvm-g++-4.2” gives you the path to your compiler. You may just need to add a symlink in a bin directory, or add something to your path in your shell setup file.

        • #9796
          Anonymous

            Thanks again. I input the command line as you suggested and it output the following. Still this llmv-g++4.2 appearing in the verbose. Any advice?
            Cheers.

            Benoit

            MacBook-Pro-de-Benoit:source benoit1$ python external/scons-local/scons.py bin mode=release cxx=gcc
            scons: Reading SConscript files …
            Running versioning script … Done. (0.0 seconds)
            scons: done reading SConscript files.
            scons: Building targets …
            llvm-g++-4.2 -o build/src/release/macos/10.8/64/x86/gcc/4.2/default/apps/public/AbinitioRelax.o -c -isystem external/boost_1_46_1/ -isystem external/include/ -pipe -ffor-scope -Wall -Wextra -pedantic -Wno-long-long -m64 -march=nocona -mtune=generic -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/64/gcc/4.2 -Isrc/platform/macos/64/gcc -Isrc/platform/macos/64 -Isrc/platform/macos -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include src/apps/public/AbinitioRelax.cc
            sh: llvm-g++-4.2: command not found
            scons: *** [build/src/release/macos/10.8/64/x86/gcc/4.2/default/apps/public/AbinitioRelax.o] Error 127
            scons: building terminated because of errors.

          • #9794
            Anonymous

              Thanks for your answer.

              I don’t know how to edit scons.py to specifically use a given compiler. Scons.py seems to call llvm-g++-4.2 since the verbose mentions the command is not found. But I don’t have it installed and don’t manage to do it. I have gcc and g++ in /usr/bin. Xcode has installed gcc and g++ (which gcc answer positively /usr/bin/gcc). There are 2 ways to solve the pb according to your answer, either changing the compiler in scons.py, or to install llvm-g++-4.2 which I don’t manage to find or install.

            • #9795
              Anonymous

                You don’t need to actually edit the scons.py script, you just need to add parameters to your commandline. As you want a regular gcc compiler, all you have to do is change the command from this:

                python external/scons-local/scons.py -j2 bin mode=release

                To this:

                python external/scons-local/scons.py -j2 bin mode=release cxx=gcc

              • #9797
                Anonymous

                  Okay, I was off on telling you to use “cxx=gcc”, as the issue is that Rosetta apparently thinks that the “gcc” compiler for MacOS 10.8 is called “llvm-g++-4.2”.

                  The surefire way to fix it is to go into rosetta_source/tools/build/basic.settings, find the “gcc, 4.2, macos, 10.8” and “gcc, 4.2, macos, 10.7” blocks at around line 440, and change the “llvm-gcc-4.2” and “llvm-g++-4.2” to “gcc” and “g++” respectively.

                • #9798
                  Anonymous

                    Hello,
                    Your suggestion helped a lot. At least I got compilation to proceed. However compilation stopped at some point due to an error. Follows the verbose.

                    boost::proto::exprns_::expr boost::phoenix::actor boost::fusion::vector, boost::spirit::argument<0>, boost::fusion::void_,
                    boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
                    boost::fusion::void_, boost::fusion::void_> > > &>, 0> >, 2> &>, 2> &>, 2> &>, 1> &>, 2> >’ requested here
                    expression =
                    ^
                    external/boost_1_46_1/boost/mpl/aux_/preprocessed/gcc/apply.hpp:45:20: note: use -ftemplate-depth=N to increase
                    recursive template instantiation depth
                    typename lambda::type
                    ^
                    1 error generated.
                    scons: *** [build/src/release/macos/10.8/64/x86/gcc/4.2/default/numeric/Calculator.os] Error 1
                    scons: building terminated because of errors.

                    Thanks in advance for your help.

                    benoit

                  • #9818
                    Anonymous

                      Which version of g++ are intending running, exactly? (What does “g++ –version” report?)

                      I tracked down some old versions of gcc, and the earliest version I could get to compile was 4.6. Earlier version, including 4.1 and 4.2, errored out with template issues (though not the issue you’re seeing) – though some of that might be other random settings on the machine I was trying it on.

                      The other thing you may be able to try is following the compiler error message, and add the ftemplate-depth flag to the compiler flags. Go to main/source/tools/build/basic.settings and around line 125 or so, in the main “gcc” block, find the line that sets the compile flags (something like `”compile” : [ “pipe”, “ffor-scope” ],`) and change it to something like `”compile” : [ “pipe”, “ffor-scope”, “ftemplate-depth=1024” ],`

                    • #9834
                      Anonymous

                        To clarify, Rosetta still supports compilation with gcc 4.1. It looks like the issues I was having with earlier gcc versions has to do with the way they were installed on my system. The main Rosetta testing server is using gcc 4.1 and 4.2 and is not having issues with compilation.

                      • #9844
                        Anonymous

                          Hello,

                          The fttemplate-depth modification was the trick!

                          Below follow the last lines of the verbose before getting back the prompt control. No error has been reported and all files have been installed a priori.

                          Install file: “build/src/release/macos/10.8/64/x86/gcc/4.2/default/zinc_heterodimer_design.default.macosgccrelease” as “bin/zinc_heterodimer_design.default.macosgccrelease”
                          scons: done building targets.
                          MacBook-Pro-de-Benoit:source benoit1$

                          Now I can check if it works within Phenix.

                          Many thanks.

                          Benoit

                      Viewing 2 reply threads
                      • You must be logged in to reply to this topic.