Skip to content
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

Closed
dgmackay opened this issue Sep 12, 2016 · 2 comments
Closed

x/mobile: build using -tags gldebug fails #17075

dgmackay opened this issue Sep 12, 2016 · 2 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@dgmackay
Copy link

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

@quentinmit quentinmit changed the title x/mobile build using -tags gldebug fails x/mobile: build using -tags gldebug fails Sep 12, 2016
@quentinmit quentinmit added this to the Unreleased milestone Sep 12, 2016
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@gopherbot
Copy link

Change https://golang.org/cl/53531 mentions this issue: x/mobile/gl: fix building if gldebug tag is specified

@gopherbot
Copy link

Change https://golang.org/cl/53710 mentions this issue: x/mobile/gl: fix building if gldebug tag is specified

@golang golang locked and limited conversation to collaborators Aug 9, 2018
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.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

3 participants