Closed folliehiyuki closed 1 year ago
I have tested under alpine-3.17.2 (aarch64) and go1.19.6 (alpinelinux package) and I have no errors.
I think the errors are not related to alpinelinux, but due to yaegi repo probably not installed at $GOPATH/src/github.com/traefik/yaegi
, the old Go way which is still expected to pass all the tests, waiting for support of Go modules in yaegi.
I think the errors are not related to alpinelinux, but due to yaegi repo probably not installed at
$GOPATH/src/github.com/traefik/yaegi
, the old Go way which is still expected to pass all the tests, waiting for support of Go modules in yaegi.
Thanks for the explanation. I moved the cloned repo to the suggested path and the tests ran successfully. Would you consider adding this note into contributing / building from source guideline? That would be helpful. Then, this issue can be closed.
Also can you look into the -race
flag in test as I mentioned. I don't want to keep a patch downstream forever with just 2 LOCs removed. A variable to disable race while running test would be nice.
I will update the readme to document the constraint on repo path.
I'm running on alpinelinux and can totally run go test -race ./...
You mention -buildmode=pie
, but I do not see that in my setup. Where is it coming from ? What is the output of go env
on your alpinelinux setup ?
I'm running on alpinelinux and can totally run
go test -race ./...
Yes, nothing goes wrong when we run the command manually with default Go package in AlpineLinux.
You mention
-buildmode=pie
, but I do not see that in my setup
https://git.alpinelinux.org/abuild/tree/abuild.conf#n5
It is set in abuild
configuration file (the program used to package AlpineLinux packages).
-race
is enforced when running test based on the environment architecture. You can see the patch here: https://git.alpinelinux.org/aports/tree/testing/yaegi/remove-race-in-test.patch
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
0.15.0
Additional Notes
I'm trying to package
yaegi
for AlpineLinux, but my local build are failing (see the log above).Also, it would be nice to have race optional when running test. AlpineLinux (and a few other distros) set
-buildmode=pie
that forbid-race
flag.https://github.com/traefik/yaegi/blob/da03c922cad7cfa07ece6fed917d01994e006be9/cmd/yaegi/yaegi_test.go#L54