Open
Description
PureGo Version
Operating System
- Windows
- macOS
- Linux
- FreeBSD
- NetBSD
- Android
- iOS
Go Version (go version
)
go1.22.12 (but also other versions)
What steps will reproduce the problem?
Run the test CGO_ENABLED=0 w/o optimization
What is the expected result?
The test passes
What happens instead?
The test fails
https://github.com/hajimehoshi/purego/actions/runs/13751525916/job/38453081556
=> go test CGO_ENABLED=0 w/o optimization
# github.com/ebitengine/purego/internal/fakecgo
internal/fakecgo/freebsd.go:23:3: //go:cgo_export_dynamic environ only allowed in cgo-generated code
internal/fakecgo/freebsd.go:24:3: //go:cgo_export_dynamic __progname only allowed in cgo-generated code
FAIL github.com/ebitengine/purego [build failed]
FAIL github.com/ebitengine/purego/examples/libc [build failed]
? github.com/ebitengine/purego/internal/cgo [no test files]
FAIL github.com/ebitengine/purego/internal/fakecgo [build failed]
FAIL github.com/ebitengine/purego/internal/load [build failed]
? github.com/ebitengine/purego/internal/strings [no test files]
FAIL
Anything else you feel useful to add?
We should add -e
to the shebang #!/bin/sh
.
I don't think this is happening in the stable branch, where the test is not executed in a shell script.
EDIT: This might happen in the stable branch, as the test didn't include building w/o optimization. See
purego/.github/workflows/test.yml
Lines 211 to 215 in ef7c59a