-
Notifications
You must be signed in to change notification settings - Fork 184
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
Native Darwin Support #136
Comments
I can test this. |
Uncommenting those 2 funcs, I still get:
|
golang/go#7555 is still not resolved. |
golang/go#7555 is now closed, so this might be fixed in Go 1.5. I'll try again then, unless someone can test it sooner. |
Well, this doesn't look good. Despite golang/go#7555 being resolved by now, it doesn't appear to fix this issue. I just tried with go1.5beta3.
@slimsag, we should make sure that this issue is indeed related to golang/go#7555 and not something else. Does it mean golang/go#7555 is not truly resolved? If so, there's little time before 1.5 comes out, so this may end up being postponed to Go 1.6 which is 6+ months down the line. Luckily, this issue is not very critical, but it will be nice to resolve it eventually. |
It's surprising that the GLFW v3.0 bindings have nearly the same code in the |
Well, after looking into details of golang/go#7555 and the messages that pointed to it, I realize it's a completely unrelated issue to this problem. golang/go#7555 was referred to by @slimsag in response to #82 (comment), which mentions an This |
On a side note, since golang/go#7555 is now closed can we revert back #87 once 1.5 is out? |
Sure, but please make a separate issue for that. I'll try to make a small reproducible sample for this |
This issue might be related to golang/go#3505 which is still unresolved. All other issues that contain that error message appear to be resolved. |
Here's a really short reproduce case: // +build darwin
package main
/*
#cgo CFLAGS: -x objective-c
id foo() {
return 0;
}
*/
import "C"
import "fmt"
func main() {
fmt.Println(C.foo())
} Building that results in:
|
A lot of the cgo libraries out there should fail to compile if this is
|
Nice job tracking this down @shurcooL! Apologies for not being very responsive here prior. I tried looking into it a bit now but it is hard to tell if it's related to golang/go#3505 or not. I agree with @tapir about opening a new issue for it so it is not overlooked. |
I've filed a new issue with all the details at golang/go#12065. |
Looks like the problem lies within LLVM |
Can we return a |
That could work. I think Have you tried it with |
Using cgo types in an exported API is a little weird since AFAIK cgo types in each package are distinct. |
I'm ok with using a reference to it instead of the actual C type. |
@james4k, would you be able to make a PR that resolves this issue? |
Sure. What I ended up needing to do was a little more involved, where the conversion is done on the C side with a wrapper inline function that returns |
James, that sounds correct. Not sure how else it could be worked around.
|
When I ues fyne on MacOS12 with gcc11, I found it a bug which make fyne bad!
|
Due to a bug in cgo we commented out https://github.com/go-gl/glfw/blob/master/v3.1/glfw/native_darwin.go (See Issue #82)
Unfortunately I don't have a mac, can we test if this is still an issue?
The text was updated successfully, but these errors were encountered: