Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: openSUSE 13.2 multiple gcc version

  1. #1

    Default openSUSE 13.2 multiple gcc version

    Hi, first time poster here... hope this is the right place!

    Is it possible to install multiple versions of gcc (say 4.6, 4.8 and 4.9) at the same time? Using zypper, it seems to want to replace one with the other (and I can't even find 4.6...).

    Thanks!

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: openSUSE 13.2 multiple gcc version

    It is possible but you have to manage everything about it. The kernel and other program rely on a given version of gcc libraries and if you change it it can cause you major problems so....

    Maybe if you need different versions for development you can do things in a VM with a kernel and other program that like the version in question. IMO it is very complicated and I'd need a really good reason to even try it.

  3. #3

    Default Re: openSUSE 13.2 multiple gcc version

    Well that's a bummer... guess I'll have to stick with Ubuntu or try a different flavour of Linux after all. And I just spent 5 days setting SUSE with everything I need...

    Unfortunately, VM is gonna be complicated as I'm using CUDA, and I got some pre-complied CUDA libraries that will only compile with gcc46. I could just copy the binaries for gcc46 and g++46 and whatever libraries I need (then link everything manually), but I do this kind of stuff very often and this will be a real drag having to move binaries of compilers around (assuming they will even work in SUSE).
    Also is openmp support in gcc missing? Can't seem to locate libgomp or find a way to install it.

    Thanks for the reply.

  4. #4
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,076

    Default Re: openSUSE 13.2 multiple gcc version

    On Fri, 01 May 2015 17:56:01 +0000, qiUip wrote:

    > Hi, first time poster here... hope this is the right place!
    >
    > Is it possible to install multiple versions of gcc (say 4.6, 4.8 and
    > 4.9) at the same time? Using zypper, it seems to want to replace one
    > with the other (and I can't even find 4.6...).
    >
    > Thanks!


    Well, yes, 4.8 and 4.9 have separate packages, so yes, those can be
    installed side-by-side, as far as I can tell.

    For 4.6 you would probably need to use some other repo or roll your own,
    but that wouldn't be difficult to do with OBS.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: openSUSE 13.2 multiple gcc version

    Quote Originally Posted by hendersj View Post
    On Fri, 01 May 2015 17:56:01 +0000, qiUip wrote:

    > Hi, first time poster here... hope this is the right place!
    >
    > Is it possible to install multiple versions of gcc (say 4.6, 4.8 and
    > 4.9) at the same time? Using zypper, it seems to want to replace one
    > with the other (and I can't even find 4.6...).
    >
    > Thanks!


    Well, yes, 4.8 and 4.9 have separate packages, so yes, those can be
    installed side-by-side, as far as I can tell.

    For 4.6 you would probably need to use some other repo or roll your own,
    but that wouldn't be difficult to do with OBS.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C
    But the system has to run on one and the others are there just for compiling and maybe running the compile programs. It is unlike java (which you can have multiple versions) in that the C libraries are absolutely needed for the system to run. Running VM's with properly configure system for each version is the lest likely to cause any problem or be too complicated to manage.

    So the OP never said why they wanted to do this and maybe some other work around may be possible if we understood the problem they are trying to solve with multiple C++ versions.

  6. #6

    Default Re: openSUSE 13.2 multiple gcc version

    I would indeed want the other versions only for compiling my own codes and not for OS related stuff.
    My issue was that when trying to install different version via zypper I was only given an option to uninstall 48 or break 49 (so not a full install? I'm not sure how this part works...). I guess I'll take the plunge and install it 'broken' to see what does and doesn't work.

    Thanks again.

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: openSUSE 13.2 multiple gcc version

    On 2015-05-01 23:06, gogalthorp wrote:

    > So the OP never said why they wanted to do this and maybe some other
    > work around may be possible if we understood the problem they are trying
    > to solve with multiple C++ versions.


    He did say:

    |> I'm using CUDA, and I got
    |> some pre-complied CUDA libraries that will only compile with gcc46.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: openSUSE 13.2 multiple gcc version

    On 2015-05-01 23:46, qiUip wrote:
    >
    > My issue was that when trying to install different version via zypper I
    > was only given an option to uninstall 48 or break 49 (so not a full
    > install? I'm not sure how this part works...). I guess I'll take the
    > plunge and install it 'broken' to see what does and doesn't work.


    No, that will not work, IIRC. I think you have to install it on another
    path, which is not possible to do with a prepared rpm. I have the vague
    recollection of having read about this before.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,076

    Default Re: openSUSE 13.2 multiple gcc version

    On Fri, 01 May 2015 21:06:02 +0000, gogalthorp wrote:

    > But the system has to run on one and the others are there just for
    > compiling and maybe running the compile programs. It is unlike java
    > (which you can have multiple versions) in that the C libraries are
    > absolutely needed for the system to run. Running VM's with properly
    > configure system for each version is the lest likely to cause any
    > problem or be too complicated to manage.


    Using osc to do local builds also would take care of this. I use osc to
    build stuff for SLES 11 SP3 - which uses a different version of GCC than
    openSUSE 13.x - and that works just fine. osc actually sets up the
    proper build environment based on the repos selected as build
    requirements.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  10. #10

    Default Re: openSUSE 13.2 multiple gcc version

    Quote Originally Posted by hendersj View Post
    On Fri, 01 May 2015 21:06:02 +0000, gogalthorp wrote:

    > But the system has to run on one and the others are there just for
    > compiling and maybe running the compile programs. It is unlike java
    > (which you can have multiple versions) in that the C libraries are
    > absolutely needed for the system to run. Running VM's with properly
    > configure system for each version is the lest likely to cause any
    > problem or be too complicated to manage.


    Using osc to do local builds also would take care of this. I use osc to
    build stuff for SLES 11 SP3 - which uses a different version of GCC than
    openSUSE 13.x - and that works just fine. osc actually sets up the
    proper build environment based on the repos selected as build
    requirements.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C
    Thanks a lot Jim.

    Had a look at OSC and it seems too much hassle and quite a learning curve when I'm trying to streamline my research... Maybe I'm just missing something, but I couldn't seem to find out how to search for specific applications or how to easily manage installed ones - and I spent a good hour+ on it.

    I'm still getting very weird behaviour with my parallel (OpenMP) codes in openSUSE (using gcc48) and overall a quite confused experience so far. I still want a simple way to install multiple versions of the same compilers, but I guess for when I truly need that I'll just boot into Ubuntu or OSX on my laptop. Maybe when I have more time I'll look into OSC in more detai as I would really like to be able to stop booting into different OSes and using different comps...

    Thanks again!

Page 1 of 2 12 LastLast

Posting Permissions

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