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

Fails on Raspberry Pi (go1.5 linux/arm). #13

Open
carlTLR opened this issue Nov 15, 2015 · 11 comments
Open

Fails on Raspberry Pi (go1.5 linux/arm). #13

carlTLR opened this issue Nov 15, 2015 · 11 comments

Comments

@carlTLR
Copy link

carlTLR commented Nov 15, 2015

go get github.com/goxjs/gl

github.com/goxjs/gl
code/go/src/github.com/goxjs/gl/gl_opengles.go:24: ContextWatcher redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:17
code/go/src/github.com/goxjs/gl/gl_opengles.go:26: contextWatcher redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:19
code/go/src/github.com/goxjs/gl/gl_opengles.go:29: contextWatcher.OnDetach redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:33
code/go/src/github.com/goxjs/gl/gl_opengles.go:31: ActiveTexture redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:38
code/go/src/github.com/goxjs/gl/gl_opengles.go:35: AttachShader redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:45
code/go/src/github.com/goxjs/gl/gl_opengles.go:39: BindAttribLocation redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:53
code/go/src/github.com/goxjs/gl/gl_opengles.go:45: BindBuffer redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:60
code/go/src/github.com/goxjs/gl/gl_opengles.go:49: BindFramebuffer redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:67
code/go/src/github.com/goxjs/gl/gl_opengles.go:53: BindRenderbuffer redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:74
code/go/src/github.com/goxjs/gl/gl_opengles.go:57: BindTexture redeclared in this block
previous declaration at code/go/src/github.com/goxjs/gl/gl_opengl.go:81
code/go/src/github.com/goxjs/gl/gl_opengles.go:57: too many errors`

@dmitshur
Copy link
Member

I just tested it, and I'm not seeing any problems with Go 1.5.1.

~ $ go get -u github.com/goxjs/gl
~ $ 

You should use -u flag to avoid stale dependencies causing trouble.

If that doesn't help, can you post more information about your system? What operating system, version? What does go version print? If you're on OS X, what version of Xcode or command line utilities do you have?

@carlTLR
Copy link
Author

carlTLR commented Nov 16, 2015

I’m using Go compiled from source on a raspberry pi.

go version output:
go version go1.5 linux/arm

uname -a output:
Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux

From: Dmitri Shuralyov [mailto:notifications@github.com]
Sent: Monday, 16 November 2015 2:27 p.m.
To: goxjs/gl
Cc: Carl Menezes
Subject: Re: [gl] Go get fails on go 1.5 (#13)

I just tested it, and I'm not seeing any problems with Go 1.5.1.

~ $ go get -u github.com/goxjs/gl

~ $

You should use -u flag to avoid stale dependencies causing trouble.

If that doesn't help, can you post more information about your system? What operating system, version? What does go version print? If you're on OS X, what version of Xcode or command line utilities do you have?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-156886074.

@dmitshur dmitshur changed the title Go get fails on go 1.5 Fails on Raspberry Pi (go1.5 linux/arm). Nov 16, 2015
@dmitshur
Copy link
Member

I see. Raspberry Pi is the problem, not Go 1.5.

I don't think Raspberry Pi is supported at this time. It only supports OpenGL ES, not OpenGL like most normal Linux systems.

It should be possible to get it to work, but it'll take some work.

What would you like to use this package for? Have you already explored and compared alternatives?

@carlTLR
Copy link
Author

carlTLR commented Nov 16, 2015

I have my pi hooked up to a capacitive touch screen and am putting together a prototype UI using gxui, which pulls in a few packages from goxjs.

From: Dmitri Shuralyov [mailto:notifications@github.com]
Sent: Monday, 16 November 2015 2:37 p.m.
To: goxjs/gl
Cc: Carl Menezes
Subject: Re: [gl] Fails on Raspberry Pi (go1.5 linux/arm). (#13)

I see. Raspberry Pi is the problem, not Go 1.5.

I don't think Raspberry Pi is supported at this time. It only supports OpenGL ES, not OpenGL like most normal Linux systems.

It should be possible to get it to work, but it'll take some work.

What would you like to use this package for? Have you already explored and compared alternatives?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-156887162.

@dmitshur
Copy link
Member

I see.

If you want gxui to work on Raspberry Pi, both this package and goxjs/glfw will need to support Raspberry Pi.

If another OpenGL bindings package supported Raspberry Pi, you could change gxui to use it for its rendering. However, I'm not aware of anything that supports Raspberry Pi. I haven't done the research though.

So the best way to make this work would be to add Raspberry Pi here, I think. Unless other people have better suggestions. Let me know if you're interested in doing this work; I can help with review.

@carlTLR
Copy link
Author

carlTLR commented Dec 10, 2015

Don't know anything about OpenGL ES so I won't volunteer just yet.

@petergloor
Copy link

@carlTLR: could you solve your problem by any means? From what you know or read about goxjs/gl do you think it's worth to still put some effort in this project? Let me know why you think it's the perfect solution for the Pi and I will take a look into.

I don't know goxjs/gl yet nor do I know OpenGL ES, but I have successfully ported or simply cross-compiled some projects to Raspian Jessie for the Raspberry Pi 2 Model B (ARMv7) inclusive Go 1.6 (standard binary download is ARMv6).

I could probably help to solve the issue, but I will only spend some time into this project if I can see a gain for the Raspberry Pi / Go community. I'm more interested in golang.org/x/mobile/gl.

@dmitshur
Copy link
Member

Thanks for your potential interest here @petergloor.

I'll share about a relevant development since this issue was last updated. By now, there exist generated bindings for OpenGL ES in the go-gl/gl repo:

https://godoc.org/github.com/go-gl/gl/v3.1/gles2

They are bindings for OpenGL ES 3.1. I am not sure what version of OpenGL ES the Raspberry Pis support, but it might be a lower version. Still, it's possible to generate lower versions of OpenGL ES bindings via glow. See go-gl/gl@d8e753c for example.

The OpenGL ES bindings are a part of the equation, you'd still need GLFW support for Raspberry Pi, or something else that can create a window, OpenGL ES context, and take care of input, etc.

@drahoslove
Copy link

Hi, I have same problem with go version 1.6 linux arm on my Raspberry Pi.
I'd love to be able to use gxui on raspberry, it seems to be the best solution for my purposses. I don't know anything about OpenGL ES, but I can help with testing.

@dmitshur
Copy link
Member

Hi @Drahoslav7,

I'd love to be able to use gxui on raspberry

Unfortunately, that is not currently implemented. I'm not actively working on this because it's not a priority for me (and I don't have a Raspberry Pi), and I know the gxui project is not actively developed anymore either. I just want to help set your expectations right. Getting this issue resolved will require some work and testing, but I don't know of anyone actively working on this at this time, unfortunately.

@carlTLR
Copy link
Author

carlTLR commented Mar 20, 2016

Hi Peter,

No, I had other projects on my plate, so I proceeded with a platform that it worked with.
I think it is worth putting some effort into it because it enables a UI that looks the same on all platforms, but at a slightly higher level.

It would use OpenGL ES to do the heavy lifting anyway, so I think it would fit nicely with the work you’re doing on golang.org/x/mobile/gl.
Cheers,
Carl

From: Peter Gloor [mailto:notifications@github.com]
Sent: Thursday, 10 March 2016 3:00 a.m.
To: goxjs/gl
Cc: Carl Menezes
Subject: Re: [gl] Fails on Raspberry Pi (go1.5 linux/arm). (#13)

@carlTLRhttps://github.com/carlTLR: could you solve your problem by any means? From what you know or read about goxjs/gl do you think it's worth to still put some effort in this project? Let me know why you think it's the perfect solution for the Pi and I will take a look into.

I don't know goxjs/gl yet nor do I know OpenGL ES, but I have successfully ported or simply cross-compiled some projects to Raspian Jessie for the Raspberry Pi 2 Model B (ARMv7) inclusive Go 1.6 (standard binary download is ARMv6).

I could probably help to solve the issue, but I will only spend some time into this project if I can see a gain for the Raspberry Pi / Go community. I'm more interested in golang.org/x/mobile/gl.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-194308023.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants