conformal / gotk3

Go bindings for GTK3
ISC License
470 stars 81 forks source link

Error when getting gotk3 #64

Closed ajmurmann closed 10 years ago

ajmurmann commented 10 years ago

I am getting the following error when trying to go get gotk3. I just started looking at Go, so it's probably me or my machine setup. However, I have successfully gotten and used other packages. Any help is highly appreciated, since I am stuck with this since quite a time now.

Thank you!

$ go get github.com/conformal/gotk3/gdk
# github.com/conformal/gotk3/glib
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x15672]

goroutine 16 [running]:
runtime.panic(0x1dae60, 0x31b9e4)
    /Users/amurmann/.gvm/gos/go1.3/src/pkg/runtime/panic.c:279 +0xf5
main.(*typeConv).Type(0x2083cc420, 0x2208385690, 0x208392e70, 0xa7ef, 0x1)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1288 +0x1632
main.(*typeConv).Type(0x2083cc420, 0x2208385620, 0x208392de0, 0xa7ef, 0x0)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1189 +0x3dd6
main.(*typeConv).Struct(0x2083cc420, 0x208373ce0, 0xa7ef, 0x6, 0x0, 0x0, 0x8)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1551 +0x70b
main.(*typeConv).Type(0x2083cc420, 0x22083857c0, 0x208373ce0, 0xa7ef, 0x2085cf460)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1234 +0x3038
main.(*typeConv).Type(0x2083cc420, 0x2208385690, 0x208392cf0, 0xa7ef, 0x1)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1269 +0x1301
main.(*typeConv).Type(0x2083cc420, 0x2208385620, 0x208392c90, 0xa7ef, 0x4)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1189 +0x3dd6
main.(*typeConv).Struct(0x2083cc420, 0x2083737a0, 0xa7ef, 0x6, 0x0, 0x0, 0x8)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1551 +0x70b
main.(*typeConv).Type(0x2083cc420, 0x22083857c0, 0x2083737a0, 0xa7ef, 0x2085cf240)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1234 +0x3038
main.(*typeConv).Type(0x2083cc420, 0x2208385690, 0x2083d70b0, 0xa7ef, 0x76401)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1269 +0x1301
main.(*typeConv).Type(0x2083cc420, 0x2208385620, 0x2083d7050, 0xa7ef, 0x0)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1189 +0x3dd6
main.(*typeConv).FuncType(0x2083cc420, 0x2084483c0, 0xa7ef, 0x2084483c0)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:1466 +0x458
main.(*Package).loadDWARF(0x20836e8f0, 0x2083c8180, 0x2084a5800, 0x100, 0x100)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:539 +0x1462
main.(*Package).Translate(0x20836e8f0, 0x2083c8180)
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/gcc.go:182 +0x150
main.main()
    /Users/amurmann/.gvm/gos/go1.3/src/cmd/cgo/main.go:259 +0xef1

goroutine 19 [finalizer wait]:
runtime.park(0x4fed0, 0x31feb8, 0x31f269)
    /Users/amurmann/.gvm/gos/go1.3/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x31feb8, 0x31f269)
    /Users/amurmann/.gvm/gos/go1.3/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /Users/amurmann/.gvm/gos/go1.3/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /Users/amurmann/.gvm/gos/go1.3/src/pkg/runtime/proc.c:1445
jrick commented 10 years ago

It's a cgo bug related to your Go being built with clang. See https://code.google.com/p/go/issues/detail?id=8238.

davecgh commented 10 years ago

You can also try go get -u -d github.com/conformal/gotk3/gdk. That seems to have resolved the issue for me when I ran into it.