-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/mobile: build using -tags gldebug fails #17075
Labels
Milestone
Comments
quentinmit
changed the title
x/mobile build using -tags gldebug fails
x/mobile: build using -tags gldebug fails
Sep 12, 2016
Change https://golang.org/cl/53531 mentions this issue: |
Change https://golang.org/cl/53710 mentions this issue: |
imWildCat
pushed a commit
to imWildCat/go-mobile
that referenced
this issue
Apr 10, 2021
in gldebug.go, Enum value TIMEOUT_IGNORED requires uint64 length to handle it. On the other hand, Enum is declared as uint32, it causes build error because of overflow. Since GL_TIMEOUT_IGNORED is not a kind of GLenum, it should not be listed in that switch statement. Introduce white list for available Enum value to exclude such variables they cannot be classified as Enum because of its variable length. Fixes golang/go#17075 Change-Id: Ic1a4ee72b313861e48fe3e1cfaec91c91da6ddb3 Reviewed-on: https://go-review.googlesource.com/53531 Reviewed-by: Elias Naur <elias.naur@gmail.com>
imWildCat
pushed a commit
to imWildCat/go-mobile
that referenced
this issue
Apr 11, 2021
in gldebug.go, Enum value TIMEOUT_IGNORED requires uint64 length to handle it. On the other hand, Enum is declared as uint32, it causes build error because of overflow. Since GL_TIMEOUT_IGNORED is not a kind of GLenum, it should not be listed in that switch statement. Introduce white list for available Enum value to exclude such variables they cannot be classified as Enum because of its variable length. Fixes golang/go#17075 Change-Id: Ic1a4ee72b313861e48fe3e1cfaec91c91da6ddb3 Reviewed-on: https://go-review.googlesource.com/53531 Reviewed-by: Elias Naur <elias.naur@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.6.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dave/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
What did you do?
[dave@luggage2 tut3]$ gomobile build -tags gldebug macdev.com/gomobile/opengltut/tut3
gomobile: go build -p=4 -pkgdir=/home/dave/go/pkg/gomobile/pkg_android_arm -tags="gldebug" -buildmode=c-shared -o /tmp/gomobile-work-612268299/libtut3.so macdev.com/gomobile/opengltut/tut3 failed: exit status 2
golang.org/x/mobile/gl
../../../../golang.org/x/mobile/gl/gldebug.go:1126: constant 18446744073709551615 overflows Enum
Without the tags, it builds.
[dave@luggage2 tut3]$ gomobile build macdev.com/gomobile/opengltut/tut3[dave@luggage2 tut3]$
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
I've tried this with multiple programs. It doesn't seem to matter.
A link on play.golang.org is best.
What did you expect to see?
A successful build giving me an apk
What did you see instead?
The enum overflow error.
../../../../golang.org/x/mobile/gl/gldebug.go:1126: constant 18446744073709551615 overflows Enum
The text was updated successfully, but these errors were encountered: