Troubleshooting
Run clang failed
export COMPILER_PATH=<path_to_compiler_invocation_command>
eval $(<go_installation_path>/go/etc/goz-env)
Certificate signed by unknown authority
- Set the SSL_CERT_FILE environment variable correctly, and then export SSL_CERT_FILE variable.
- Source
.envsetup
in go/etc, which sets the SSL_CERT_FILE togo/etc/cacert.pem
.
After you download the packages, you need to add build tags to port the applications to z/OS. See Porting applications to z/OS for more details.
Messages about finding or downloading x/sys/unix, x/crypto, or x/net
- Edit the go.mod file by changing the version number of golang.org/x/sys/unix, x/crypto, or x/net packages to the word "latest".
- Run the following command:
go install
- Change the minimum Go version to Go 1.17.
Undefined errors
You might encounter undefined errors in the following cases:
- The package has a Unix version of the file but no z/OS
build tag.
To tackle this problem, add z/OS to the + build line at top of the file.
- The package only has a Linux® version of the file but all
functionality that is used in the file exists on z/OS.
To tackle this problem, add z/OS to the + build line at top of the file.
- The function uses
Syscall(…) or RawSyscall(...)
.This is not supported on z/OS. You need to make z/OS version of this function.
Cannot locate CEE.SCEEBND2 data set
FSUM3052 The data definition name SYSLIB cannot be resolved. The data set was
not found. Ensure that data set name CEE.SCEEBND2 is specified correctly.
open /tmp/go-build794287247/b001/exe/hello: EDC5129I No such file or directory.
Export environment variables in your environment for the prefixes.
export _C89_PLIB_PREFIX=CEE
export _C89_CLIB_PREFIX=SYS1
If this still does not work, consult your system administrator to find out the right prefix. For more details, see Unix System Services Command Reference.
Cannot produce dumps
- Set the Language Environment® runtime environment with the command:
export _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
- Disable the Go signal handler for the signal in question by setting the signal handler to the default. This can be done in either your C code or Go code.
- Export your dump with the following
command:
export _BPXK_MDUMP=your_dump_data_set_name