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

GOARCH=arm support. #76

Closed
minhajakhterkhan199 opened this issue May 20, 2017 · 10 comments
Closed

GOARCH=arm support. #76

minhajakhterkhan199 opened this issue May 20, 2017 · 10 comments

Comments

@minhajakhterkhan199
Copy link

minhajakhterkhan199 commented May 20, 2017

I am getting below error, after downloading (go get -u github.com/go-gl/gl/v{3.2,3.3,4.1,4.2,4.3,4.4,4.5}-{core,compatibility}/gl)

# github.com/go-gl/gl/v3.2-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v3.3-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v3.2-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.1-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v3.3-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.1-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.2-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.3-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.2-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.4-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.3-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.5-core/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.4-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
# github.com/go-gl/gl/v4.5-compatibility/gl
arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'

My development machine is Ubuntu 16.04 amd64 and target is arm. Please advise to solve this issue

@dmitshur
Copy link
Member

dmitshur commented May 20, 2017

My development machine is Ubuntu 16.04 amd64 and target is arm.

Target is arm? Can you elaborate?

I don't think targeting arm architecture is supported by go-gl/gl packages.

You may want to consider golang.org/x/mobile/gl and github.com/goxjs/gl packages, which do support iOS and Android (which are arm targets).

@minhajakhterkhan199
Copy link
Author

minhajakhterkhan199 commented May 21, 2017

Development Machine is Ubuntu 16.04 amd64 and Target machine is Raspberry Pi 3, Please advise to solve the issue

export GOOS=linux
export GOARCH=arm
export CC=arm-linux-gnueabi-gcc
export CGO_ENABLED=1

@dmitshur
Copy link
Member

I know goxjs/gl does not support Raspberry Pi, see issue goxjs/gl#13 that's tracking it. I don't know what the support status for x/mobile/gl is, but it seems more likely that it doesn't either. That support needs to be implemented by someone.

@dmitshur dmitshur changed the title # github.com/go-gl/gl/v3.2-core/gl arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64' GOARCH=arm support. Sep 9, 2017
@kivutar
Copy link

kivutar commented Nov 23, 2018

How would you estimate the amount of work to add ARM support to go-gl/gl?

@dmitshur
Copy link
Member

dmitshur commented Nov 23, 2018

Most of the work would be figuring out why it doesn't work, and what needs to be done to make it work. It's hard to estimate it other by starting to do it and seeing how it goes.

I think most ARM-based platforms support only OpenGL ES, not OpenGL, so this is most likely only relevant to the github.com/go-gl/glfw/v3.1/gles2 package.

Also, in case it's helpful, see https://hackernoon.com/barriers-to-effective-software-effort-estimation-and-how-to-avoid-them-4abd39f09f26.

@kivutar
Copy link

kivutar commented Nov 24, 2018

@dmitshur I've been able to compile a go-gl/gl + go-gl/glfw app yesterday on the raspberry without issue.

I've not yet been able to get it display something yet, I still have to learn how to configure the context properly (RPi only support OpenGL up to 2.1).

But I can tell that the issue with CFLAGS -m64 only happens when cross compiling. So the amount of work may not be too important.

@pwaller
Copy link
Member

pwaller commented Mar 30, 2019

Thanks for the update. Please keep letting us know, I'll keep this issue open until someone reports success at getting this working.

@kivutar
Copy link

kivutar commented Mar 30, 2019

It's working. This is a working example https://github.com/libretro/ludo/blob/master/.travis.yml#L37-L59

@pwaller
Copy link
Member

pwaller commented Mar 30, 2019

@kivutar - great news. Is there any action to take over on this repository?

@kivutar
Copy link

kivutar commented Mar 31, 2019

@pwaller No, as you can see in my go.mod I'm using the unmodified go-gl code. I think that installing the right dependencies for the right architecture is what made the difference for the cross compilation.

Building directly on an ARM system was straightforward.

@pwaller pwaller closed this as completed Mar 31, 2019
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