Original Message:
Sent: Tue November 28, 2023 12:39 PM
From: Andrey Klyachkin
Subject: Golang 1.21
Hi Sylvain,
as usual - "hello world" example ;-)
package mainimport "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/*releaseDISTRIB_ID=UbuntuDISTRIB_RELEASE=20.04DISTRIB_CODENAME=focalDISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"NAME="Ubuntu"VERSION="20.04.6 LTS (Focal Fossa)"ID=ubuntuID_LIKE=debianPRETTY_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=focalUBUNTU_CODENAME=focal$ go versiongo version go1.20.2 linux/amd64
Compiling hello world:
$ go build -o hello$ GOOS=aix GOARCH=ppc64 go build -o hello_aix
Result:
ls -ltotal 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_aixhello_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_aixHello world
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Tue November 28, 2023 09:47 AM
From: Sylvain Manceau
Subject: Golang 1.21
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
Original Message:
Sent: Mon November 27, 2023 05:31 AM
From: Andrey Klyachkin
Subject: Golang 1.21
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
Original Message:
Sent: Fri November 24, 2023 12:52 AM
From: Sylvain Manceau
Subject: Golang 1.21
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