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/10 19:39] adymond [Installation] |
howto:compiling_gcc [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Compiling GCC 4.7.1 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 | + | This guide is written as to aid CHPC users who are struggling to compile the |
| - | please visit the [[http:// | + | GCC version required for their codes. For the official guide on compiling GCC |
| - | after the August 2012 upgrades. This guide is written for installing gcc 4.7.1 compilers for c, | + | 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 | + | This guides use the temporary working |
| - | defaults. i.e. All additions to the //~/.bashrc// file | + | directory of $HOME/local |
| - | ([[quick: | + | |
| - | should see the following from the shell | + | |
| - | $ gcc --version | + | |
| - | gcc (GCC) 4.1.2 | + | |
| - | Also, this guide use the /tmp folder on the login node as the working | + | Before you begin, comment out all alterations to your // |
| + | ([[quick: | ||
| + | should see, should see the following from | ||
| + | the shell | ||
| + | $ gcc -v | ||
| + | Using built-in specs. | ||
| + | Target: x86_64-unknown-linux-gnu | ||
| + | Configured with: /usr/ | ||
| + | Thread model: posix | ||
| + | gcc version 4.1.2 20080704 (Red Hat 4.1.2-52) | ||
| + | |||
| + | Note on the lib folder | ||
| + | libraries 64 bit by default, and some 32 bit libraries as well. In Ubuntu | ||
| + | 12.04 for example, the following library folder name convention is used | ||
| + | / | ||
| + | |||
| + | However, | ||
| + | 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, | ||
| + | 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 | ||
| + | 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 | ||
| - | Finally note that, all binaries and libraries are installed home directory, i.e prefix=$HOME/usr. | + | check everything out |
| + | | ||
| + | libtool (GNU libtool) 2.4.2 | ||
| + | $libtool --config | less | ||
| - | ===== Prerequisites ==== | + | ===== GCC Prerequisites |
| A table showing what tools and package for building GCC, and what is available | A table showing what tools and package for building GCC, and what is available | ||
| Line 26: | Line 131: | ||
| | 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 50: | Line 155: | ||
| but it's safer to use the exact versions documented" | but it's safer to use the exact versions documented" | ||
| - | All the gcc_libs are going to be stored in the $HOME/ | + | ==== gcc-4.2.4 |
| - | that folder doesn' | + | |
| - | $ mkdir -p $HOME/ | + | |
| - | + | ||
| - | However to compile these libraries, we are going to need c++ compilers ... | + | |
| - | + | ||
| - | ==== c,c++ compilers ==== | + | |
| The gcc-4.2.4 c and c++ compilers are going to be used to build the require | The gcc-4.2.4 c and c++ compilers are going to be used to build the require | ||
| Line 62: | Line 161: | ||
| the GMP, MPFR or MPC libraries. | the GMP, MPFR or MPC libraries. | ||
| - | create the temporary directory to compile the required codes | + | download source |
| - | $ mkdir -p / | + | $ cd / |
| - | $ | + | $ wget http:// |
| - | + | uncompress | |
| - | download nessary files | + | $ tar -xf gcc-4.2.4.tar.bz2 |
| - | + | ||
| - | $ wget http:// | + | |
| - | $ wget http:// | + | |
| - | $ wget http:// | + | |
| - | + | ||
| - | uncompress | + | |
| - | $ tar -xf gcc-core-4.2.4.tar.bz2 | + | |
| - | $ tar -xf gcc-g++-4.2.4.tar.bz2 | + | |
| - | $ tar -xf gcc-testsuite-4.2.4.tar.bz2 | + | |
| - | or | + | |
| - | $ for archive in *.tar.bz2 ; do tar -xf $archive ; done | + | |
| configure | configure | ||
| Line 84: | Line 172: | ||
| $ cd BUILD | $ cd BUILD | ||
| $ mkdir / | $ mkdir / | ||
| - | $ ../ | + | $ ../ |
| build inside a screen session | build inside a screen session | ||
| - | $ screen | + | $ screen |
| $ make > make.out 2>&1 | $ make > make.out 2>&1 | ||
| - | # crtl-d to detach screen | + | # crtl-a |
| $ tail -f make.out #to watch compilation progress | $ tail -f make.out #to watch compilation progress | ||
| - | # after the make is complete, close the screen session by $ screen -r, then ctrl-d | + | # after the make is complete, close the screen session by $ screen -r, then |
| + | | ||
| + | |||
| + | 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 | ||
| - | This compiliation took just under 40 minutes to complete, when this guide was written. | ||
| - | |||
| Before continuing its probabily a good idea to test the gcc build .... | Before continuing its probabily a good idea to test the gcc build .... | ||
| Line 101: | Line 192: | ||
| $ screen | $ screen | ||
| $ make -k check > make.check 2>&1 | $ make -k check > make.check 2>&1 | ||
| - | # ctrl-d | + | # ctrl-a crtl-d |
| $ tail -f make.check | $ tail -f make.check | ||
| - | Tests took about 50 minutes | + | Tests took about 2 hours to complete. |
| - | Test results | + | Test results, when writing this guide |
| $ grep -e '# of ' -e Summary / | $ grep -e '# of ' -e Summary / | ||
| === gcc Summary === | === gcc Summary === | ||
| Line 118: | Line 209: | ||
| # of expected failures 67 | # of expected failures 67 | ||
| # of unsupported tests 106 | # of unsupported tests 106 | ||
| - | === libstdc++ Summary === | ||
| - | # of expected passes 4478 | ||
| - | # of unexpected failures 7 | ||
| - | # of unexpected successes 1 | ||
| - | # of expected failures 14 | ||
| - | === libmudflap Summary === | ||
| - | # of expected passes 1814 | ||
| - | === libgomp Summary === | ||
| - | # of expected passes 496 | ||
| - | which is all good :) | ||
| - | === install gcc === | + | Only continue with this guide if all the tests are passed |
| - | Installed the compliled | + | === installation of gcc === |
| - | $ make install | + | |
| + | Install the compliled gcc if | ||
| + | $ make install | ||
| - | finally, update your enviromental | + | Next the [[ |
| - | file | + | http:// |
| + | | environment | ||
| + | following lines to your .bashrc | ||
| # temporary gcc 4.2.4 build | # temporary gcc 4.2.4 build | ||
| export PATH=/ | export PATH=/ | ||
| - | export LD_LIBRARY_PATH=/ | + | export LD_LIBRARY_PATH=/ |
| - | #add library flags, for future compliations | + | export |
| - | export | + | export |
| - | #add include | + | //Note//, the $HOME/local/ additions are for the libraries which |
| - | export | + | going to be built using gcc 4.2.4 for the latest gcc version. |
| then logout and in again. You should see the following | then logout and in again. You should see the following | ||
| Line 150: | Line 234: | ||
| ... | ... | ||
| gcc version 4.2.4 | 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 | ==== helper script | ||
| - | The libraries required all follow the same build procedure, | + | The libraries required all follow the same build procedure, |
| - | is used to help automate the process. THe helper script | + | 1. download and extract |
| - | // | + | 2. configure |
| - | as follows | + | 3. make |
| + | 4. make check, and in some cases | ||
| + | 5. make install | ||
| - | #! / | ||
| - | # | ||
| - | # Script to install software from source, which requires the following steps | ||
| - | # 1. download and extract | ||
| - | # 2. configure | ||
| - | # 3. make | ||
| - | # 4. make check | ||
| - | # 5. make install | ||
| - | | ||
| - | EXPECTED_ARGS=4 | ||
| - | E_BADARGS=65 | ||
| - | | ||
| - | if [ $# -ne $EXPECTED_ARGS ] | ||
| - | then | ||
| - | echo " | ||
| - | INSTALL_DIR" | ||
| - | exit $E_BADARGS | ||
| - | fi | ||
| - | | ||
| - | SOURCE_URL=$1 | ||
| - | SOURCE_ARCHIVE=`basename $1` | ||
| - | SOURCE_FOLDER=${SOURCE_ARCHIVE%.*} | ||
| - | SOURCE_FOLDER=${SOURCE_FOLDER%.*} | ||
| - | echo source folder $SOURCE_FOLDER | ||
| - | | ||
| - | BUILD_DIR=$2 | ||
| - | BDIR=BUILD | ||
| - | CONFIGURE_OPTIONS=$3 | ||
| - | INSTALL_DIR=$4 | ||
| - | | ||
| - | cd ${BUILD_DIR} | ||
| - | wget --continue ${SOURCE_URL} | ||
| - | if [ ! -e ${SOURCE_FOLDER} ] ; then | ||
| - | tar -xf ${SOURCE_ARCHIVE} | ||
| - | fi | ||
| - | cd ${SOURCE_FOLDER} | ||
| - | mkdir $BDIR | ||
| - | cd $BDIR | ||
| - | echo $PWD | ||
| - | | ||
| - | echo ../ | ||
| - | ../ | ||
| - | make uninstall | tee make.uninstall # clean up any previous installs... | ||
| - | make clean | tee make.clean | ||
| - | make | tee make.out | ||
| - | make check | tee make.check | ||
| - | make install | tee make.install | ||
| - | cat make.check | grep -i " | ||
| - | echo FINISHED | ||
| - | If you cut and paste this code into , | + | So a helper script is used to help automate the process. THe helper script |
| - | $HOME/ | + | // |
| - | $ chmod +x $HOME/bin/download_and_install_from_source.sh | + | $ mkdir $HOME/local/bin |
| + | $ cd $HOME/ | ||
| + | $ wget http:// | ||
| + | $ chmod +x download_and_install_from_source.sh | ||
| - | add the following line to your //.bashrc// file, if its not there already. | + | return |
| - | | + | $ cd ~/ |
| - | logout and login again. Then you should see the following | + | |
| $ download_and_install_from_source.sh | $ download_and_install_from_source.sh | ||
| - | Usage: 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. | ||
| - | This helper script, is used in the rest of the guide. | ||
| ==== GMP library ==== | ==== GMP library ==== | ||
| Line 231: | Line 279: | ||
| $ mkdir BUILD | $ mkdir BUILD | ||
| $ cd BUILD | $ cd BUILD | ||
| - | $ ../ | + | $ ../ |
| $ make | $ make | ||
| $ make check | $ make check | ||
| Line 238: | Line 286: | ||
| OR simply use our helper script | OR simply use our helper script | ||
| $ download_and_install_from_source.sh ftp:// | $ download_and_install_from_source.sh ftp:// | ||
| - | / | + | / |
| Assert that everyting went okay. When the | Assert that everyting went okay. When the | ||
| Line 244: | Line 292: | ||
| check results. You should see a whole bunch of passes and no | check results. You should see a whole bunch of passes and no | ||
| fails. Do this for the following library builds as well. | 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 /usr/lib64 | ||
| + | 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 ==== | ==== MPFR library ==== | ||
| Line 250: | Line 314: | ||
| $ download_and_install_from_source.sh http:// | $ download_and_install_from_source.sh http:// | ||
| - | / | + | |
| + | $ cp -v $HOME/ | ||
| ==== MPC library==== | ==== MPC library==== | ||
| Line 259: | Line 323: | ||
| $ download_and_install_from_source.sh http:// | $ download_and_install_from_source.sh http:// | ||
| - | / | + | / |
| + | $ cp -v $HOME/ | ||
| ==== PPL ==== | ==== PPL ==== | ||
| Line 271: | Line 336: | ||
| http:// | http:// | ||
| / | / | ||
| - | " | + | " |
| - | | + | |
| - | make, takes 15 minutes | + | |
| - | make ckeck, takes 3 hours 15 minutes | + | |
| detach_screen, | detach_screen, | ||
| $ tail -f / | $ tail -f / | ||
| $ 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 ==== | ==== CLOOG library ==== | ||
| Line 285: | Line 355: | ||
| $ download_and_install_from_source.sh \ | $ download_and_install_from_source.sh \ | ||
| ftp:// | ftp:// | ||
| - | / | + | / |
| + | $ cp -v $HOME/ | ||
| [[http:// | [[http:// | ||
| Line 291: | Line 362: | ||
| $ download_and_install_from_source.sh | $ download_and_install_from_source.sh | ||
| | | ||
| - | / | + | / |
| + | $ cp -v $HOME/ | ||
| With the required libraries now available, the main GCC build can begin. | With the required libraries now available, the main GCC build can begin. | ||
| Line 306: | Line 378: | ||
| $ mkdir BUILD | $ mkdir BUILD | ||
| $ cd BUILD | $ cd BUILD | ||
| - | $ ../ | + | $ ../ |
| - | --with-gmp=$HOME/usr/gcc_libs | + | |
| - | --with-mpfr=$HOME/ | + | |
| - | --disable-cloog-version-check --enable-cloog-backend=isl --with-cloog=$HOME/usr/gcc_libs | + | |
| - | --enable-languages=c, | + | |
| - | + | --with-ppl-include=$HOME/ | |
| - | The following languages will be built: c, | + | --with-cloog-include=$HOME/ |
| - | *** This configuration is not supported in the following subdirectories: | + | The following languages will be built: c, |
| - | | + | *** This configuration is not supported in the following subdirectories: |
| - | | + | |
| - | (Any other directories should still work fine.) | + | (Any other directories should still work fine.) |
| ===== Compiling GCC ===== | ===== Compiling GCC ===== | ||
| Line 324: | Line 395: | ||
| $ screen | $ screen | ||
| $ make > make.out 2>&1 | $ make > make.out 2>&1 | ||
| - | # detach screen using ctrl-D | + | # detach screen using ctrl-a crtl-d |
| $ tail -f make.out | $ tail -f make.out | ||
| - | Expect the build to take about 1 hour 40 minutes. | + | Expect the build to take about 2 hours to complete. |
| The benefit about this screen approach beyond saving you grey hairs, is that | The benefit about this screen approach beyond saving you grey hairs, is that | ||
| Line 335: | Line 406: | ||
| file. | file. | ||
| + | ==== Trouble shooting compilation errors ==== | ||
| + | === 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. | ||
| + | |||
| + | Once the folder is found, read through the config.log file to get further | ||
| + | information on the error. If nessary, take the config file contents available | ||
| + | in the configure.log file, and paste them into a temporary file | ||
| + | ie. // | ||
| + | file. A big help here is to add the -v flag to the xgcc compiler. | ||
| ===== Testing ===== | ===== Testing ===== | ||
| Line 343: | Line 428: | ||
| $ 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 | ||
| + | |||
| + | Testing took 3hrs 30 minutes | ||
| After the testing was completed, i had the following results | After the testing was completed, i had the following results | ||
| $ grep -e '# of ' -e Summary / | $ grep -e '# of ' -e Summary / | ||
| - | === gcc Summary === | + | |
| - | # of expected passes 85973 | + | # of expected passes 87683 |
| - | # of unexpected failures 39 | + | # of unexpected failures 37 |
| - | # of unexpected successes 49 | + | # of unexpected successes 40 |
| - | # of expected | + | # of expected |
| - | # of unsupported tests 2173 | + | # of unsupported tests 1262 |
| - | | + | === g++ Summary === |
| - | # of expected passes 48668 | + | # of expected passes 48687 |
| - | # of unexpected failures 6 | + | # of unexpected failures 8 |
| # of expected failures 286 | # of expected failures 286 | ||
| - | # of unsupported tests 568 | + | # of unsupported tests 558 |
| - | | + | === gfortran Summary === |
| - | # of expected passes 41004 | + | # of expected passes 41001 |
| # of expected failures 56 | # of expected failures 56 | ||
| - | # of unsupported tests 66 | + | # of unsupported tests 69 |
| - | | + | === objc Summary === |
| # of expected passes 2988 | # of expected passes 2988 | ||
| # of expected failures 6 | # of expected failures 6 | ||
| # of unsupported tests 74 | # of unsupported tests 74 | ||
| - | === libstdc++ Summary === | + | |
| - | # of expected passes 8851 | + | # of expected passes 8900 |
| # of expected failures 43 | # of expected failures 43 | ||
| - | # of unsupported tests 146 | + | # of unsupported tests 145 |
| - | | + | === libmudflap Summary === |
| # of expected passes 1905 | # of expected passes 1905 | ||
| # of unexpected failures 1 | # of unexpected failures 1 | ||
| - | === libgomp Summary === | + | === libffi Summary === |
| + | # of expected passes 1634 | ||
| + | # of expected failures 10 | ||
| + | # of unsupported tests 55 | ||
| + | === libjava Summary === | ||
| + | # of expected passes 2574 | ||
| + | === boehm-gc Summary === | ||
| + | # of expected passes 12 | ||
| + | # of unsupported tests 1 | ||
| + | | ||
| # of expected passes 2998 | # of expected passes 2998 | ||
| - | === libitm Summary === | + | |
| # of expected passes 26 | # of expected passes 26 | ||
| # of expected failures 3 | # of expected failures 3 | ||
| # of unsupported tests 1 | # of unsupported tests 1 | ||
| - | which is acceptable | ||
| - | testing | + | If the testing |
| ===== Installation ===== | ===== Installation ===== | ||
| Line 390: | Line 486: | ||
| $ make install | $ make install | ||
| - | remove | + | Remove all the lines added to your rc file since the start of this guide, |
| - | # gcc 4.7.1 installed under $HOME/usr | + | replace them with |
| - | export PATH=$HOME/usr/bin:$PATH | + | |
| - | export LD_LIBRARY_PATH=$HOME/usr/lib64:$USR/ | + | export PATH=$HOME/ |
| - | #add library flags, for future compliations | + | export |
| - | export | + | |
| - | #add include folder for headers | + | |
| - | export CPPFLAGS=" | + | |
| - | export F77=gfortran | + | |
| - | export FFLAGS=$CPPFLAGS # not a hundred percent clear on this one | + | |
| log in and out again, and | log in and out again, and | ||
| Line 408: | Line 499: | ||
| gcc version 4.7.1 (GCC) | 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 | size of install | ||
| - | $ du -sh $HOME/usr | + | $ du -sh $HOME/local |
| - | | + | |
| clean up your build directory | clean up your build directory | ||
| $ rm -r / | $ rm -r / | ||
| | | ||