Re: [gentoo-user] emerging older compilers
Karl Hammar: > For testing purposes, I would like to install older compilers, > e.g. testing with older kernels. > > I have tried to install e.g. gcc-5.4.0-r4, gcc-4.9.4, and > gcc-3.4.6-r2.ebuild (package.unmask is upd. for theese), but it fails. I have found out that I can install thoose older comilers with: FEATURES="-sandbox -usersandbox" emerge -aqv =sys-devel/gcc-5.4.0-r4 # since ustat.h is no loger with (>=glibc 2.28) according to # https://sourceware.org/git/?p=glibc.git;a=commit;h=cf2478d53ad7071e84c724a986b56fe17f4f4ca7 echo =sys-devel/gcc-4.9.4 -sanitize >> /etc/portage/package.use/gcc eselect gcc set 1 . /etc/profile FEATURES="-sandbox -usersandbox" emerge -aqv =sys-devel/gcc-4.9.4 gcc-3.4.6-r2 still doesn't install though. Regards, /Karl Hammar
Re: [gentoo-user] emerging older compilers
On Sun, Dec 02, 2018 at 11:21:55AM +0100, k...@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
Re: [gentoo-user] emerging older compilers
Andreas: > Policy is that you *should* be able to go back in steps of two versions. > Eg. emerge 4.8 with 5.0 ... # gcc-config -l [1] x86_64-pc-linux-gnu-6.4.0 * [2] x86_64-pc-linux-gnu-7.3.0 # That means, go from 6.4 -> 6.2 -> 6.0 -> ... ? But I don't have thoose ebuilds: $ ls -1 portage/sys-devel/gcc/ ... gcc-5.4.0-r4.ebuild gcc-5.4.0-r5.ebuild gcc-5.4.0-r6.ebuild gcc-6.4.0-r1.ebuild gcc-6.4.0-r3.ebuild gcc-6.4.0-r4.ebuild gcc-6.4.0-r5.ebuild gcc-6.5.0.ebuild ... so that means I'm on my own. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden
Re: [gentoo-user] emerging older compilers
Policy is that you *should* be able to go back in steps of two versions. Eg. emerge 4.8 with 5.0 ... However, this is occasionally broken, so please file bugs with the detailed logs and versions. Am Freitag, 30. November 2018, 19:25:46 CET schrieb k...@aspodata.se: > For testing purposes, I would like to install older compilers, > e.g. testing with older kernels. > > I have tried to install e.g. gcc-5.4.0-r4, gcc-4.9.4, and > gcc-3.4.6-r2.ebuild (package.unmask is upd. for theese), but it fails. > > You usually install a newer compiler with the older (and that is > well tested), but has anyone tried it the other way ? > > Regards, > /Karl Hammar > > --- > Aspö Data > Lilla Aspö 148 > S-742 94 Östhammar > Sweden -- Andreas K. Hüttel dilfri...@gentoo.org Gentoo Linux developer (council, toolchain, perl, libreoffice, comrel) signature.asc Description: This is a digitally signed message part.
[gentoo-user] emerging older compilers
For testing purposes, I would like to install older compilers, e.g. testing with older kernels. I have tried to install e.g. gcc-5.4.0-r4, gcc-4.9.4, and gcc-3.4.6-r2.ebuild (package.unmask is upd. for theese), but it fails. You usually install a newer compiler with the older (and that is well tested), but has anyone tried it the other way ? Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden