{"id":2635,"date":"2016-01-14T14:37:08","date_gmt":"2016-01-14T12:37:08","guid":{"rendered":"http:\/\/srvcnthpc001.uct.ac.za\/?p=2635"},"modified":"2016-01-29T14:27:59","modified_gmt":"2016-01-29T12:27:59","slug":"compiling-the-latest-gcc-version-5-3-0","status":"publish","type":"post","link":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/","title":{"rendered":"Compiling the latest GCC version 5.3.0"},"content":{"rendered":"<p>Previously on our blog we described how to install the GNU C compiler. Since then GNU have updated their <a href=\"https:\/\/gcc.gnu.org\/wiki\/InstallingGCC\" target=gcc>installation instructions<\/a> which makes things much easier:<\/p>\n<p><i>&#8220;The difficult way, which is not recommended, is to download the sources for GMP, MPFR and MPC, then configure and install each of them in non-standard locations, then configure GCC with &#8211;with-gmp=\/some\/silly\/path\/gmp &#8211;with-mpfr=\/some\/silly\/path\/mpfr &#8211;with-mpc=\/some\/silly\/path\/mpc, then be forced to set LD_LIBRARY_PATH=\/some\/silly\/path\/gmp:\/some\/silly\/path\/mpfr:\/some\/silly\/path\/mpc\/lib in your environment forever. This is silly and causes major problems for anyone who doesn&#8217;t understand how dynamic linkers find libraries at runtime. Do not do this. If building GCC fails when using any of the &#8211;with-gmp or &#8211;with-mpfr or &#8211;with-mpc options then you probably shouldn&#8217;t be using them.&#8221;<\/i><\/p>\n<p>In choosing the non-silly install method we did the following:<\/p>\n<pre>\r\ntar zxvf gcc-5.3.0.tar.gz\r\ncd gcc-5.3.0\r\n.\/contrib\/download_prerequisites\r\ncd ..\r\nmkdir objdir\r\ncd objdir\r\n$PWD\/..\/gcc-5.3.0\/configure --prefix=<$DEST>\/gcc-5.3.0 --enable-stage1-languages=all --disable-multilib\r\nmake -j 15\r\nmake install\r\n<\/pre>\n<p>Notes:<br \/>\n &#8211; $DEST should be something like $HOME\/compilers<br \/>\n &#8211; Do this on a worker node with as many cores as you can. Set &#8220;make -j X&#8221; where X is the number of cores you&#8217;ve reserved. This does the compile in parallel which is much faster<br \/>\n &#8211; &#8211;disable-multilib means that the 32bit libc libraries and headers are not included and only a 64bit compiler is built.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously on our blog we described how to install the GNU C compiler. Since then GNU have updated their installation instructions which makes things much easier: &#8220;The difficult way, which is not recommended, is to download the sources for GMP, MPFR and MPC, then configure and install each of them in non-standard locations, then configure&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,4,8],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Compiling the latest GCC version 5.3.0 - UCT HPC<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Compiling the latest GCC version 5.3.0 - UCT HPC\" \/>\n<meta property=\"og:description\" content=\"Previously on our blog we described how to install the GNU C compiler. Since then GNU have updated their installation instructions which makes things much easier: &#8220;The difficult way, which is not recommended, is to download the sources for GMP, MPFR and MPC, then configure and install each of them in non-standard locations, then configure...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\" \/>\n<meta property=\"og:site_name\" content=\"UCT HPC\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-14T12:37:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-01-29T12:27:59+00:00\" \/>\n<meta name=\"author\" content=\"Andrew Lewis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Lewis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\"},\"author\":{\"name\":\"Andrew Lewis\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e\"},\"headline\":\"Compiling the latest GCC version 5.3.0\",\"datePublished\":\"2016-01-14T12:37:08+00:00\",\"dateModified\":\"2016-01-29T12:27:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\"},\"wordCount\":223,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#organization\"},\"articleSection\":[\"application\",\"hpc\",\"programming\"],\"inLanguage\":\"en-ZA\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\",\"name\":\"Compiling the latest GCC version 5.3.0 - UCT HPC\",\"isPartOf\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#website\"},\"datePublished\":\"2016-01-14T12:37:08+00:00\",\"dateModified\":\"2016-01-29T12:27:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#breadcrumb\"},\"inLanguage\":\"en-ZA\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ucthpc.uct.ac.za\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Compiling the latest GCC version 5.3.0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#website\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/\",\"name\":\"UCT HPC\",\"description\":\"University of Cape Town High Performance Computing\",\"publisher\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ucthpc.uct.ac.za\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-ZA\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#organization\",\"name\":\"University of Cape Town High Performance Computing\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-ZA\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png\",\"contentUrl\":\"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png\",\"width\":450,\"height\":423,\"caption\":\"University of Cape Town High Performance Computing\"},\"image\":{\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e\",\"name\":\"Andrew Lewis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-ZA\",\"@id\":\"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g\",\"caption\":\"Andrew Lewis\"},\"sameAs\":[\"http:\/\/blogs.uct.ac.za\/blog\/big-bytes\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Compiling the latest GCC version 5.3.0 - UCT HPC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/","og_locale":"en_US","og_type":"article","og_title":"Compiling the latest GCC version 5.3.0 - UCT HPC","og_description":"Previously on our blog we described how to install the GNU C compiler. Since then GNU have updated their installation instructions which makes things much easier: &#8220;The difficult way, which is not recommended, is to download the sources for GMP, MPFR and MPC, then configure and install each of them in non-standard locations, then configure...","og_url":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/","og_site_name":"UCT HPC","article_published_time":"2016-01-14T12:37:08+00:00","article_modified_time":"2016-01-29T12:27:59+00:00","author":"Andrew Lewis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Lewis","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#article","isPartOf":{"@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/"},"author":{"name":"Andrew Lewis","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e"},"headline":"Compiling the latest GCC version 5.3.0","datePublished":"2016-01-14T12:37:08+00:00","dateModified":"2016-01-29T12:27:59+00:00","mainEntityOfPage":{"@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/"},"wordCount":223,"commentCount":0,"publisher":{"@id":"https:\/\/ucthpc.uct.ac.za\/#organization"},"articleSection":["application","hpc","programming"],"inLanguage":"en-ZA","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/","url":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/","name":"Compiling the latest GCC version 5.3.0 - UCT HPC","isPartOf":{"@id":"https:\/\/ucthpc.uct.ac.za\/#website"},"datePublished":"2016-01-14T12:37:08+00:00","dateModified":"2016-01-29T12:27:59+00:00","breadcrumb":{"@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#breadcrumb"},"inLanguage":"en-ZA","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ucthpc.uct.ac.za\/index.php\/2016\/01\/14\/compiling-the-latest-gcc-version-5-3-0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ucthpc.uct.ac.za\/"},{"@type":"ListItem","position":2,"name":"Compiling the latest GCC version 5.3.0"}]},{"@type":"WebSite","@id":"https:\/\/ucthpc.uct.ac.za\/#website","url":"https:\/\/ucthpc.uct.ac.za\/","name":"UCT HPC","description":"University of Cape Town High Performance Computing","publisher":{"@id":"https:\/\/ucthpc.uct.ac.za\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ucthpc.uct.ac.za\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-ZA"},{"@type":"Organization","@id":"https:\/\/ucthpc.uct.ac.za\/#organization","name":"University of Cape Town High Performance Computing","url":"https:\/\/ucthpc.uct.ac.za\/","logo":{"@type":"ImageObject","inLanguage":"en-ZA","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/","url":"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png","contentUrl":"https:\/\/ucthpc.uct.ac.za\/wp-content\/uploads\/2015\/09\/logocircless.png","width":450,"height":423,"caption":"University of Cape Town High Performance Computing"},"image":{"@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/c183ad1c0a1063124a72d63963ae9c7e","name":"Andrew Lewis","image":{"@type":"ImageObject","inLanguage":"en-ZA","@id":"https:\/\/ucthpc.uct.ac.za\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9652c9c73beeab594b8dc2383a880048?s=96&d=mm&r=g","caption":"Andrew Lewis"},"sameAs":["http:\/\/blogs.uct.ac.za\/blog\/big-bytes"]}]}},"_links":{"self":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts\/2635"}],"collection":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/comments?post=2635"}],"version-history":[{"count":3,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts\/2635\/revisions"}],"predecessor-version":[{"id":2677,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/posts\/2635\/revisions\/2677"}],"wp:attachment":[{"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/media?parent=2635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/categories?post=2635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ucthpc.uct.ac.za\/index.php\/wp-json\/wp\/v2\/tags?post=2635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}