{"id":1618,"date":"2012-10-06T16:54:00","date_gmt":"2012-10-06T15:54:00","guid":{"rendered":"http:\/\/roboblog.fatal-fury.de\/?p=1618"},"modified":"2012-10-28T14:33:10","modified_gmt":"2012-10-28T13:33:10","slug":"installing-gcc-g-and-gfortran-4-8-from-source","status":"publish","type":"post","link":"http:\/\/roboblog.fatal-fury.de\/?p=1618","title":{"rendered":"Installing gcc, g++ and gfortran 4.8 from source"},"content":{"rendered":"<p>First read http:\/\/gcc.gnu.org\/install\/<br \/>\nMake sure you have all Prerequisites installed!<\/p>\n<p>Download all files to ~\/opt\/downloads<br \/>\nInstall all packages to ~\/opt\/<\/p>\n<p>Download gcc 4.8 from ftp:\/\/ftp.gwdg.de\/pub\/misc\/gcc\/snapshots\/LATEST-4.8\/ and unpack it.<\/p>\n<pre><code>\r\nwget ftp:\/\/ftp.gwdg.de\/pub\/misc\/gcc\/snapshots\/LATEST-4.8\/gcc-4.8-20120930.tar.bz2\r\ntar xjf gcc-4.8-20120930.tar.bz2 \r\ncd gcc-4.8-20120930\r\n<\/code><\/pre>\n<p>Download several necessary librarys into the gcc source directory and unpack them.<br \/>\nThey will be built together with GCC.<\/p>\n<pre><code>\r\nwget ftp:\/\/ftp.gmplib.org\/pub\/gmp-5.0.5\/gmp-5.0.5.tar.bz2\r\ntar xjf gmp-5.0.5.tar.bz2\r\nln -s gmp-5.0.5 gmp\r\n\r\nwget http:\/\/www.mpfr.org\/mpfr-current\/mpfr-3.1.1.tar.bz2\r\ntar xjf mpfr-3.1.1.tar.bz2 \r\nln -s mpfr-3.1.1 mpfr\r\n\r\nwget http:\/\/www.multiprecision.org\/mpc\/download\/mpc-1.0.1.tar.gz\r\ntar xzf mpc-1.0.1.tar.gz\r\nln -s mpc-1.0.1 mpc\r\n<\/code><\/pre>\n<p>Now configure and build<\/p>\n<pre><code>\r\nmkdir $HOME\/opt\/downloads\/gcc-4.8-build\r\ncd $HOME\/opt\/downloads\/gcc-4.8-build\r\n..\/gcc-4.8-20120930\/configure --prefix=$HOME\/opt\/gcc-4.8 --enable-threads --enable-languages=c,c++,fortran\r\nmake\r\nmake install\r\n<\/code><\/pre>\n<p><strong>Troubleshooting<\/strong><br \/>\n<code>\/usr\/bin\/ld: cannot find crt1.o: No such file or directory<br \/>\n\/usr\/bin\/ld: cannot find crti.o: No such file or directory<\/code><\/p>\n<p>These files are usually locates in \/usr\/lib32\/ and\/or \/usr\/lib\/x86_64-linux-gnu\/<br \/>\nAdd this to your .bashrc<\/p>\n<pre><code>\r\nexport LIBRARY_PATH=\/usr\/lib\/x86_64-linux-gnu\/:$LIBRARY_PATH\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>First read http:\/\/gcc.gnu.org\/install\/ Make sure you have all Prerequisites installed! Download all files to ~\/opt\/downloads Install all packages to ~\/opt\/ Download gcc 4.8 from ftp:\/\/ftp.gwdg.de\/pub\/misc\/gcc\/snapshots\/LATEST-4.8\/ and unpack it. wget ftp:\/\/ftp.gwdg.de\/pub\/misc\/gcc\/snapshots\/LATEST-4.8\/gcc-4.8-20120930.tar.bz2 tar xjf gcc-4.8-20120930.tar.bz2 cd gcc-4.8-20120930 Download several necessary librarys into the gcc source directory and unpack them. They will be built together with GCC. wget [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[14,17,30,18],"class_list":["post-1618","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-c","tag-cpp","tag-fortran","tag-linux"],"_links":{"self":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/1618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1618"}],"version-history":[{"count":4,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/1618\/revisions"}],"predecessor-version":[{"id":1622,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/1618\/revisions\/1622"}],"wp:attachment":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1618"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}