-
Notifications
You must be signed in to change notification settings - Fork 1
PPC64LE and S390X support #2
Description
BUSINESS PROBLEM
Extra platform support for VSSH-CLI. Customer has Linux and AIX on S390x
PROPOSED SOLUTION
We have a solution for Linux on PPC64LE and S390X, we have already tested this and it produced a working binary:
Test on RHEL8 on PPC64LE and S390x:
In Makefile, in the build section, add lines for the additional targets:
env GOOS=linux CGO_ENABLED=0 GOARCH=s390x go build -ldflags '$(GO_LDFLAGS)' -o bin/linux_s390x/vssh ./cmd
env GOOS=linux CGO_ENABLED=0 GOARCH=ppc64le go build -ldflags '$(GO_LDFLAGS)' -o bin/linux_ppc64le/vssh ./cmd
For the AIX port, there's a commented line for AIX already, however the build fails with these errors:
vssh-cli-source> gmake build
! gofmt -l . | grep -v ^vendor/ | grep .
go get ./...
env GOOS=aix CGO_ENABLED=0 GOARCH=ppc64 go build -ldflags '-X "github.com/venafi/vssh-cli/cmd/common.VersionString=1.0.2025041518" -X "github.com/venafi/vssh-cli/cmd/common.VersionBuildTimeStamp=20250415.184158" -s -w' -o bin/aix_ppc64/vssh ./cmd
github.com/inconshreveable/go-update/internal/osext
vendor/github.com/inconshreveable/go-update/internal/osext/osext.go:14:12: undefined: executable
github.com/denisbrodbeck/machineid
vendor/github.com/denisbrodbeck/machineid/id.go:29:13: undefined: machineID
github.com/AlecAivazis/survey/v2/terminal
vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go:48:43: undefined: syscall.SYS_IOCTL
vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go:48:81: undefined: ioctlReadTermios
vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go:60:43: undefined: syscall.SYS_IOCTL
vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go:60:81: undefined: ioctlWriteTermios
vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go:68:43: undefined: syscall.SYS_IOCTL
vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go:68:81: undefined: ioctlWriteTermios
These appear to be in the code for handling terminal input. For our use case, we can provide all necessary input to the tool on the command line, we do not need interactive input. We would be perfectly happy if this code was just bypassed on AIX.
CURRENT ALTERNATIVES
Current alternatives is running vssh commands on supported platforms and then manually transferring the results to unsupported platforms.
To that end, we have build the Linux on PPC64LE and S390x successfully and have those binaries and they work. All we need is AIX. Provided the makefile updates above for your benefit. Go appears to be able to cross-compile just fine.
VENAFI EXPERIENCE
Several years, and we use it daily.