Closed bytecounter closed 1 year ago
Hi @bytecounter, thanks for reporting this issue! I have backported a fix from the main branch into v0.4.27
after testing with a similar container setup as the one provided. Could you try it out and let me know if it fixes the problem for you?
@veeableful , thank you for the very fast bugfixing! I can confirm, that is fixed with 0.4.37. My build was successful.
When trying to build for i368 architecture, I got this error:
/go/pkg/mod/github.com/veandco/go-sdl2@v0.4.26/sdl/guid.go:38:33: cannot use _cap (variable of type _Ctype_ulong) as type _Ctype_uint in argument to (_Cfunc_SDL_malloc)
Environment: Docker 20.10.12 on Ubuntu 22.04 LTS
go.mod
Go-Source:
My Dockerfile:
Build command:
docker run --rm -it -v "$PWD":/usr/src/myapp -v "$HOME/go":/go -w /usr/src/myapp -e CGO_ENABLED=1 -e GOOS=linux -e GOARCH=386 -e CC=gcc golang-sdl2 go build -v -x -o build/test-sdl2_32 *.go
Build command for 64 bit linux works fine:
docker run --rm -it -v "$PWD":/usr/src/myapp -v "$HOME/go":/go -w /usr/src/myapp -e CGO_ENABLED=1 -e GOOS=linux -e GOARCH=amd64 -e CC=gcc golang-sdl2 go build -v -x -o build/test-sdl2_64 *.go