Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Problem compiling with gccgo-4.9 #58

Open
russel opened this issue May 25, 2014 · 1 comment
Open

Problem compiling with gccgo-4.9 #58

russel opened this issue May 25, 2014 · 1 comment

Comments

@russel
Copy link

russel commented May 25, 2014

"go get -u github.com/conformal/gotk3/gtk" works fine. However a subsequent "go install -compiler gccgo -gccgoflags -O github.com/conformal/gotk3/gtk" results in:

# github.com/conformal/gotk3/gtk
gtk/gtk.go:2241:61: error: invalid type conversion (cannot use type gdk.Atom as type unsafe.Pointer)
  c := C.gtk_clipboard_get(C.GdkAtom(unsafe.Pointer(atom)))
                                                             ^
gtk/gtk.go:2256:32: error: invalid type conversion (cannot use type gdk.Atom as type unsafe.Pointer)
   C.GdkAtom(unsafe.Pointer(atom)))
                                ^

I am on Debian Sid with gc from default/tip of a clone and gccgo-4.9 from the Debian repository.

@jrick
Copy link
Member

jrick commented May 25, 2014

I've seen this problem before and it's an issue with gccgo not being able to convert from defined uintptr types (type MyType uintptr) directly to an unsafe.Pointer. Can you add an additional uintptr conversion before the unsafe.Pointer conversion and confirm that resolves the issue?

I'm not on a machine with commit access atm otherwise I could push a fix now.

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

No branches or pull requests

2 participants