Compiling Rosetta 3.2 on Mac OS X using scons

Member Site Forums Rosetta 3 Rosetta 3 – Build/Install Compiling Rosetta 3.2 on Mac OS X using scons

Viewing 4 reply threads
  • Author
    Posts
    • #965
      Anonymous

        hi & thanks in advance,

        preamble:

        Mac OS X version: 10.6.8 | # Processors: 1
        Rosetta version: 3.2
        scons version: 2.1.0.alpha.20101125
        Xcode version: 3.2.6
        UNIX Shell: bash

        problem:

        i’m having difficulties compiling Rosetta with scons.
        so far, i have followed the steps on the rosetta user guide page (at: (http://www.rosettacommons.org/manuals/archive/rosetta3.2_user_guide/)) to no avail.

        first i installed scons without administrative privileges using the command:

        $ python setup.py install –prefix=$HOME

        then i downloaded rosetta 3.2 as one bundle, and unarchived and unzipped it accordingly.

        next, i cd’d into rosetta source directory and then i attempted to compile rosetta with scons by using the command:

        $ python scons.py -j1 bin mode=release

        and i get the following error(s):


        sh: gcc: command not found
        sh: g++: command not found
        sh: gcc: command not found
        sh: g++: command not found
        sh: gcc: command not found
        sh: g++: command not found
        sh: gcc: command not found
        .
        .
        .
        .
        .
        .
        KeyError: “Unknown version number 8.0 for compiler ‘gcc'”
        scons: done reading SConscript files.
        scons: Building targets …
        scons: `bin’ is up to date.
        scons: done building targets.

        and my bin folder in the rosetta source is empty, following this run, so rosetta didn’t compile.

        questions:
        what are all the steps required to compile rosetta 3.2 on an imac machine ?
        and how do you then run rosetta?

        postscript:

        perhaps i don’t have the required gcc/make compiler/program? is this required for rosetta 3.2?

      • #5822
        Anonymous

          You don’t have GCC installed, apparently. I’m told you need the “developer tools” which come on a disc with the computer. http://www.rosettacommons.org/content/how-set-rosetta-3-mac-os#comment-2517

          “and how do you then run rosetta?”
          This is rather vague. What do you want to do with it…?

        • #5826
          Anonymous

            A) Try “which gcc” on command line. If you get nothing, then your system doesn’t know where its GCC is and it’s probably not installed. If you get something, then we need to figure out how to tell SCons where it is.

            B) http://www.rosettacommons.org/manuals/archive/rosetta3.2.1_user_guide/app_membrane_abinitio.html

          • #5833
            Anonymous

              last lines, after installing all files: scons: done building targets.
              A quick peek into the bin folder of rosetta_source reveals aliases to all the files installed. I suppose the installation was successful.

              Steps I took for Successful Installation of Rosetta 3.2 on Mac OS X using scons & GCC (Assuming you have an Academic License for Rosetta):

              1. Download scons, found here: http://www.scons.org/download.php
                then unpack it and change your working directory into the unpacked scons folder and install.
                for example (using the latest release as an example):

                • $ cd scons-2.1.0.alpha.20101125 // change working directory to unpacked scons folder
                • $ python setup.py install // install scons
                  (alternatively, $ python setup.py install –prefix=$HOME // install scons without administrative privileges)

              2. Install the Xcode package, this is found in the Optional Installs folder on your Mac OS X Install DVD.
                I used the default settings during installation. (GCC is installed as part of the package).
              3. Download Rosetta3.2: https://www.rosettacommons.org/software/academic/3.2/ . (I selected the “Rosetta 3.2 – as one bundle” option) And then double click the downloaded file. It is then unpacked by Archive Utility into your local directory into its own folder, by default as: rosetta3.2_bundles
              4. Go into the rosetta3.2_bundles folder and unzip the .tgz compressed files and this should create individual folders for each .tgz
                I unzipped all of them in one fell swoop: rosetta3.2_source, rosetta3.2_manual, rosetta3.2_fragments, rosetta3.2_demos, rosetta_database3.2, BioTools, & foldit.
                rosetta3.2_source and rosetta3.2_database are required, the rest are optional.
              5. In your Terminal shell, change your working directory into rosetta3.2_bundles, then go into rosetta_source directory.
              6. You are then ready to compile the source code using scons and GCC:
                I typed $ python scons.py -j1 bin mode=release // the option -jx is for number of processors you have to devote to compiling. I used 1 because I have one processor.
              7. Compiling source code usually takes about an hour. A bin folder is created. Check the bin folder inside the rosetta_source for a slew of Aliases to executable files.

              Thank you very much @smlewis !

            • #5907
              Anonymous

                I’ve been unable to successfully build Rosetta 3.2 (or 3.3) with scons on OS X:
                OS X: 10.6.3
                scons: v2.1.0
                gcc: 4.2.1
                from within rosetta_source: python scons.py bin mode=release // I’ve also tried it without the ‘mode’ flag

                I get the following errors (after about an hour):

                src/core/scoring/sc/ShapeComplementarityCalculator.cc: In member function ‘int core::scoring::sc::ShapeComplementarityCalculator::GenerateToroidalSurface(core::scoring::sc::Atom&, core::scoring::sc::Atom&, core::scoring::sc::ShapeComplementarityCalculator::Vec3, core::scoring::sc::ShapeComplementarityCalculator::Vec3, core::scoring::sc::ShapeComplementarityCalculator::ScValue, int)’:
                src/core/scoring/sc/ShapeComplementarityCalculator.cc:875:5: error: BB 29 is missing an EH edge
                src/core/scoring/sc/ShapeComplementarityCalculator.cc:875:5: error: BB 34 is missing an EH edge
                src/core/scoring/sc/ShapeComplementarityCalculator.cc:875:5: internal compiler error: verify_flow_info failed
                Please submit a full bug report,
                with preprocessed source if appropriate.
                See <http://gcc.gnu.org/bugs.html> for instructions.
                scons: *** [build/src/release/macos/10.6/64/x86/gcc/core/scoring/sc/ShapeComplementarityCalculator.os] Error 1
                scons: building terminated because of errors.

                Any help diagnosing this problem would be much appreciated. Thanks!

              • #5825
                Anonymous

                  i could be wrong, i thought gcc is automatically installed under Xcode.
                  at least there is a gcc-4.2 Unix Executable File in the usr/bin folder under Xcode.

                  yeah, ‘running rosetta’ is mighty vague; sorry for being ambiguous. my primary goal is to perform membrane ab-initio modeling.

                  thanks

                • #5831
                  Anonymous

                    at first, which gcc yielded a command not found message, other commands like finger yielded similar messages of command not found so I suspected something gone awry with my shell.

                    So, I went into the .profile file and removed a line that someone had recommended to add for rosetta’s compiling.
                    Then I tried which gcc again and it yielded: /usr/bin/gcc

                    Then I re-compiled using scons and it is in the process now.

                    Will post any error messages when it is done.

                  • #5909
                    Anonymous

                      I haven’t seen this internal compiler error before. Note that this is a bug in GCC, not a bug in Rosetta.

                      One option is to try a different compiler. A different version of GCC, or a different compiler entirely, is not likely to have the same problem.

                      A second option is to fiddle with the inlining limits. Many years ago, we set the compiler options for very greedy inlining, because at the time it improved performance. See this thread on how to fiddle with the inline limits: http://www.rosettacommons.org/node/2274

                      A third option is to try to disable or modify the code that fails to compile. I can’t reliably do this, since it doesn’t fail for me, but I can give you advice on attempting to excise just the failing code from ShapeComplementarityCalculator. (Note that this will mean you are missing some functionality; I’m guessing you only need that unit for docking based on its name, but I don’t know for sure.)

                    • #5910
                      Anonymous

                        Wow! Thanks for the reply. I’ve attempted using gcc 4.2 and 4.0 and received the same error. I think a reasonable option would be to comment out the shapeComplementarity function so it doesn’t get compiled. Can you give me advice for how to do this? Many thanks for the help.

                      • #5911
                        Anonymous

                          A) put a pound symbol (#) in front of ShapeComplementarityCalculator in the file src/core.3.src.settings (line 186); the line below it is commented out for comparison
                          B) Delete the #include in the file src/protocols/filters/ScFilter.cc (line 21), or comment it out by prepending //
                          C) stub out the “compute” function by replacing its contents (everything between { on line 76 and } on 126) with return 0;

                          I haven’t actually tried this but it will either work or almost work. (Um, ScFilter will of course be irretrievably broken, so I hope you aren’t doing anything with shape complenentarity.) I can debug it further if it doesn’t. (Since it works fine for me it’s hard for me to test if it will work for you…)

                        • #5912
                          Anonymous

                            Luki, author of ShapeComplementarityCalculator, suggests a different method for removing it (also removing ScFilter, instead of editing its internals).


                            I suspect that merely commenting out the GenerateToroidalSurface function will not be sufficient to build rosetta without the ScCalc. The compiler will probably get confused on something else then. To fully remove it:

                            1) Remove the line for ShapeComplementarityCalculator in src/core.3.src.settings
                            2) Remove the line for the ScFilter in src/protocols.src.settings
                            3) Remove the two lines for ScFilter in src/protocols/init.cc

                            I just tried it (Linux 64bit, gcc 4.1.2) and it builds successfully without it.”

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