Results 1 to 3 of 3

Thread: gcc versions problems

  1. #1
    Join Date
    Mar 2015
    Location
    Viçosa, Brasil
    Posts
    263

    Default gcc versions problems

    Hi, I need to install an newer version of gcc. According to my system, I have the version 4.8:

    Code:
    viniciusbr@linux-wu6s:~> gcc --version
    gcc (SUSE Linux) 4.8.5
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    However, in my folder /usr/include/c++ are two subfolders: 4.8 and 5.

    In yast I also have the gcc6 installed.

    So, I suppose that there are more gcc versions installed in my system. What can I do to use the last one? If I remove the oldest ones, a lot of packages will be remove too and I don't think that is safe.

    I need to use the version 5 or newer.

    Many thanks
    --
    Biostatistics and Data Science
    https://bio-data.github.io/

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: gcc versions problems

    Quote Originally Posted by viniciusbrbio View Post
    Hi, I need to install an newer version of gcc. According to my system, I have the version 4.8:

    Code:
    viniciusbr@linux-wu6s:~> gcc --version
    gcc (SUSE Linux) 4.8.5
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    However, in my folder /usr/include/c++ are two subfolders: 4.8 and 5.

    In yast I also have the gcc6 installed.

    So, I suppose that there are more gcc versions installed in my system. What can I do to use the last one? If I remove the oldest ones, a lot of packages will be remove too and I don't think that is safe.

    I need to use the version 5 or newer.

    Many thanks
    A gcc is used only to compile code.
    Once compiled, the gcc is not needed anymore so you can disable, switch to another version, upgrade or whatever without affecting the compiled code.

    When you compile using a specific gcc when you have multiple versions on your system, you can either specify the gcc binary in your make script or use an update-alternatives to switch between gcc versions on your system following the Wiki guide I create at the following link

    https://en.opensuse.org/User:Tsu2/gc...e-alternatives

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3
    Join Date
    Mar 2015
    Location
    Viçosa, Brasil
    Posts
    263

    Default Re: gcc versions problems

    Quote Originally Posted by tsu2 View Post
    A gcc is used only to compile code.
    Once compiled, the gcc is not needed anymore so you can disable, switch to another version, upgrade or whatever without affecting the compiled code.

    When you compile using a specific gcc when you have multiple versions on your system, you can either specify the gcc binary in your make script or use an update-alternatives to switch between gcc versions on your system following the Wiki guide I create at the following link

    https://en.opensuse.org/User:Tsu2/gc...e-alternatives

    HTH,
    TSU
    Hmm I see! Thank you!
    --
    Biostatistics and Data Science
    https://bio-data.github.io/

Posting Permissions

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