Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applicationsΒ on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

Β View Only
  • 1.  Golang 1.21

    Posted Fri November 24, 2023 12:53 AM

    Hi there!

    (I'm quite new to AIX Toolbox, please forgive if I'm not correct, posting a request here.)

    Golang 1.21 is being released: Release History - The Go Programming Language

    As usual, it includes enhancements and fixes (some about security). And... I need it for a project 😎

    Is it possible to have a RPM released for AIX Toolbox?

    Is there any way I could build it for myself?

    Thanks, also for the awesome work!



    ------------------------------
    Sylvain Manceau
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Golang 1.21

    Posted Fri November 24, 2023 01:28 AM

    We are working on bringing Golang 1.21.X version to Toolbox. It will be available in a couple of weeks. 



    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: Golang 1.21

    Posted Fri November 24, 2023 03:16 AM

    Nice!

    Thank you 😊



    ------------------------------
    Sylvain Manceau
    ------------------------------



  • 4.  RE: Golang 1.21

    Posted Mon November 27, 2023 05:32 AM

    Hi Sylvain,

    you usually (but not always) can cross-compile Google Go from any other device. I compiled several projects on my Mac and used them afterwards on AIX. Of course it doesn't work if you bind to external AIX libraries or use CGO in your project.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 5.  RE: Golang 1.21

    Posted Tue November 28, 2023 09:48 AM

    Hi Andrey,

    This is very interesting, thanks for your reply!

    However, I never could produce XCOFF (AIX) binaries on ppcle (Ubuntu), only ELF... I'd really like to make it, but may need some guidance here!



    ------------------------------
    Sylvain Manceau
    ------------------------------



  • 6.  RE: Golang 1.21

    Posted Tue November 28, 2023 12:40 PM

    Hi Sylvain,

    as usual - "hello world" example ;-)

    package main
    
    import "fmt"
    
    func main() {
        fmt.Println("Hello world")
    }
    

    The system is Ubuntu x86_64 and sorry, I have only Go 1.20.2 on it:

    $ cat /etc/*release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
    NAME="Ubuntu"
    VERSION="20.04.6 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 20.04.6 LTS"
    VERSION_ID="20.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=focal
    UBUNTU_CODENAME=focal
    $ go version
    go version go1.20.2 linux/amd64
    

    Compiling hello world:

    $ go build -o hello
    $ GOOS=aix GOARCH=ppc64 go build -o hello_aix
    

    Result:

    ls -l
    total 5344
    -rw-r--r-- 1 user users      24 Nov 28 18:34 go.mod
    -rwxr-xr-x 1 user users 1845898 Nov 28 18:35 hello
    -rwxr-xr-x 1 user users 3614465 Nov 28 18:35 hello_aix
    -rw-r--r-- 1 user users      75 Nov 28 18:34 hello.go
    

    $ file hello_aix
    hello_aix: 64-bit XCOFF executable or object module
    

    Copy to AIX and execute there:

    $ scp hello_aix aix:
    hello_aix                                                                  100% 3530KB  21.8MB/s   00:00    
    $ ssh aix
    #./hello_aix
    Hello world
    


    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 7.  RE: Golang 1.21

    Posted Fri December 01, 2023 05:30 AM

    Hi Andrey,

    Thank you very much for your detailed answer, still learning here!

    Following your example, I could compile and run a ppc64 "hello world" ☺️



    ------------------------------
    Sylvain Manceau
    ------------------------------