AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

gcc12 installation problem

  • 1.  gcc12 installation problem

    Posted Tue June 03, 2025 10:24 PM

    Hi there,

    I have installed gcc12 in the AIX 7.2 environment.  However, we notice the the /opt/freeware/lib/libatomic.a etc library still link to gcc10.  

    currently we have gcc8, gcc10 and gcc12 and gcc-10.2

    How do we ensure gcc12 is being used? and the library link updated?

    thank you

    Best regards

    Loh



    ------------------------------
    Kok Jien Loh
    ------------------------------


  • 2.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 01:45 AM

    Hi Kok,

    Set 

    export LIBPATH=/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/12/pthread:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib/
    Then use gcc12 --version, and/or export CC=gcc12


    You can use gcc12 binary. And since libpath is set to gcc12 libraries, this will make sure you use gcc12 libraries.
    I am using OS level 7.3. If you are in 7.2, then you might need to use powerpc-ibm-aix7.2.0.0 in the path. 



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 3.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 02:06 AM

    If you just use gcc-12 binary instead of gcc if gcc's default version is 10, it should be enough.



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 4.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 02:24 AM

    (1) can I confirm there is no gcc-12xxxx now available for download?  or is there some where I can get it?

    (2) if I were to use gcc-12 by running gcc, I have to set CC=gcc12?  this will allow me to run gcc for gcc12? or cc for gcc12?



    ------------------------------
    Kok Jien Loh
    ------------------------------



  • 5.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 03:43 AM

    To get gcc12

    Kindly do dnf install gcc12*

    >if I were to use gcc-12 by running gcc, I have to set CC=gcc12?  this will allow me to run gcc for gcc12? or cc for gcc12?

    You need to set export CC=gcc-12, yes.



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 6.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 04:09 AM

    We are in the airgap environment and currently no dnf and without internet connection.  and I don't see any gcc-12xx.rpm in the website? do you mean it does exists and only dnf can get it?   can you advise any alternative way?



    ------------------------------
    Kok Jien Loh
    ------------------------------



  • 7.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 05:09 AM

    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/gcc12/

    Check here. If you are in 7.3 go to ppc-7.3



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 8.  RE: gcc12 installation problem

    Posted Wed June 04, 2025 05:46 AM

    I am not referring to gcc12 itself, but gcc-12-3.rpm. the default metapackage

    similar to gcc-10-2.rpm,  I am referring to gcc-12-3.rpm so it links gcc and libgccxxxx to gcc12 library.   from this AIX GCC multi version support improvements, I understand gcc-XX.rpm is a meta package for default gcc.



    ------------------------------
    Kok Jien Loh
    ------------------------------



  • 9.  RE: gcc12 installation problem

    Posted Thu June 05, 2025 01:36 AM

    > I am not referring to gcc12 itself, but gcc-12-3.rpm. the default metapackage

    Okay, so as of now we do not have a meta package for gcc-12.

    GCC-13 will be made default in the current quarter, which is currently in the testing phase. When that is released you will get a meta package for GCC13.



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 10.  RE: gcc12 installation problem

    Posted Fri June 06, 2025 05:39 AM

    Hi Kok, 

    Have you thought about creating or hosting your own DNF repo? You can still get DNF and the latest updates, while remaining fairly secure.  You can setup a host on airgap environment, that initiates the connection to your own hosted repo, thereby ensuring the connection is one way (data pulled as opposed to pushed) then clone the repo to another repo host in your airgap environment and then setup your airgap hosts to connect only to the DNF repo in the airgap environment.  Therefore getting the DNF functionality and latest updates on your airgap environment. 
    There are some more DNF settings like PGP enablement that can eb used to verify that the files are not altered from the originals




    ------------------------------
    Willem van Wyk
    ------------------------------