From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 29FD8138334 for ; Mon, 3 Dec 2018 01:51:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03879E0BC0; Mon, 3 Dec 2018 01:51:28 +0000 (UTC) Received: from pmta21.teksavvy.com (pmta21.teksavvy.com [76.10.157.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73B3DE0AA4 for ; Mon, 3 Dec 2018 01:51:27 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HgAwDOiwRc/wDfSC1jHAEBAQQBAQcEA?= =?us-ascii?q?QGBVAQBAQsBggMlQU8hEieIK4NLjCSCDYUplBowCAEChDkDAgKDNSI3Bg0BAwE?= =?us-ascii?q?BAQEBAQICAmkcDIJqTWsBAQEBAQEjAg1kAQQBOkQLCw0UExIPBVyDIoF5CA+hE?= =?us-ascii?q?BGCUhoChSSEXowcFz6BAj+BEYMSgwWBVXSCaIImAoFXh0UUhnqQFgkCgiKEXIo?= =?us-ascii?q?xI4IohzMYDAOHJI1pgltahF6ETSOBVX0IgycJixOFXSQwAQEBAX8BikuCTQEB?= X-IPAS-Result: =?us-ascii?q?A2HgAwDOiwRc/wDfSC1jHAEBAQQBAQcEAQGBVAQBAQsBggM?= =?us-ascii?q?lQU8hEieIK4NLjCSCDYUplBowCAEChDkDAgKDNSI3Bg0BAwEBAQEBAQICAmkcD?= =?us-ascii?q?IJqTWsBAQEBAQEjAg1kAQQBOkQLCw0UExIPBVyDIoF5CA+hEBGCUhoChSSEXow?= =?us-ascii?q?cFz6BAj+BEYMSgwWBVXSCaIImAoFXh0UUhnqQFgkCgiKEXIoxI4IohzMYDAOHJ?= =?us-ascii?q?I1pgltahF6ETSOBVX0IgycJixOFXSQwAQEBAX8BikuCTQEB?= X-IronPort-AV: E=Sophos;i="5.56,308,1539662400"; d="scan'208";a="54106241" Received: from unknown (HELO waltdnes.org) ([45.72.223.0]) by smtp.teksavvy.com with SMTP; 02 Dec 2018 20:51:23 -0500 Received: by waltdnes.org (sSMTP sendmail emulation); Sun, 02 Dec 2018 20:50:58 -0500 From: "Walter Dnes" Date: Sun, 2 Dec 2018 20:50:58 -0500 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] emerging older compilers Message-ID: <20181203015058.GA12626@waltdnes.org> References: <20181130182546.EAAE4862A86A@turkos.aspodata.se> <1992892.Fylsq1jqPK@pinacolada> <20181202102155.81E6C862A86C@turkos.aspodata.se> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181202102155.81E6C862A86C@turkos.aspodata.se> User-Agent: Mutt/1.10.1 (2018-07-13) X-Archives-Salt: 4b034425-3f9d-499c-9054-dac9ec68bf86 X-Archives-Hash: 46d881b86ea66bf9b537374f4451d31c On Sun, Dec 02, 2018 at 11:21:55AM +0100, karl@aspodata.se wrote > so that means I'm on my own. You can install a *NON*-default gcc in ${HOME} This is a two-step process. I used to do this a couple of years ago when Pale Moon was limited in what versions of gcc it would build on. Note that tarballs going back to 2.95.1 are available at http://ftpmirror.gnu.org/gcc Also, be carefull about the tarball extensions, as of approx June 2017 * gcc-6.1.0.tar.bz2 was released 2016/04/27 with bz2 extension * gcc-5.4.0.tar.bz2 was released 2016/06/03 with bz2 extension * gcc-6.2.0.tar.bz2 was released 2016/08/22 with bz2 extension * gcc-6.3.0.tar.bz2 was released 2016/12/21 with bz2 extension * gcc-6.4.0.tar.xz was released 2017/07/04 with xz extension * gcc-5.5.0.tar.xz was released 2017/10/10 with xz extension The download, building, etc, is done in $HOME/gccstuff. I set up an automated build script in there. E.g. to build gcc-5.4.0 and have it go to $HOME/gcc540 execute the script ------------------------------ #!/bin/bash # # Instructions from https://gcc.gnu.org/wiki/InstallingGCC wget http://ftpmirror.gnu.org/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 tar xf gcc-5.4.0.tar.bz2 # # To get gmp, mpc, mpfr, and isl libs # You *MUST* run this script from the top-level GCC source dir cd gcc-5.4.0 contrib/download_prerequisites # # You *MUST NOT* run ./configure from the GCC source dir mkdir gcc-5.4.0/gcc-build && cd gcc-5.4.0/gcc-build ../configure --prefix=$HOME/gcc540 \ --disable-multilib \ --enable-libstdcxx-threads \ --enable-libstdcxx-time \ --enable-shared \ --enable-__cxa_atexit \ --disable-libunwind-exceptions \ --disable-libada \ --with-default-libstdcxx-abi=gcc4-compatible make -j4 make install ------------------------------ Notes: in the ../configure invocation include the languages and other options that you need for your situation. "make -j4" is for a machine with 4 cores. Adjust to fit your machine. To invoke gcc from $HOME/gcc540 you have to "source" the following export statements from a plaintext file, early in your build, e.g. . path/filename You must *NOT* invoke a separate shell with #!/bin/bash For a 64 bit build... ------------------------------ export GCCX_ROOT=$HOME/gcc540 export PATH=$GCCX_ROOT/bin:$PATH export MANPATH=$GCCX_ROOT/share/man:MANPATH export INFOPATH=$GCCX_ROOT/share/info:$INFOPATH export LD_LIBRARY_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LD_LIBRARY_PATH export LD_RUN_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LD_RUN_PATH export LIBRARY_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LIBRARY_PATH export INCLUDE_PATH=$GCCX_ROOT/include:$INCLUDE_PATH export CPLUS_INCLUDE_PATH=$GCCX_ROOT/include:$CPLUS_INCLUDE_PATH export C_INCLUDE_PATH=$GCCX_ROOT/include:$C_INCLUDE_PATH ------------------------------ For a 32 bit build do as above, but first search+replace, changing all instances of "lib64" to "lib". -- Walter Dnes I don't run "desktop environments"; I run useful applications