I have the same problem with latest version (1.11.4). I've been trying to use two shared objects A and B (with c-shared build mode), and use my C++ program to pass the functions exported by A to B through GoInterface parameters. However, in B the type assertion from GoInterface failed...
Any known workarounds now? 在 2018年4月8日星期日 UTC+8下午1:37:26,Paul Cager写道: > > I have a C program that calls into a Golang shared object (built using > -buildmode=c-shared). > That works. > > Now I want the Golang shared object to call out to a Go plugin (using > https://golang.org/pkg/plugin/), but plugin.Open panics with "fatal > error: runtime: no plugin module data": > > runtime.throw(0x7fd847afa7d5, 0x1e) > /usr/local/go/src/runtime/panic.go:605 +0x97 fp=0xc4200468f0 sp= > 0xc4200468d0 pc=0x7fd847a5c877 > plugin.lastmoduleinit(0x7fd86c0010e0, 0xc42000e028, 0x7fd86c002180, 0x4c, > 0x7fd847dfe280) > /usr/local/go/src/runtime/plugin.go:13 +0xc00 fp=0xc420046a18 sp= > 0xc4200468f0 pc=0x7fd847a5dc60 > plugin.open(0x7fd8959be520, 0x19, 0x0, 0x0, 0x0) > /usr/local/go/src/plugin/plugin_dlopen.go:113 +0x23c fp=0xc420046c48 sp= > 0xc420046a18 pc=0x7fd847ae8f9c > plugin.Open(0x7fd8959be520, 0x19, 0x60, 0x7fd847d57220, 0x1) > /usr/local/go/src/plugin/plugin.go:31 +0x37 fp=0xc420046c80 sp= > 0xc420046c48 pc=0x7fd847ae8397 > main.Call(0x7fd8959bedd0, 0x7fd8959be520, 0x19, 0x7fd8959be920, 0xc, > 0x7fd8959be4c0, 0x2, 0x2, 0xc420000600) > /home/paul/gocode/src/github.com/paulcager/gerlang/gerlang.go:41 +0x52 fp > =0xc420046df0 sp=0xc420046c80 pc=0x7fd847af4032 > main._cgoexpwrap_2269dc20bc7c_Call(0x7fd8959bedd0, 0x7fd8959be520, 0x19, > 0x7fd8959be920, 0xc, 0x7fd8959be4c0, 0x2, 0x2, 0x0) > github.com/paulcager/gerlang/_obj/_cgo_gotypes.go:155 +0x80 fp= > 0xc420046e48 sp=0xc420046df0 pc=0x7fd847af3da0 > runtime.call128(0x0, 0x7fd8959be378, 0x7fd8959be410, 0x48) > > This looks to me like an instance of > https://github.com/golang/go/issues/18123 ("plugin: using stdlib package > plugin from c-archive package doesn't work as expected"). I've been > trying to think of a work-around for this, without any success. Are there > any known workarounds? > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.