User Tools

Site Tools


nix:gcc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nix:gcc [2017/05/02 16:05] kauffmannix:gcc [2021/01/20 12:25] (current) kauffman
Line 4: Line 4:
 Usually, we install multiple versions. The default version of GCC probably won't be changed system wide... ever. Usually, we install multiple versions. The default version of GCC probably won't be changed system wide... ever.
  
-Here is a list of packages we install as of 2017-05-02:+We are now taking more advantage of environment modules. This means depending on when you read this you could load the version of GCC you want to use. 
 <code> <code>
-gcc-4.7-uofc-cs +$ module --terse avail |grep gcc 
-gcc-4.8 +/etc/environment-modules/modules: 
-gcc-4.8-base:amd64 +gcc/4.9.4 
-gcc-4.9 +gcc/5.5.0 
-gcc-4.9-base:amd64 +gcc/6.5.0 
-gcc-6-base:amd64 +gcc/7.5.0 
-gcc-uofc-cs+gcc/8.4.0 
 +gcc/9.3.0 
 +gcc/10.2.0
 </code> </code>
  
-We are now taking more advantage of environment modules. This means depending on when you read this you could load the version of GCC you want to use.+<code> 
 +$ module load gcc/4.9.
 +</code>
  
-As of 2017-05-02 there is only one version available. 
 <code> <code>
-kauffman3@green:~module avail +echo "$PATH | $INCLUDE | $LD_LIBRARY_PATH | $MANPATH" 
---------------------------------------------------------------------------------------------------  +/usr/local/gcc/4.9.4/bin:/home/kauffman3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/puppetlabs/bin  
-/etc/environment-modules/modules  +| /usr/local/gcc/4.9.4/include | /usr/local/gcc/4.9.4/lib |  
--------------------------------------------------------------------------------------------------- +/usr/local/gcc/4.9.4/man:/usr/share/man 
-cmake/3.1.1 cmake/3.8.0 gcc/4.7.4   qt/3.3.8b   qt/4.6.0 +</code>
-... other stuff...+
  
-kauffman3@green:~module load gcc/4.7.4+<code> 
 +$ gcc --version 
 +gcc (GCC) 4.9.4 
 +</code>
  
-kauffman3@green:~$ echo "$PATH | $INCLUDE | $LD_LIBRARY_PATH | $MANPATH" +<code> 
-/usr/local/gcc/4.7.4/bin:/home/kauffman3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/puppetlabs/bin  +$ module unload gcc
-| /usr/local/gcc/4.7.4/include | /usr/local/gcc/4.7.4/lib |  +
-/usr/local/gcc/4.7.4/man:/usr/share/man +
- +
-kauffman3@green:~$ gcc --version +
-gcc (GCC) 4.7.4 +
- +
-kauffman3@green:~$ module unload gcc/4.7.4 +
- +
-kauffman3@green:~$ gcc --version +
-gcc (Ubuntu 4.9.4-2ubuntu1~14.04.1) 4.9.4+
 </code> </code>
  
Line 58: Line 54:
 #!/bin/bash #!/bin/bash
  
-PREFIX="$HOME/.local/gcc/4.9.3"+gccversion='7.1.0' 
 +PREFIX="$HOME/.local/gcc/${gccversion}"
  
-# Building gcc in $HOME+# Building gcc 
 +gccversionuc="${gccversion//./_}"
  
 INSTALLDIR=/tmp/$USER INSTALLDIR=/tmp/$USER
Line 66: Line 64:
 cd $INSTALLDIR cd $INSTALLDIR
  
-svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_4_9_3_release gcc-4.9.3 +svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_${gccversionuc}_release gcc-${gccversion} 
-cd gcc-4.9.3+cd gcc-${gccversion}
 ./contrib/download_prerequisites ./contrib/download_prerequisites
 cd ../ cd ../
 mkdir objdir mkdir objdir
 cd objdir cd objdir
-$PWD/../gcc-4.9.3/configure \+$PWD/../gcc-${gccversion}/configure \
   --prefix=$PREFIX \   --prefix=$PREFIX \
   --enable-languages=c,c++,fortran,go \   --enable-languages=c,c++,fortran,go \
Line 83: Line 81:
 # clean up # clean up
 rm -r $INSTALLDIR/objdir rm -r $INSTALLDIR/objdir
- 
  
 export PATH=$HOME/$PREFIX/bin:$PATH export PATH=$HOME/$PREFIX/bin:$PATH
Line 94: Line 91:
 </code> </code>
  
-If building a package you will want to use ''checkinstall''. Replace ''make install'' something like the following:+===== Troubleshooting ===== 
 +==== 'module' command not found ==== 
 +To resolve you may have to do the following:
 <code> <code>
-checkinstall \ +source /etc/profile.d/modules.sh
-  --strip=no \ +
-  --stripso=no \ +
-  --umask=022 \ +
-  --install=no \ +
-  --pkgname='gcc-uofc-cs'+
-  --pkgversion='4.9.3' \ +
-  --pkgrelease='1'+
-  --pkggroup='devel'+
-  --maintainer='Techstaff \<techstaff@cs.uchicago.edu\>'+
-  --review-control \ +
-  make install+
 </code> </code>
/var/lib/dokuwiki/data/attic/nix/gcc.1493759107.txt.gz · Last modified: 2017/05/02 16:05 by kauffman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki