To recreate the issue, run make test
. This will do a few things:
- Compile and run a Go executable named
loader
- This loader will open the
pow
plugin and run it with no arguments. - This works as expected.
- This loader will open the
- Compile a c-shared library with an exported function
doit()
namedcloader
.- This loader will be dynamically opened by the
main.c
executable and then rundoit()
. - The
doit()
func will open thepow
plugin and run it with no arguments. - This works on macOS, but crashes on Linux with
fatal error: runtime: no plugin module data
- This loader will be dynamically opened by the
You can also run make
to recreate the issue on your native system plus a Linux system running in Docker.
See the most recent Travis builds here: https://travis-ci.com/JohnStarich/go-plugin-issues/builds