-
Notifications
You must be signed in to change notification settings - Fork 18k
cgo call to glfw3 segfaults on darwin_amd64 #4868
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
Labels
Milestone
Comments
Smells like this: https://groups.google.com/d/topic/golang-dev/NKt0XfyFd7E/discussion |
you might want to try again with tip with this change or later: http://code.google.com/p/go/source/detail?r=43cc2ef77ca6da9cec755588e2c6653a1c96e5dd |
same thing with tip: go version devel +fbb1de9bc379 Thu Feb 21 15:55:40 2013 -0800 darwin/amd64 I don't know if it's useful to you, but I include the output just in case: SIGSEGV: segmentation violation PC=0x0 signal arrived during cgo execution main._Cfunc_glfwSetErrorCallback(0x0) code.google.com/p/gordon-go/glfw/_obj/_cgo_defun.c:42 +0x2f main.main() code.google.com/p/gordon-go/glfw/_obj/glfw.cgo1.go:17 +0x29 goroutine 0 [syscall]: rax 0x20b4 rbx 0x330f80 rcx 0x330f80 rdx 0x330f18 rdi 0x0 rsi 0x501c8 rbp 0x54660 rsp 0x7fff5fbff668 r8 0x110071b8 r9 0xc200032000 r10 0xfa8d627d94 r11 0x80522124 r12 0x55a23ca63110 r13 0x55a22027f728 r14 0x12e50020bf6d2e00 r15 0x0 rip 0x0 rflags 0x10202 cs 0x27 fs 0x0 gs 0x0 Please let me know if there is anything I can do to help, provide more information, etc. |
Sorry for the noise. It turns out my problem was that I had only a statically linked libglfw. I didn't know that cgo can't handle static libs lacking -fPIC, etc. (And it took me quite a while to figure it out, especially with "Go links statically" branded into my brain.) Maybe this should be documented at http://golang.org/cmd/cgo/ ? Perhaps CGO could fail descriptively? Actually, I think it does fail in an earlier version, but only with "undefined symbol" or something. So my trouble is past, but I guess you've still got trouble in that I was able to (successfully?) link against libglfw.a but failed to call into it. |
Comment 7 by [email protected]: This issue is still present in go 1.1.1, and should be reopened. |
The bug has been replicated here: go-gl/glfw#41 (comment) It affects the official Go pkg installer, but homebrew's built from source version works just fine. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: