Skip to content

Cannot get sample working under Go 1.6.x? #83

@myitcv

Description

@myitcv

Apologies if I'm missing something blindingly obvious here, but I cannot get the command line example working under Go 1.6.x

Everything works fine under Go 1.5.3, but under Go 1.6.2 I see:

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GORACE=""
GOROOT="/home/myitcv/gos"
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
$ python
Python 2.7.10 (default, Jun 14 2015, 18:40:08)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hi
>>> hi.Hello("you")
panic: runtime error: cgo result has Go pointer

goroutine 17 [running, locked to thread]:
panic(0x7fbaac0da9a0, 0xc82007e1c0)
        /home/myitcv/gos/src/runtime/panic.go:481 +0x3ea
main._cgoexpwrap_1c71e8bfd213__cgopy_GoString.func1(0xc820040ee8)
        _/tmp/gopy-122143260/_obj/_cgo_gotypes.go:85 +0x68
main._cgoexpwrap_1c71e8bfd213__cgopy_GoString(0x7fbaadaa1b94, 0xc82007e181, 0x3)
        _/tmp/gopy-122143260/_obj/_cgo_gotypes.go:87 +0x85
Aborted (core dumped)

Happy to continue playing under Go 1.5.3 for now but any help much appreciated.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions