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/gl Doesn't compile on Windows #23451

Closed
200sc opened this issue Jan 15, 2018 · 1 comment
Closed

x/mobile/gl Doesn't compile on Windows #23451

200sc opened this issue Jan 15, 2018 · 1 comment
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@200sc
Copy link

200sc commented Jan 15, 2018

What version of Go are you using (go version)?

go1.9.2 windows/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH=amd64
GOOS=windows

What did you do?

I tried to use a package that imported x/mobile/gl.

What did you expect to see?

I expected x/mobile/gl to compile on Windows

What did you see instead?

Two errors, both in work_windows.go

  1. at 132:
case glfnBindVertexArray:
    syscall.Syscall(glBindVertexArray.Addr(), 1, c.args.a0, 0)

Is invalid, as syscall.Syscall requires five arguments.

  1. at 186:
case glfnDeleteVertexArray:
    syscall.Syscall(glDeleteVertexArrays.Addr(), 2, 1, uintptr(unsafe.Pointer(&c.args.a0)), 0)

Is invalid, as glDeleteVertexArrays is not defined.

The literal errors from the command line follow:

# golang.org/x/mobile/gl
..\..\..\..\..\golang.org\x\mobile\gl\work_windows.go:132:18: not enough arguments in call to syscall.Syscall
        have (uintptr, number, uintptr, number)
        want (uintptr, uintptr, uintptr, uintptr, uintptr)
..\..\..\..\..\golang.org\x\mobile\gl\work_windows.go:186:19: undefined: glDeleteVertexArrays

On my local machine, I resolved this by adding another 0 to the syscall.Syscall and by adding glDeleteVertexArrays = libGLESv2.NewProc("glDeleteVertexArrays") at line 461, but I am not knowingly using these functions so I do not know that that is the appropriate fix.

@gopherbot gopherbot added this to the Unreleased milestone Jan 15, 2018
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jan 15, 2018
@gopherbot
Copy link

Change https://golang.org/cl/87855 mentions this issue: gl: fix typos in multiple places

@titanous titanous added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 16, 2018
@golang golang locked and limited conversation to collaborators Jan 17, 2019
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Windows bindings had few invalid bindings.
Debug type had a typo, making gldebug non-compilable.
Use consistently .c() for types.

Fixes golang/go#23451

Change-Id: Ic9e68b1aafcd732dd5e4d8f883324723a35d24c3
Reviewed-on: https://go-review.googlesource.com/87855
Reviewed-by: Elias Naur <elias.naur@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Windows bindings had few invalid bindings.
Debug type had a typo, making gldebug non-compilable.
Use consistently .c() for types.

Fixes golang/go#23451

Change-Id: Ic9e68b1aafcd732dd5e4d8f883324723a35d24c3
Reviewed-on: https://go-review.googlesource.com/87855
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 NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants