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

devel_glfw3.1: MinGW version incompatabilities #91

Closed
slimsag opened this issue Sep 1, 2014 · 11 comments
Closed

devel_glfw3.1: MinGW version incompatabilities #91

slimsag opened this issue Sep 1, 2014 · 11 comments
Assignees

Comments

@slimsag
Copy link
Member

@slimsag slimsag commented Sep 1, 2014

Hey all,

I think there is a bug in Go somewhere causing incompatibilities with different MinGW versions (at least for MinGW-W64). Building a project using this package with certain MinGW versions causes the link process on windows to spout a bunch of errors.

I did test a bunch of different MinGW prebuilt binaries -- and I came up with these results:

MinGW binaries that do not work:

MinGW binaries that do work:

So it seems only GCC 4.8.1 works from my naive perspective. But I'll try to dig further and create an minimalistic example later on.

For an example today, try building hello.go inside the github.com/ajhager/engi/demos folder. It produces errors like this.

(Note: the issue started out here but everything important I have written here -- as that is just a mirror.)

@phase5
Copy link

@phase5 phase5 commented Sep 18, 2014

this does not work for me:
x86_64-4.9.1-win32-seh-rt_v3-rev1

@slimsag slimsag self-assigned this Sep 18, 2014
@slimsag
Copy link
Member Author

@slimsag slimsag commented Sep 18, 2014

@phase5 Thanks for letting me know. At this time I believe only (MinGW) GCC 4.8.1 works. I'll have to see if I can create a tiny reproducible case and submit this as an issue to Go itself.

Please star http://golang.org/issue/4069 if you care about this. There is a good chance that if that issue is solved it will solve this issue (among many other linker problems on Windows).

@tapir
Copy link
Member

@tapir tapir commented Sep 24, 2014

Any updates on this?
I think we should really have solution for this before releasing 3.1 which is I think getting closer if you look at glfw.org

@slimsag
Copy link
Member Author

@slimsag slimsag commented Sep 24, 2014

Any updates on this?

Sorry for the late response. I've spent the morning debugging the issue further. It can be reproduced with a very simple program like so:

package main

import (
    _ "import/path/to/glfw3"
)

func main() {
}

From what I have found so far, it seems somehow directly related to lines like:

_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
_GLFW_REQUIRE_INIT();

More soon.

@slimsag
Copy link
Member Author

@slimsag slimsag commented Sep 26, 2014

I've just filed Go issue 8811 with a minimal (5 files, 47 lines in total) example case. At this point I don't think that we can do anything more. I am not familiar with the internals of the Go linker which is where I believe this issue is happening.

I hope the issue will be resolved before Go 1.4 or that someone else will find a workaround for it, but at this point I don't know what else I can do to resolve it.

@tapir
Copy link
Member

@tapir tapir commented Sep 26, 2014

I must say this is a showstopper. I hope they can fix it before GLFW release.

Thanks for the effort

@tapir
Copy link
Member

@tapir tapir commented Oct 17, 2014

I'm glad that Go team fixed this issue. Shall we close or test first?

@tapir
Copy link
Member

@tapir tapir commented Oct 17, 2014

Also let's not forget to add a line in the README for the minimum Go version required (In this case etiher 1.3.4 or 1.4)

@slimsag
Copy link
Member Author

@slimsag slimsag commented Oct 18, 2014

Shall we close or test first?

I did verify that the bug is fixed (not with go-gl/glfw3 sources directly though). I don't think any further testing is needed.

Lets close this once we modify the README:

Also let's not forget to add a line in the README for the minimum Go version required (In this case etiher 1.3.4 or 1.4)

I don't think there is a Go 1.3.4? Anyway I think the README should state:

  • Go 1.4 is required (otherwise you must use MinGW v4.8.1 exactly, see Go issue 8811).
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 18, 2014

That should be a Windows-only note, right?

@slimsag
Copy link
Member Author

@slimsag slimsag commented Oct 18, 2014

That should be a Windows-only note, right?

Yeah -- sorry. It should be:

  • Go 1.4 is required on Windows (otherwise you must use MinGW v4.8.1 exactly, see Go issue 8811).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants