Find the answer to your Linux question:
Results 1 to 6 of 6
I'm having trouble compiling code on my Gentoo-based home machine (Sabayon 3.3 using gcc 4.1.1), which compiled on a RedHat Enterprise 3 (gcc 3.2.3). I don't want to clobber my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414

    Temporarily installing a previous version of gcc


    I'm having trouble compiling code on my Gentoo-based home machine (Sabayon 3.3 using gcc 4.1.1), which compiled on a RedHat Enterprise 3 (gcc 3.2.3). I don't want to clobber my gcc 4.1.1 installation, but I'd like to install an old version of gcc for the sole use of compiling this one piece of code.

    I'm pretty sure this is possible, but I don't want to hurt my current installation. Can anyone give advice as to the best way to do this?

    Thanks.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  2. #2
    Linux Enthusiast gruven's Avatar
    Join Date
    Dec 2004
    Location
    Arkansas
    Posts
    541
    Gcc is slotted in Gentoo, which means you can install different versions at one time. I have 4.1.2, then 3.3.something because another app has to have that version.

    I don't know what you mean by compiled in Red Hat, because Sabayon isn't supposed to be compiled when installed is it? I thought they prided themselves with being a binary Gentoo?

    Either way, if you are going to compile code, why not just go with Gentoo? That way doing certain things with portage will not break your install.

    Linux User #376741
    Code is Poetry

  3. #3
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    I'll have a look at what you mean by "slotted".

    I think you misunderstood me. I have C++ code that someone in work has written and that I would like to install. I compiled and installed it in work on a Redhat machine with no problems, but I'm not able to compile it at home on my Sabayon machine. I *think* this might be related to Sabayon using gcc 4.* while the Redhat box uses gcc 3.*, so I'd like to install the 3.* version on Sabayon -- preferably in a way that doesn't clobber the other version.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  4. #4
    Linux Enthusiast gruven's Avatar
    Join Date
    Dec 2004
    Location
    Arkansas
    Posts
    541
    That is explained better, thank you.

    Gcc is a slotted package, and if sabayon uses portage, then it will allow slotted packges. Slotted packages are versions of one program that can be installed at the same time.

    I am not sure if sabayon offers that version of gcc in their repository, but you can always look. If it doesn't, then you can compile it yourself. I know in gentoo, you can pretty much get any version you need.

    Linux User #376741
    Code is Poetry

  5. #5
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Sorry for the dumb question, but could you point me to a link on how to use Gentoo slots?

    I googled around, and checked gentoo.org, but I couldn't find anything.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  6. #6
    Linux Enthusiast gruven's Avatar
    Join Date
    Dec 2004
    Location
    Arkansas
    Posts
    541
    Off hand I don't have any links specifically about the slots, but it is simple. If you need to install different versions of some software, it will allow you to do that. It will allow you to have different versions of gcc, qt, gtk, etc....

    If you want to use gentoo or a gentoo based distro that uses portage, I will suggest this link:
    Gentoo Linux Documentation -- A Portage Introduction

    Linux User #376741
    Code is Poetry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •