-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
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
echo "=> go test CGO_ENABLED=0" | |
env CGO_ENABLED=0 go test -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -shuffle=on -v -count=10 ./... | |
echo "=> go test CGO_ENABLED=1" | |
env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./... |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working