nix:gcc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
nix:gcc [2017/05/17 16:24] – kauffman | nix:gcc [2021/01/20 12:25] (current) – kauffman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== GCC ====== |
===== GCC Versions that are already installed on CS infrastructure ===== | ===== GCC Versions that are already installed on CS infrastructure ===== | ||
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: | ||
- | < | ||
- | gcc | ||
- | gcc-4.7-uofc-cs | ||
- | gcc-4.9-uofc-cs | ||
- | gcc-5 | ||
- | gcc-5-base: | ||
- | gcc-5-multilib | ||
- | gcc-5.4-uofc-cs | ||
- | gcc-6-base: | ||
- | gcc-6-base: | ||
- | gcc-6.3-uofc-cs | ||
- | gcc-7.1-uofc-cs | ||
- | </ | ||
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. | 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. | ||
< | < | ||
- | kauffman3@green: | + | $ module --terse avail |grep gcc |
/ | / | ||
- | cmake/3.1.1 | + | gcc/4.9.4 |
- | cmake/3.8.0 | + | gcc/5.5.0 |
- | gcc/4.7.4 | + | gcc/6.5.0 |
- | gcc/4.9.3 | + | gcc/7.5.0 |
- | gcc/5.4.0 | + | gcc/8.4.0 |
- | gcc/6.3.0 | + | gcc/9.3.0 |
- | gcc/7.1.0 | + | gcc/10.2.0 |
+ | </ | ||
+ | < | ||
+ | $ module load gcc/4.9.4 | ||
+ | </ | ||
- | kauffman3@green:~$ module load gcc/4.7.4 | + | < |
+ | $ echo "$PATH | $INCLUDE | $LD_LIBRARY_PATH | $MANPATH" | ||
+ | / | ||
+ | | /usr/local/gcc/4.9.4/include | / | ||
+ | / | ||
+ | </ | ||
- | kauffman3@green: | + | < |
- | /usr/local/gcc/ | + | $ gcc --version |
- | | /usr/local/gcc/4.7.4/include | / | + | gcc (GCC) 4.9.4 |
- | /usr/ | + | </code> |
- | kauffman3@green: | + | < |
- | gcc (GCC) 4.7.4 | + | $ module unload gcc |
- | + | ||
- | kauffman3@green: | + | |
- | + | ||
- | kauffman3@green: | + | |
- | gcc (Ubuntu 4.9.4-2ubuntu1~14.04.1) 4.9.4 | + | |
</ | </ | ||
Line 65: | Line 54: | ||
#!/bin/bash | #!/bin/bash | ||
- | PREFIX=" | + | gccversion=' |
+ | PREFIX=" | ||
- | # Building gcc in $HOME | + | # Building gcc |
+ | gccversionuc=" | ||
INSTALLDIR=/ | INSTALLDIR=/ | ||
Line 73: | Line 64: | ||
cd $INSTALLDIR | cd $INSTALLDIR | ||
- | svn co svn:// | + | svn co svn:// |
- | cd gcc-4.9.3 | + | cd gcc-${gccversion} |
./ | ./ | ||
cd ../ | cd ../ | ||
mkdir objdir | mkdir objdir | ||
cd objdir | cd objdir | ||
- | $PWD/ | + | $PWD/ |
--prefix=$PREFIX \ | --prefix=$PREFIX \ | ||
--enable-languages=c, | --enable-languages=c, | ||
Line 90: | Line 81: | ||
# clean up | # clean up | ||
rm -r $INSTALLDIR/ | rm -r $INSTALLDIR/ | ||
- | |||
export PATH=$HOME/ | export PATH=$HOME/ | ||
Line 99: | Line 89: | ||
echo " | echo " | ||
echo " | echo " | ||
+ | </ | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | ==== ' | ||
+ | To resolve you may have to do the following: | ||
+ | < | ||
+ | source / | ||
</ | </ |
/var/lib/dokuwiki/data/attic/nix/gcc.1495056265.txt.gz · Last modified: 2017/05/17 16:24 by kauffman