Rosetta 3.4 on Ubuntu 12.04 – g++-4.6 not found

Member Site Forums Rosetta 3 Rosetta 3 – Build/Install Rosetta 3.4 on Ubuntu 12.04 – g++-4.6 not found

Viewing 7 reply threads
  • Author
    Posts
    • #1416
      Anonymous

        Hi Rosettaers,

        I am building Rosetta 3.4 on Unbuntu 12.04 running in VMWare player. I got the following error when I built it with scons bin mode=release:

        Running versioning script … fatal: Not a git repository (or any of the parent directories): .git
        Done. (0.1 seconds)
        scons: done reading SConscript files.
        scons: Building targets …
        g++-4.6 -o build/src/release/linux/3.2/32/x86/gcc/4.6/apps/public/AbinitioRelax.o -c -isystem external/boost_1_46_1/boost/ -isystem external/boost_1_46_1/boost/ -malign-double -march=pentium4 -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/32/gcc/4.6 -Isrc/platform/linux/32/gcc -Isrc/platform/linux/32 -Isrc/platform/linux -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include src/apps/public/AbinitioRelax.cc
        sh: 1: g++-4.6: not found
        scons: *** [build/src/release/linux/3.2/32/x86/gcc/4.6/apps/public/AbinitioRelax.o] Error 127

        Could anyone tell me what went wrong, and how I can fix it?

        Thanks!

      • #7835
        Anonymous

          This:

          “Running versioning script … fatal: Not a git repository (or any of the parent directories): .git”

          is irrelevant – it’s a leftover from the developers’ version control system and you can safely ignore it.

          This:
          “sh: 1: g++-4.6: not found”
          Is your problem. Your system can’t find g++-4.6. What command line did you use to compile (did you request gcc 4.6?) Is 4.6 installed on your system? What happens when you do “which gcc”? What about “which g++-4.6”?

        • #7845
          Anonymous

            Hi smlewis,
            Thanks for your comments. If I ran ‘which gcc’, the terminal told me ‘/usr/bin/gcc’; if I ran ‘which gcc-4.6’, the terminal told me ‘/usr/bin/gcc-4.6’. So it seems I have gcc-4.6 in the correct location.
            Sorry I should’ve been more specific about my previous comment on asking you to show me some sample scripts. I actually did not know what “symlink site.settings.topsail to site.settings” meant. So I googled symlink and I used the following command to symlink:
            ‘/rosetta3.4/rosetta_source/tools/build$ ln -s site.settings.topsail site.settings’
            I also made the line containing ‘INCLUDE’ a comment line by putting a ‘#’ in front of that line.
            I then tried to recompile using ‘/rosetta3.4/rosetta_source$ scons bin mode=release’, and I got a different error this time:

            scons: Reading SConscript files …
            Traceback (most recent call last):
            File “/home/ostrakon/Downloads/rosetta3.4/rosetta_source/SConstruct”, line 141, in main
            build = SConscript(“tools/build/setup.py”)
            File “/usr/lib/scons/SCons/Script/SConscript.py”, line 614, in __call__
            return method(*args, **kw)
            File “/usr/lib/scons/SCons/Script/SConscript.py”, line 551, in SConscript
            return _SConscript(self.fs, *files, **subst_kw)
            File “/usr/lib/scons/SCons/Script/SConscript.py”, line 260, in _SConscript
            exec _file_ in call_stack[-1].globals
            File “/home/ostrakon/Downloads/rosetta3.4/rosetta_source/tools/build/setup.py”, line 414, in
            build = setup()
            File “/home/ostrakon/Downloads/rosetta3.4/rosetta_source/tools/build/setup.py”, line 406, in setup
            build.settings = setup_build_settings(build.options)
            File “/home/ostrakon/Downloads/rosetta3.4/rosetta_source/tools/build/setup.py”, line 206, in setup_build_settings
            site = Settings.load(“site.settings”, “settings”)
            File “/home/ostrakon/Downloads/rosetta3.4/rosetta_source/tools/build/settings.py”, line 86, in load
            execfile(file, settings)
            File “site.settings”, line 28, in

            File “/usr/lib/python2.7/UserDict.py”, line 23, in __getitem__
            raise KeyError(key)
            KeyError: ‘LD_LIBRARY_PATH’
            scons: done reading SConscript files.
            scons: Building targets …
            scons: `bin’ is up to date.
            scons: done building targets.

            I am not sure if I did anything wrong again. Could you help me? Thank you very much.

          • #7847
            Anonymous

              So I tried it again after I commented out the line including LD_LIBRARY_PATH in tools/build/site.settings.topsail. I tried both ‘scons bin mode=release’ and ‘scons bin mode=release cxx=gcc cxx_ver=4.6’, and got the same error:

              scons: Building targets …
              g++-4.6 -o build/src/release/linux/3.2/32/x86/gcc/4.6/apps/public/AbinitioRelax.o -c -isystem external/boost_1_46_1/boost/ -isystem external/boost_1_46_1/boost/ -malign-double -march=pentium4 -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/32/gcc/4.6 -Isrc/platform/linux/32/gcc -Isrc/platform/linux/32 -Isrc/platform/linux -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/include -I/usr/local/include src/apps/public/AbinitioRelax.cc
              sh: 1: g++-4.6: not found
              scons: *** [build/src/release/linux/3.2/32/x86/gcc/4.6/apps/public/AbinitioRelax.o] Error 127
              scons: building terminated because of errors.

              Here it still said ‘g++-4.6 not found’. Does it really know where to look for gcc-4.6?

            • #7850
              Anonymous

                Thanks rmoretti!
                You are right, I did not have g++-4.6 on my ubuntu. When I ask ‘which g++’, the terminal did not give me any error msg but there was no answer, either. I thought it was okay until I checked Synaptic. Now I had g++ installed, and Rosetta is compiling. Hope it works! :)

              • #7852
                Anonymous

                  So if at the end of compilation, the terminal says ‘Install file: “build/src/release/linux/3.2/32/x86/gcc/4.6/vip.default.linuxgccrelease” as “bin/vip.default.linuxgccrelease”
                  scons: done building targets.’, that means the compilation is complete and successful, right?

                • #7853
                  Anonymous

                    “scons: done building targets”

                    This usually means everything is ok. There are ways to get it to go wrong, but it wouldn’t have given you long lists of “install file” lines in those cases.

                  • #9629
                    Anonymous

                      Hello, I have been dowloaded rosetta3.5, Please anyone tell me the installation procedure of Rosetta3.5 package on ubuntu OS.

                    • #7837
                      Anonymous

                        Hi smlewis,

                        Thanks for your reply.

                        I had both gcc (4:4.6.3-1ubuntu5) and the gcc-4.6-base (4.6.3-1ubuntu5) installed on this Ubuntu, with the version info is in the parentheses. I used Synaptic to install them, so does this mean they are redundant, or not installed in the correct place?

                      • #7838
                        Anonymous

                          Either gcc should work. The problem is that scons can’t find g++-4.6. Wherever synaptic put them is surely the correct place, it’s just a question of making sure scons looks there. Did you do anything to explicitly request 4.6, like “cxx_ver=4.6” or editing tools/build/(various settings) when you compiled (if you don’t remember doing it, the answer is no)? What happens when you do “which gcc”? What about “which g++-4.6”?

                          The first thing to try is cd rosetta_source/tools/build and symlink site.settings.topsail to site.settings (ln -s site.settings.topsail site.settings) and try recompiling. That activates some extra pathing lookups; compilation becomes more expensive but better able to find paths. You may need to comment out the INCLUDE line in that site.settings.topsail file.

                        • #7839
                          Anonymous

                            I actually used “scons bin mode=release cxx=gcc cxx_ver=4.4” according to this post: http://morganbye.net/blog/2011/05/rosetta-32-ubuntu-1104.
                            I tried “which gcc” or “which g++-4.6”, and they both gave the same error as in my original post.
                            I am not sure about how to “symlink site.settings.topsail to site.settings (ln -s site.settings.topsail site.settings)” and “comment out the INCLUDE line in that site.settings.topsail file”. Would you mind giving some sample scripts?
                            Many thanks!

                          • #7840
                            Anonymous

                              “I tried “which gcc” or “which g++-4.6”, and they both gave the same error as in my original post.

                              If “which gcc” from the shell reports that gcc is not found, like so:

                              ~> which gcc
                              gcc: Command not found.

                              then gcc isn’t installed, and you should use synaptic to install it. This seems unlikely given that you have package names. How are you running ‘which’…?

                              “I am not sure about how to “symlink site.settings.topsail to site.settings (ln -s site.settings.topsail site.settings)” “

                              starting from the rosetta_source directory, enter the commands:
                              cd tools/build
                              ln -s site.settings.topsail site.settings

                              “and “comment out the INCLUDE line in that site.settings.topsail file”. Would you mind giving some sample scripts?”

                              If you recompile, and it gives you an error message about INCLUDE (“KeyError: ‘INCLUDE'”), then open the file site.settings in your favorite text editor and put a pound symbol (#) in front of the line that contains INCLUDE (“include_path” : os.environ[“INCLUDE”].split(“:”),”)

                            • #7846
                              Anonymous

                                You can comment out the line including LD_LIBRARY_PATH in tools/build/site.settings.topsail in the same fashion that you commented out the line with INCLUDE, by putting a # symbol in front of it.

                              • #7848
                                Anonymous

                                  Note that it’s looking for ‘g++-4.6′, not ‘gcc-4.6′
                                  I would imagine that although a ‘which gcc-4.6’ give you a reasonable answer, doing a ‘which g++-4.6’ (or a ‘which g++’) would result in an error message.

                                  From what I can tell, Ubuntu separates out the gcc frontend and C compiler (gcc) and the C++ compiler (g++) into different packages. If the ‘which g++-4.6’ gives you an error, and you have install privileges on this machine, I would recommend using your favorite package manager to make sure the “g++” package is installed.

                                • #7851
                                  Anonymous

                                    The build-essential package is the package “meant” for compiling things yourself, and includes g++ along with gcc. You’re right, I hadn’t considered that someone would try installing gcc not via build-essential. (It’s like that developer’s toolkit thing that installs for OSX?)

                                  • #9632
                                    Anonymous

                                      The instructions at https://www.rosettacommons.org/content/how-install-rosetta-redhat-linux#comment-3997 should work.

                                      If you run into errors, you can start a new thread with your error message.

                                    • #9640
                                      Anonymous

                                        Thank U very much, rmoretti
                                        I have compiled csrosetta wk 52 release in my system and result look as building has done.
                                        but when i doing the TOOLbox Installation using the command given below, errors come as

                                        user@user-HCL-Desktop:~/csrosetta3$ ./install.py
                                        delete pyc files from
                                        AUTO-DETECTED: Running on linux…
                                        AUTO-DETECTION: check $PATH
                                        AUTO-DETECTION: look in $HOME/rosetta
                                        AUTO-DETECTION: check rosetta version in /home/user/rosetta/main/source via minirosetta.default.linuxgccrelease
                                        /home/user/rosetta/main/source/bin/minirosetta.default.linuxgccrelease: error while loading shared libraries: libcppdb.so: cannot open shared object file: No such file or directory
                                        AUTO-DETECTION FAILED: cannot find ROSETTA binaries.
                                        Run with -rosetta to point to binaries if toolbox is intended for automatic setup of CS-ROSETTA calculations
                                        AUTO-DETECTION FAILED: cannot find ROSETTA database.
                                        Run with -rosetta_database to point to database if toolbox is intended for automatic setup of CS-ROSETTA calculations
                                        check whether dunbrack library can be loaded from the binary file…
                                        /bin/sh: 1: None/score_jd2.default.linuxgccrelease: not found
                                        /bin/sh: 1: None/score_jd2.default.linuxgccrelease: not found
                                        Traceback (most recent call last):
                                        File “./install.py”, line 330, in
                                        if not check_dunbrack_library( rosetta_db_path, rosetta_bin, build, platform, final_msgs ):
                                        File “./install.py”, line 322, in check_dunbrack_library
                                        os.remove(‘score.sc’)
                                        OSError: [Errno 2] No such file or directory: ‘score.sc’
                                        user@user-HCL-Desktop:~/csrosetta3$

                                      • #9643
                                        Anonymous

                                          1) Please only post your question once – multiple posting won’t get your question answered any faster, and may slow things down, as it doesn’t collect all the information in one place.

                                          2) Please create a new thread for a new problem. To do so, click the “New Topic” button found on the appropriate subforum page, e.g. https://www.rosettacommons.org/forums/rosetta-3/rosetta-3-buildinstall
                                          Posting in an unrelated thread just confuses things, as it’s hard to tell if you’re running into the same issue or a different one. (For example, this thread is entitled “Rosetta 3.4 on Ubuntu 12.04 – g++-4.6 not found” — are you installing Rosetta3.4? Are you on Ubuntu 12.04? Are your getting a “g++-4.6 not found” error?)

                                        • #9644
                                          Anonymous

                                            Ok sir, next time I do this……

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