This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:compiling_gcc [2012/09/04 13:32] adymond [Compiling GCC 4.6.3 from Source (STILL UNDER CONSTRUCTION)] |
howto:compiling_gcc [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Compiling GCC 4.6.3 from Source | + | ====== Compiling GCC 4.7.1 from Source ====== |
| - | This guide is written as to aid CHPC users who are struggling to compile the GCC version required for their codes. For the official guide on compiling GCC please visit the [[http:// | + | This guide is written as to aid CHPC users who are struggling to compile the |
| + | GCC version required for their codes. For the official guide on compiling GCC | ||
| + | please visit the [[http:// | ||
| + | documents how GCC 4.7.1 would be built on the Sun Tsessbe Cluster login node, | ||
| + | after the August 2012 upgrades. | ||
| - | Before you begin, make sure your bash environmental variable are set to their defaults. i.e. All additions to //~/.bashrc// file ([[quick: | + | This guides use the temporary working |
| - | $ gcc --version | + | directory of $HOME/local |
| - | gcc (GCC) 4.1.2 | + | |
| - | Also it recommended that a temporary or scratch directory is used to do all the compilation in (i.e. ~/scratch or /tmp/$USER), as to save disk space in your home directory. | + | Before you begin, comment out all alterations to your //~/.bashrc// file |
| + | ([[quick: | ||
| + | should see, should see the following from | ||
| + | the shell | ||
| + | $ gcc -v | ||
| + | Using built-in specs. | ||
| + | Target: x86_64-unknown-linux-gnu | ||
| + | Configured with: / | ||
| + | Thread model: posix | ||
| + | gcc version 4.1.2 20080704 (Red Hat 4.1.2-52) | ||
| - | Finally, note that for this guide, all binary | + | Note on the lib folder naming conventions, the standard in 2012 is to have |
| - | ===== Prerequisites ==== | + | libraries 64 bit by default, and some 32 bit libraries |
| + | 12.04 for example, the following library folder name convention is used | ||
| + | / | ||
| - | A table showing what tools and package for building GCC, and what is available on the cluster login node (this is where GCC will be built) | + | However, on the login node which is little older, its the other way round. The |
| + | lib folder refers to 32 bit libraries by default, while the lib64 is for 64 bit | ||
| + | libraries. ie its the chpc nodes have the following naming convention | ||
| + | / | ||
| + | |||
| + | So when you install software, which is 64 bit (default these days) remember you | ||
| + | want to install it in the lib64 and not the lib folder, as the lib64 folders are | ||
| + | searched first. ie use the following compilation flag --libdir=$HOME/ | ||
| + | |||
| + | ===== Setting up the latest GNU binutils and libtool ===== | ||
| + | |||
| + | The latest version of of these libraries are going to be setup in the your | ||
| + | local directory | ||
| + | |||
| + | === BinUtils === | ||
| + | |||
| + | BinUtils version | ||
| + | $ ld --version | ||
| + | GNU ld version 2.17.50.0.6-20.el5_8.3 20061020 | ||
| + | $ ld --verbose | grep SEARCH | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | |||
| + | Install the latest version of GNU bin utils, as follows | ||
| + | $ mkdir -p / | ||
| + | $ cd / | ||
| + | $ wget http:// | ||
| + | $ tar -xf binutils-2.22.tar.gz | ||
| + | $ mkdir binutils-2.22/ | ||
| + | $ cd binutils-2.22/ | ||
| + | $ mkdir $HOME/ | ||
| + | $ ../ | ||
| + | $ make # takes a couple of minutes | ||
| + | $ make check 1> make.check 2>&1 # should take 5 minutes to complete | ||
| + | If all tests are passed: | ||
| + | $ grep -i -e pass -e fail -e summary make.check | ||
| + | === binutils Summary === | ||
| + | # of expected passes 94 | ||
| + | === gas Summary === | ||
| + | # of expected passes | ||
| + | === ld Summary === | ||
| + | # of expected passes 703 | ||
| + | # of expected failures 61 | ||
| + | ./ | ||
| + | proceed, | ||
| + | make install | ||
| + | |||
| + | Add the following to bashrc file, | ||
| + | export PATH=$HOME/ | ||
| + | export PATH=$HOME/ | ||
| + | unset LD_LIBRARY_PATH | ||
| + | |||
| + | log in and out again, and | ||
| + | $ ld -v | ||
| + | GNU ld (GNU Binutils) 2.22 | ||
| + | And neatly enough, now your local paths have been added to the ld search pash | ||
| + | $ ld --verbose | grep SEARCH | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | SEARCH_DIR("/ | ||
| + | kewl, :) | ||
| + | |||
| + | SideNote : the LD_LIBRARY_PATH variable does not effect the output of | ||
| + | //ld --verbose | grep SEARCH // | ||
| + | |||
| + | === libtool === | ||
| + | |||
| + | Take moment the reader though the libtool configuration, | ||
| + | $libtool --config | less | ||
| + | $libtool --version | ||
| + | ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) | ||
| + | |||
| + | Download source | ||
| + | $ cd / | ||
| + | $ wget ftp:// | ||
| + | $ tar -xf libtool-2.4.2.tar.gz | ||
| + | $ cd libtool-2.4.2 | ||
| + | $ mkdir BUILD | ||
| + | $ cd BUILD | ||
| + | $ ../ | ||
| + | $ make | ||
| + | $ make check 1> make.check 2>& | ||
| + | screen and tail output... | ||
| + | $ make install | ||
| + | |||
| + | check everything out | ||
| + | $libtool --version | ||
| + | libtool (GNU libtool) 2.4.2 | ||
| + | $libtool --config | less | ||
| + | |||
| + | ===== GCC Prerequisites ===== | ||
| + | |||
| + | A table showing what tools and package for building GCC, and what is available | ||
| + | on the cluster login node (this is where GCC will be built) | ||
| ^ ** Prerequisite ** ^ ** Version Required (or later) ** ^ ** Available ** | | ^ ** Prerequisite ** ^ ** Version Required (or later) ** ^ ** Available ** | | ||
| | ISO C90 compiler | | ISO C90 compiler | ||
| - | | GNAT | ? | ? | | + | | GNAT | ? | ? | |
| | A “working” POSIX compatible shell, or GNU bash | | bash available | | | A “working” POSIX compatible shell, or GNU bash | | bash available | | ||
| | awk |GNU awk version 3.1.5 | GNU awk version 3.1.5 | | | awk |GNU awk version 3.1.5 | GNU awk version 3.1.5 | | ||
| - | | GNU binutils | | ? | | + | | GNU binutils | | 2.17 | |
| | gzip | 1.2.4 | 1.3.5 | | | gzip | 1.2.4 | 1.3.5 | | ||
| | gzip2 | 1.0.2 | 1.0.3 | | | gzip2 | 1.0.2 | 1.0.3 | | ||
| Line 25: | Line 137: | ||
| | Perl | 5.6.1 | 5.8.8 | | | Perl | 5.6.1 | 5.8.8 | | ||
| | jar, or InfoZIP | | ? | | | jar, or InfoZIP | | ? | | ||
| - | | GMP Library | + | | GMP Library |
| - | | MPFR Library | + | | MPFR Library |
| | MPC Library | | MPC Library | ||
| + | | PPL Library | ||
| + | | ClooG Library | ||
| - | So the GMP, MPFR and MPC support libraries need to build before install gcc. Also note from [[http:// | + | ClooG note, online docs and compiler checks differ on this one. Online docs |
| - | "While any sufficiently new version | + | say ClooG 0.17 (built using the ISL 0.10) is required, where gcc configure |
| + | checks for Cloog 0.16.X. But the conpiler does have an option to ignore Cloog | ||
| + | version, | ||
| + | ISL version of Cloog. | ||
| - | ==== GMP ==== | + | Also note from [[http:// |
| + | http:// | ||
| + | "While any sufficiently new version of required tools usually work, library | ||
| + | requirements are generally stricter. Newer versions may work in some cases, | ||
| + | but it's safer to use the exact versions documented" | ||
| - | [[http:// | + | ==== gcc-4.2.4 compilers ==== |
| - | Download the GMP source code | + | The gcc-4.2.4 c and c++ compilers are going to be used to build the require |
| - | $ cd ~/scratch #or cd /tmp/$USER if luster is misbehaving | + | libraries. The gcc-4.2 branch is the last gcc sub version, which does require |
| - | $ wget ftp://ftp.gmplib.org/ | + | the GMP, MPFR or MPC libraries. |
| - | $ tar -xf gmp-5.0.5.tar.bz2 | + | |
| + | download source | ||
| + | $ cd / | ||
| + | $ wget http:// | ||
| + | uncompress | ||
| + | $ tar -xf gcc-4.2.4.tar.bz2 | ||
| - | Configure GMP | + | configure |
| - | $ cd gmp-5.0.5 | + | $ cd gcc-4.2.4 |
| - | $ mkdir BUILD_gcc_4.1.2 | + | $ mkdir BUILD |
| - | $ cd BUILD_gcc_4.1.2 | + | $ cd BUILD |
| - | $ ../ | + | $ mkdir / |
| - | + | $ ../ | |
| - | Build, if this process is interrupted try run make again | + | |
| - | | + | |
| - | + | ||
| - | Test it! | + | |
| - | $ make check | + | |
| - | + | ||
| - | If all the test are passed (no critical error is thrown for `make check' | + | |
| - | $ make install | + | |
| - | ==== MPFR ==== | + | build inside a screen session |
| + | $ screen | ||
| + | $ make > make.out 2>& | ||
| + | # crtl-a crtl-d to detach screen | ||
| + | $ tail -f make.out #to watch compilation progress | ||
| + | # after the make is complete, close the screen session by $ screen -r, then | ||
| + | ctrl-d | ||
| - | The [[ http://www.mpfr.org/ | MPFR library ]] is a C library for multiple-precision floating-point computations with correct rounding | + | This compiliation took just under 2 hours to complete, when this guide was |
| + | written. Future work, disabling the build of lib java will probabily reduce | ||
| + | the build time to less then an hour | ||
| - | Download | + | Before continuing its probabily a good idea to test the gcc build .... |
| - | $ cd ~/scratch #or cd /tmp/$USER if luster is misbehaving | + | |
| - | $ wget wget http://www.mpfr.org/ | + | |
| - | $ tar -xf mpfr-3.1.1.tar.gz | + | |
| - | Configure MPFR | + | === testing === |
| - | $ cd mpfr-3.1.1 | + | |
| - | $ mkdir BUILD_gcc_4.1.2 | + | |
| - | $ cd BUILD_gcc_4.1.2 | + | |
| - | $ ../ | + | |
| - | ** NB ** make sure you see `checking if gmp.h version and libgmp version are the same... (5.0.5/ | + | $ screen |
| + | $ make -k check > make.check 2>& | ||
| + | # ctrl-a crtl-d | ||
| + | $ tail -f make.check | ||
| - | Build it, | + | Tests took about 2 hours to complete. |
| - | $ make | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | Test, | + | |
| - | $ make check | + | |
| - | + | ||
| - | If all the test are passed, install | + | |
| - | $ make install | + | |
| - | ==== | + | Test results, when writing this guide |
| + | $ grep -e '# of ' -e Summary / | ||
| + | | ||
| + | # of expected passes 42433 | ||
| + | # of expected failures 127 | ||
| + | # of unresolved testcases 1 | ||
| + | # of untested testcases 28 | ||
| + | # of unsupported tests 405 | ||
| + | === g++ Summary | ||
| + | # of expected passes | ||
| + | # of expected failures 67 | ||
| + | # of unsupported tests 106 | ||
| - | Gnu [[http:// | ||
| - | Download the MPC source code | + | Only continue with this guide if all the tests are passed |
| - | $ cd ~/scratch #or cd / | + | |
| - | $ wget http:// | + | |
| - | $ tar -xf mpc-1.0.tar.gz | + | |
| - | Configure GMP | + | === installation of gcc === |
| - | $ cd mpc-1.0 | + | |
| - | $ mkdir BUILD_gcc_4.1.2 | + | Install |
| - | $ cd BUILD_gcc_4.1.2 | + | |
| - | $ ../ | + | |
| - | + | ||
| - | Build and test | + | |
| - | $ make | + | |
| - | $ make check | + | |
| - | + | ||
| - | If all the tests are passed | + | |
| $ make install | $ make install | ||
| - | | ||
| - | ==== ISL Library version ==== | ||
| - | $ wget ftp:// | + | Next the [[ |
| + | http:// | ||
| + | | environment variables affecting GCC 4.2.4 ]] need to be set. Add the | ||
| + | following lines to your .bashrc script file, | ||
| + | # temporary gcc 4.2.4 build | ||
| + | export PATH=/ | ||
| + | export LD_LIBRARY_PATH=/ | ||
| + | export C_INCLUDE_PATH=$HOME/ | ||
| + | export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH | ||
| + | //Note//, the $HOME/ | ||
| + | going to be built using gcc 4.2.4 for the latest gcc version. | ||
| + | |||
| + | then logout and in again. You should see the following | ||
| + | $ gcc -v | ||
| + | ... | ||
| + | gcc version 4.2.4 | ||
| + | |||
| + | Also check your include paths, and library paths using | ||
| + | $ echo | gcc -v -x c -E - | ||
| + | $ echo | gcc -v -x c++ -E - | ||
| + | |||
| + | Check, gcc | ||
| + | $ gcc -Wl, | ||
| + | |||
| + | ==== helper script | ||
| + | |||
| + | The libraries required all follow the same build procedure, | ||
| + | 1. download and extract | ||
| + | 2. configure | ||
| + | 3. make | ||
| + | 4. make check, and in some cases | ||
| + | 5. make install | ||
| + | |||
| + | |||
| + | So a helper script is used to help automate the process. THe helper script | ||
| + | // | ||
| + | $ mkdir $HOME/ | ||
| + | $ cd $HOME/ | ||
| + | $ wget http:// | ||
| + | $ chmod +x download_and_install_from_source.sh | ||
| + | |||
| + | return to your home folder, and you should see | ||
| + | $ cd ~/ | ||
| + | $ download_and_install_from_source.sh | ||
| + | Usage: download_and_install_from_source.sh | ||
| + | |||
| + | This helper script, is used in the rest of the guide. DO NOT USE THIS SCRIPT BLINDLY | ||
| + | WITH OUT READING THE APPS DOCUMENTATION AND CONFIGURATION OPTIONS. | ||
| + | |||
| + | |||
| + | ==== GMP library ==== | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | We could: | ||
| + | $ cd / | ||
| + | $ wget ftp:// | ||
| + | $ tar -xf gmp-5.0.5.tar.bz2 | ||
| + | $ cd gmp-5.0.5 | ||
| $ mkdir BUILD | $ mkdir BUILD | ||
| $ cd BUILD | $ cd BUILD | ||
| - | $ ../ | + | $ ../ |
| $ make | $ make | ||
| $ make check | $ make check | ||
| $ make install | $ make install | ||
| - | + | ||
| - | ==== CLOOG ==== | + | OR simply use our helper script |
| + | $ download_and_install_from_source.sh ftp:// | ||
| + | | ||
| + | |||
| + | Assert that everyting went okay. When the | ||
| + | // | ||
| + | check results. You should see a whole bunch of passes and no | ||
| + | fails. Do this for the following library builds as well. | ||
| + | |||
| + | Finally copy the libraries to the gcc 4.2.4 of search path folder | ||
| + | $ cp -v $HOME/ | ||
| + | |||
| + | === lib64 and lib === | ||
| + | |||
| + | gcc and the linker search the 64 bit library folders first then the normal (32 | ||
| + | bit folders afterwards (check out $ ld --verbose ). By default the latest | ||
| + | versions of gmp install there 64 bit libraries under the lib folder and the | ||
| + | lib64 folder. Which kind of makes sense; i.e. in the future is there going to | ||
| + | need to be lib256 folder? | ||
| + | |||
| + | The problem is that on the login node gmp in installed in the / | ||
| + | folder. So this folder is found first using the linker and gcc compared to the | ||
| + | /usr/lib folder for example. That is why the compiled libraries are installed | ||
| + | and copied to the 64 bit folders. | ||
| + | |||
| + | ==== MPFR library ==== | ||
| + | |||
| + | The [[ http:// | ||
| + | |||
| + | $ download_and_install_from_source.sh http:// | ||
| + | / | ||
| + | $ cp -v $HOME/ | ||
| + | |||
| + | ==== MPC library==== | ||
| + | |||
| + | Gnu [[http:// | ||
| + | complex numbers with arbitrarily high precision and correct rounding of the result | ||
| + | |||
| + | $ download_and_install_from_source.sh http:// | ||
| + | / | ||
| + | $ cp -v $HOME/ | ||
| + | |||
| + | ==== PPL ==== | ||
| + | |||
| + | [[http:// | ||
| + | targeted at applications in the field of analysis and verification of complex systems. | ||
| + | |||
| + | This one takes a while, so the use screen is recommened: | ||
| + | $ screen | ||
| + | $ download_and_install_from_source.sh \ | ||
| + | http:// | ||
| + | / | ||
| + | " | ||
| + | | ||
| + | detach_screen, | ||
| + | $ tail -f / | ||
| + | $ tail -f / | ||
| + | |||
| + | make, takes 15 minutes | ||
| + | make ckeck, takes 3 hours 15 minutes | ||
| + | |||
| + | copy libraries, to gcc 4.2.4 search path | ||
| + | $ cp -v $HOME/ | ||
| + | |||
| + | |||
| + | |||
| + | ==== CLOOG library | ||
| + | |||
| + | First ISL needs to be installed, | ||
| + | $ download_and_install_from_source.sh \ | ||
| + | ftp:// | ||
| + | / | ||
| + | $ cp -v $HOME/ | ||
| [[http:// | [[http:// | ||
| - | $ wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.10.tar.gz | + | $ download_and_install_from_source.sh |
| - | extract, then create and enter build direction. Configure as follows | + | http://www.bastoul.net/cloog/pages/download/cloog-0.17.0.tar.gz |
| - | $ ../configure | + | |
| - | Test it. Install. | + | $ cp -v $HOME/ |
| - | ===== Download | + | |
| + | With the required libraries now available, the main GCC build can begin. | ||
| + | |||
| + | ===== Downloading | ||
| + | |||
| + | $ cd / | ||
| + | $ wget http:// | ||
| + | $ tar -xf gcc-4.7.1.tar.bz2 | ||
| - | Now that the Prerequisites are ready, GCC can be downloaded (i use an http mirror as the ftp mirrors seem to be blocked?). Download GCC | ||
| - | $ cd ~/scratch #or cd /tmp/$USER | ||
| - | $ wget http:// | ||
| - | $ tar -xf gcc-4.6.3.tar.bz2 | ||
| - | | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| | | ||
| - | $ cd gcc-4.6.3/ | + | $ cd gcc-4.7.1/ |
| $ mkdir BUILD | $ mkdir BUILD | ||
| $ cd BUILD | $ cd BUILD | ||
| - | $ ../ | + | $ ../ |
| + | | ||
| + | --with-mpc-include=$HOME/ | ||
| + | --with-mpfr-include=$HOME/ | ||
| + | --with-gmp-include=$HOME/ | ||
| + | | ||
| + | | ||
| + | The following languages will be built: c, | ||
| + | *** This configuration is not supported in the following subdirectories: | ||
| + | | ||
| + | (Any other directories should still work fine.) | ||
| ===== Compiling GCC ===== | ===== Compiling GCC ===== | ||
| Once the configuration is complete, use Make to build GCC | Once the configuration is complete, use Make to build GCC | ||
| - | |||
| - | $make | ||
| - | |||
| - | The compilation process may be unstable, throwing errors such as | ||
| - | * xgcc: internal compiler error: Killed (program cc1) | ||
| - | * gcj: internal compiler error: Killed (program jc1) | ||
| - | |||
| - | In these cases, the make process was interrupted due to compile command being killed (try killall cc1 from another shell, while make is running to replicate this error...). My guess is that, in order to prevent users from running jobs from the login node, a ulimit is set as to kill processes running for a long time. These errors can be overcome by rerunning make. You can either do this manually, or automatically. The automatic approach entails | ||
| $ screen | $ screen | ||
| - | $ for i in `seq 1 25` ; do echo MAKE CALL $i ; make ; sleep 30 ; done >> make.out 2>& | + | $ make > make.out 2>& |
| - | # detach screen using ctrl-D | + | # detach screen using ctrl-a crtl-d |
| $ tail -f make.out | $ tail -f make.out | ||
| - | The benefit about this screen approach beyond saving you grey hairs, is that if ssh connection is lost or you close terminal, | + | Expect |
| + | The benefit about this screen approach beyond saving you grey hairs, is that | ||
| + | if ssh connection is lost or you close terminal, the compilation job will keep | ||
| + | going. The compilation can take multiple hours... Beware though, the screen | ||
| + | session uses your default environmental variables defined in your .bashrc | ||
| + | file. | ||
| + | ==== Trouble shooting compilation errors ==== | ||
| - | ===== Testing GCC build ===== | + | === refer to config.log errors |
| + | |||
| + | When make encounters an error and aborts the stating refer to config.log for | ||
| + | further information. The trick is find the folder make was in when it threw | ||
| + | that error. This can be done by inspecting the last command executed before | ||
| + | make halted. the //ls// command with the -lh flag can also be used to find | ||
| + | which folder was modified last. | ||
| - | Before testing | + | Once the folder is found, read through the config.log file to get further |
| - | $ cd ~/scratch | + | information on the error. If nessary, take the config file contents available |
| - | $ wget http:// | + | in the configure.log file, and paste them into a temporary file |
| - | $ tar -xf dejagnu-1.5.tar.gz | + | ie. //config_debug.c// and rerurn the broken xonfigure command using that |
| - | $ cd dejagnu-1.5/ | + | file. A big help here is to add the -v flag to the xgcc compiler. |
| - | $ mkdir BUILD #do not build from src directory! | + | |
| - | $ cd BUILD | + | |
| - | $ ../ | + | |
| - | $ make | + | |
| - | $ make check # ensure that all test are passed before installation | + | |
| - | $ make install | + | |
| - | Then sit back for couple of hours while the testing is done, again i used screen so the test wont be interrupted in the event of a lost connection | + | ===== Testing ===== |
| - | | + | Test your gcc build before installing it. |
| + | | ||
| $ screen | $ screen | ||
| $ make -k check > make.check 2>&1 | $ make -k check > make.check 2>&1 | ||
| - | # detach screen using Ctrl-D | + | # detach screen using ctrl-a ctrl-d |
| $ tail -f make.check | $ tail -f make.check | ||
| - | After a couple of hours the tests where complete. Selected summaries from the test results (for the build done for this guide) where as follows | + | Testing took 3hrs 30 minutes |
| - | | + | After the testing was completed, i had the following results |
| - | | + | $ grep -e '# of ' -e Summary / |
| - | # of expected passes | + | |
| - | # of unexpected failures | + | # of expected passes 87683 |
| - | # of unexpected successes | + | # of unexpected failures 37 |
| - | # of expected | + | # of unexpected successes 40 |
| - | # of unsupported tests 2067 | + | # of expected |
| - | | + | # of unsupported tests 1262 |
| - | | + | === g++ Summary === |
| - | | + | # of expected passes 48687 |
| - | # of expected passes | + | # of unexpected failures 8 |
| - | # of unexpected failures | + | # of expected failures 286 |
| - | # of unexpected | + | # of unsupported tests 558 |
| - | # of expected failures | + | === gfortran Summary === |
| - | # of unsupported tests 371 | + | # of expected passes 41001 |
| - | + | # of expected failures 56 | |
| - | === gfortran | + | # of unsupported tests 69 |
| - | + | === objc Summary === | |
| - | # of expected passes | + | # of expected passes 2988 |
| - | # of expected failures | + | # of expected failures 6 |
| - | # of unsupported tests 67 | + | # of unsupported tests 74 |
| + | === libstdc++ Summary === | ||
| + | # of expected passes 8900 | ||
| + | # of expected failures 43 | ||
| + | # of unsupported tests 145 | ||
| + | === libmudflap Summary === | ||
| + | # of expected passes 1905 | ||
| + | # of unexpected | ||
| + | === libffi Summary === | ||
| + | # of expected passes 1634 | ||
| + | # of expected failures 10 | ||
| + | # of unsupported tests 55 | ||
| + | | ||
| + | # of expected passes 2574 | ||
| + | | ||
| + | | ||
| + | # of unsupported tests 1 | ||
| + | === libgomp Summary === | ||
| + | # of expected passes 2998 | ||
| + | === libitm Summary === | ||
| + | # of expected passes 26 | ||
| + | # of expected failures 3 | ||
| + | # of unsupported tests 1 | ||
| - | Which is good enough for my purposes since i installed GCC 4.6.2 for the latest gfortran version which passed all its tests ... | + | |
| + | If the testing results are acceptable | ||
| ===== Installation ===== | ===== Installation ===== | ||
| - | If the test results are satisfactory, | + | from inside |
| $ make install | $ make install | ||
| - | from the gcc BUILD directory. You will also want to add the following lines to ~/.bashrc file | ||
| - | | ||
| - | export LD_LIBRARY_PATH=~/ | ||
| - | export LD_LIBRARY_PATH=~/ | ||
| - | export PATH=~/ | ||
| - | export LDFLAGS=" | ||
| - | export CPPFLAGS=" | ||
| - | export CXXFLAGS=$CPPFLAGS | ||
| - | export F77=gfortran | ||
| - | | ||
| - | Next time you login, you should see | ||
| - | $ gcc --version | + | Remove all the lines added to your rc file since the start of this guide, and |
| - | gcc (GCC) 4.6.2 | + | replace them with |
| - | Copyright (C) 2011 Free Software Foundation, Inc. | + | |
| - | This is free software; see the source for copying conditions. | + | |
| - | | + | |
| - | have fun! | + | export PATH=$HOME/ |
| + | export LD_LIBRARY_PATH=$HOME/ | ||
| + | |||
| + | log in and out again, and | ||
| + | $ gcc -v | ||
| + | Target: x86_64-unknown-linux-gnu | ||
| + | ... | ||
| + | Thread model: posix | ||
| + | gcc version 4.7.1 (GCC) | ||
| + | |||
| + | also check out your default gcc paths for including and libraries | ||
| + | $ echo | gcc -v -x c -E - | ||
| + | $ echo | gcc -v -x c++ -E - | ||
| + | |||
| + | check the ld loads paths as well | ||
| + | $ ld --verbose | grep SEARCH | ||
| + | |||
| + | BIG NB, THE LIB64 FOLDERS ARE SEARCHED FIRST. So if you install new libraries which by | ||
| + | default these days are 64 bit and go the lib folder, and the system also has | ||
| + | an installed version in the lib64 folder. The systems old version in a lib64 | ||
| + | folder is selected before your newer version. So to be safe, when you install new | ||
| + | software, use the following options | ||
| + | / | ||
| + | |||
| + | size of install | ||
| + | $ du -sh $HOME/ | ||
| + | 1.2G | ||
| + | |||
| + | clean up your build directory | ||
| + | $ rm -r / | ||
| + | | ||