ChainSafe / gossamer

πŸ•ΈοΈ Go Implementation of the Polkadot Host
https://chainsafe.github.io/gossamer
GNU Lesser General Public License v3.0
430 stars 112 forks source link

Docker alpine wont compile the project #424

Closed thomasmodeneis closed 10 months ago

thomasmodeneis commented 4 years ago

I have been trying to make the current codebase to compile on docker alpine without success.

Expected Behavior

Project compilation with Go 1.13 should work cross platform.

Current Behavior

Current build fails, I believe is due to the package management being used go.mod not able to properly setup all required libs. As a side note, the usual way go projects are compiled (except for glide and go.mod) are to have a vendor folder with all the required libs and this is the most reliable way to use go.

Possible Solution

  1. Update docker build to use Ubuntu, as it seems like it works fine in this distro.

  2. Ditch go.mod and replace it with standard vendor folder managed by dep or something else.

  3. Fix somehow the build and find out what is wrong / how to fix it.

Steps to Reproduce (for bugs)

There is already a PR with a solution for the bug, but I would like to understand why the current build is failing, maybe I am missing something. Please share your inputs.

The following list is what I tried to make it run, I have tried to compile with alpine (7,8,9,10) and using gcc(6,7,8) without success. I tried using standard go install ./... and I also built a small go class to build go within Go in order to be able to be sure that is not the go install magic (./...) doing something wrong and messing up things secretly.

So far I could not see much differences between using go install and the custom ci.go.

You can test it and play with it on #409 branch.

dir: cmd CGO_ENABLED=0 running alpine13.10 go13 and go install ./...

go: finding github.com/ChainSafe/gossamer/p2p latest
build github.com/ChainSafe/gossamer/gossamer: cannot load github.com/ChainSafe/gossamer/cmd/utils: no matching versions for query "latest"
The command '/bin/sh -c GOOS=linux go install ./...' returned a non-zero code: 1
Makefile:68: recipe for target 'docker-build' failed
make: *** [docker-build] Error 1

dir:root CGO_ENABLED=0 alpine13.10 go13 and go install ./...

Step 9/15 : RUN CGO_ENABLED=0 GOOS=linux go install ./...
 ---> Running in 1c5f253a139e
build github.com/ChainSafe/gossamer/cmd/gossamer: cannot find module for path github.com/OneOfOne/xxhash

dir:root alpine13.10 go13 and go install ./...

Step 9/15 : RUN go install ./...
 ---> Running in ae615118034a
# github.com/wasmerio/go-ext-wasm/wasmer
exec: "gcc": executable file not found in $PATH
# github.com/ethereum/go-ethereum/crypto/secp256k1
exec: "gcc": executable file not found in $PATH

dir:root running alpine13.10 go13 and go run build/ci.go install

# github.com/wasmerio/go-ext-wasm/wasmer
exec: "gcc": executable file not found in $PATH
# github.com/ethereum/go-ethereum/crypto/secp256k1
exec: "gcc": executable file not found in $PATH

installing build-base (gcc 8.4.0) dir:root running alpine13.10 go13 and go run build/ci.go install

github.com/whyrusleeping/mdns
# github.com/wasmerio/go-ext-wasm/wasmer
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libdl.so.2, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: librt.so.1, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libpthread.so.0, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libc.so.6, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: ld-linux-x86-64.so.2, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libm.so.6, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memset@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_signal@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `clock_gettime@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `strlen@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `trunc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutexattr_settype@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_condattr_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_tryrdlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `mmap@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_broadcast@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `getcwd@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_key_create@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `strcmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sysconf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `getpid@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `setjmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `floor@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_destroy@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `syscall@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `writev@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sigemptyset@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sigaction@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_getstack@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `bsearch@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `snprintf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_timedwait@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `open@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_key_delete@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_trylock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `open64@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__xpg_strerror_r@GLIBC_2.3.4'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_lock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `realloc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_wait@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `calloc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `dlsym@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_unlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `dl_iterate_phdr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_self@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_condattr_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_init@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_create@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `floorf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_rdlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `longjmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `malloc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sigaltstack@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__tls_get_addr@GLIBC_2.3'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memmove@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_unlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `lseek@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `prctl@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_getattr_np@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `ceil@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__errno_location@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `abort@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memcpy@GLIBC_2.14'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `mprotect@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sched_yield@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_getspecific@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memcmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sched_getaffinity@GLIBC_2.3.4'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_detach@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `munmap@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `close@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `strrchr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__fxstat@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `fcntl@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `getenv@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `truncf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_condattr_setclock@GLIBC_2.3.3'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_setspecific@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `ioctl@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `dladdr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `free@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_wrlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_getguardsize@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memchr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `write@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `read@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `ceilf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `posix_memalign@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
github.com/libp2p/go-libp2p/p2p/discovery

installing build-base (gcc 8.4.0) dir:root running alpine13.10 go13 and go install ./...

Step 8/14 : RUN go install ./...
 ---> Running in 0e54fc443058
# github.com/wasmerio/go-ext-wasm/wasmer
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libdl.so.2, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: librt.so.1, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libpthread.so.0, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libc.so.6, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: ld-linux-x86-64.so.2, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libm.so.6, needed by /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memset@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_signal@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `clock_gettime@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `strlen@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `trunc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutexattr_settype@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_condattr_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_tryrdlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `mmap@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_broadcast@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `getcwd@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_key_create@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `strcmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sysconf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `getpid@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `setjmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `floor@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_destroy@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `syscall@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `writev@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sigemptyset@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sigaction@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_getstack@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `bsearch@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `snprintf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_timedwait@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `open@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_key_delete@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_trylock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `open64@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__xpg_strerror_r@GLIBC_2.3.4'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_lock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `realloc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_wait@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `calloc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `dlsym@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_unlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `dl_iterate_phdr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_self@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_condattr_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_cond_init@GLIBC_2.3.2'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_create@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `floorf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_rdlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `longjmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `malloc@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sigaltstack@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__tls_get_addr@GLIBC_2.3'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memmove@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_unlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `lseek@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `prctl@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_getattr_np@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `ceil@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__errno_location@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `abort@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memcpy@GLIBC_2.14'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `mprotect@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sched_yield@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_getspecific@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memcmp@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `sched_getaffinity@GLIBC_2.3.4'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_detach@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `munmap@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_mutex_init@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `close@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `strrchr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `__fxstat@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `fcntl@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `getenv@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `truncf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_condattr_setclock@GLIBC_2.3.3'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_setspecific@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `ioctl@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `dladdr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `free@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_rwlock_wrlock@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `pthread_attr_getguardsize@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `memchr@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `write@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `read@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `ceilf@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.0.0-20190716093451-605a12aad995/wasmer/libwasmer_runtime_c_api.so: undefined reference to `posix_memalign@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status

using FROM n0madic/alpine-gcc:7.4.0 as builder and building go 1.13.4 from source

Step 23/29 : RUN go install ./...

 ---> Running in d05bb235e489
# github.com/wasmerio/go-ext-wasm/wasmer
exec: "gcc": executable file not found in $PATH
# github.com/ethereum/go-ethereum/crypto/secp256k1
exec: "gcc": executable file not found in $PATH

using FROM n0madic/alpine-gcc:7.4.0 as builder and building go 1.13.4 from source CGO_ENABLED=0

Step 23/29 : RUN CGO_ENABLED=0 GOOS=linux go install ./...
 ---> Running in 7ba4df9975d2
build github.com/ChainSafe/gossamer/cmd/gossamer: cannot find module for path github.com/OneOfOne/xxhash

using FROM n0madic/alpine-gcc:7.4.0 as builder RUN go run build/ci.go install

# github.com/wasmerio/go-ext-wasm/wasmer
exec: "gcc": executable file not found in $PATH
# github.com/ethereum/go-ethereum/crypto/secp256k1
exec: "gcc": executable file not found in $PATH

using FROM n0madic/alpine-gcc:7.4.0 as builder and building go 1.13.4 from source CGO_ENABLED=0 and build/ci.go install

Step 23/29 : RUN CGO_ENABLED=0 GOOS=linux go run build/ci.go install
 ---> Running in a83b8dc6fdcc
ci.go:40: could not list packages: exit status 1
build github.com/ChainSafe/gossamer/cmd/gossamer: cannot find module for path github.com/OneOfOne/xxhash
exit status 1

Context

Example dockerfile with gcc7 and manually installing go13:

ARG GO_VERSION=1.13
FROM n0madic/alpine-gcc:7.4.0 as builder

RUN apk --no-cache add git linux-headers ca-certificates

RUN apk add --no-cache \
        ca-certificates

# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf

ENV GOLANG_VERSION 1.13.4

RUN set -eux; \
    apk add --no-cache --virtual .build-deps \
        bash \
        gcc \
        musl-dev \
        openssl \
        go \
    ; \
    export \
# set GOROOT_BOOTSTRAP such that we can actually build Go
        GOROOT_BOOTSTRAP="$(go env GOROOT)" \
# ... and set "cross-building" related vars to the installed system's values so that we create a build targeting the proper arch
# (for example, if our build host is GOARCH=amd64, but our build env/image is GOARCH=386, our build needs GOARCH=386)
        GOOS="$(go env GOOS)" \
        GOARCH="$(go env GOARCH)" \
        GOHOSTOS="$(go env GOHOSTOS)" \
        GOHOSTARCH="$(go env GOHOSTARCH)" \
    ; \
# also explicitly set GO386 and GOARM if appropriate
# https://github.com/docker-library/golang/issues/184
    apkArch="$(apk --print-arch)"; \
    case "$apkArch" in \
        armhf) export GOARM='6' ;; \
        x86) export GO386='387' ;; \
    esac; \
    \
    wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
#   echo '6fe44965ed453cd968a81988523e9b0e794d3a478f91fd7983c28763d52d5781 *go.tgz' | sha256sum -c -; \
    tar -C /usr/local -xzf go.tgz; \
    rm go.tgz; \
    \
    cd /usr/local/go/src; \
    ./make.bash; \
    \
    rm -rf \
# https://github.com/golang/go/blob/0b30cf534a03618162d3015c8705dd2231e34703/src/cmd/dist/buildtool.go#L121-L125
        /usr/local/go/pkg/bootstrap \
# https://golang.org/cl/82095
# https://github.com/golang/build/blob/e3fe1605c30f6a3fd136b561569933312ede8782/cmd/release/releaselet.go#L56
        /usr/local/go/pkg/obj \
    ; \
    apk del .build-deps; \
    \
    export PATH="/usr/local/go/bin:$PATH"; \
    go version

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

# Configure go env vars
ENV GO111MODULE=on
ENV GOPATH=/gocode
ENV GOROOT=/usr/local/go
ENV PATH=$PATH:$GOPATH/bin:$GOROOT/bin

# Prepare structure and change dir
RUN mkdir -p $GOPATH/src/github.com/ChainSafe/gossamer
WORKDIR $GOPATH/src/github.com/ChainSafe/gossamer

# Add go mod lock files and gossamer default config
COPY go.mod .
COPY go.sum .
COPY config.toml .

# Get go mods
RUN go mod download
COPY . $GOPATH/src/github.com/ChainSafe/gossamer

#RUN gcc --version

#RUN CGO_ENABLED=0 GOOS=linux go install ./...
RUN CGO_ENABLED=0 go run build/ci.go install

FROM scratch

WORKDIR /
COPY --from=builder ./go/src/github.com/ChainSafe/gossamer/cmd/gossamer/gossamer .
COPY --from=builder ./go/src/github.com/ChainSafe/gossamer/config.toml .
CMD ["./gossamer"]
EXPOSE 7001
ansermino commented 4 years ago

Thank you for opening this. Your work is very much appreciated, and I too hope to learn from this issue.

My first thought is that this is a Wasmer issue, not a Gossamer issue. They explicitly state on their readme that go install does not presently work on windows. Wasmer seems to have a number of issues supporting Windows, some of which have been resolved in more recent commits. Perhaps you can try updating go-ext-wasm to the latest commit on their master (we currently point to a rather old commit, although its more recent than their most recent release...).

Additionally, Gossamer still has a number of challenges to overcome before we can begin to be feature complete, let alone worry about things like cross-compatibility. My hesitation to merge your install() method is that we currently have near-zero interest in Windows compatibility (Docker is still a nice-to-have), and when we do there is no guarantee someone will be around to maintain it.

I think this boils down to one question -- Do you think these problems are isolated to Windows?

If yes, I think this is jumping the gun on compatibility. If no, please outline what you believe is not strictly a Windows issue.

thomasmodeneis commented 4 years ago

My first thought is that this is a Wasmer issue, not a Gossamer issue.

I see, well in that case the best way to deal with this would be to add Appveyor to our build process, so we can at least have this step as part of Gossamer build steps and will remember us about it.

My hesitation to merge your install() method is that we currently have near-zero interest in Windows compatibility (Docker is still a nice-to-have), and when we do there is no guarantee someone will be around to maintain it.

If we make the windows and macos builds part of the CI, there is no need to have someone to maintain it, as it should just work out of the box, and when it breaks we can at least know when and what change broke it, making it way easier. Having the install() method as part of the CI build is just the first step, the install method can be enhanced to do multiple checks and avoid us having to write custom shell scripts, thus allowing developers to be more platform agnostic and avoid wasting time on simple issues.

Do you think these problems are isolated to Windows?

Well, clearly the readme statement that works on Linux either incomplete (because its clearly not working on alpine) or they just dont know about it, or we are doing something wrong. So I would say that there is more benefits to use go to build go, than to rely on specifics of each operational system or the magic of go install ./....

Perhaps you can try updating go-ext-wasm to the latest commit on their master

Good idea, I will look into it.

rusenask commented 4 years ago

You can add gcc with apk and some other libs. I tried to go into this rabbit hole last weekend but eventually gave up :D

Last issue I remember was that when using ld to get the dependencies it would fail on wasmer lib.

Tried to use external linking when compiling as well, but same issue, for some reason can't get wasmer inside.. It would be nice to figure this out to create some smaller images :)

diegobes commented 4 years ago

The problem is that you are trying to use libwasmer_runtime_c_api.so that is compiled for glibc on a musl ( Alpine ) system. It will not work. I find a way to make it work by creating a musl version of libwasmer_runtime_c_api that is statically linked to go-ext-wasm. For that I had to recompile the wasmer project using the musl toolchain on an Ubuntu machine. With this work, My image went from 650mb on a Debian based Docker to 28mb on an Alpine based Docker

mffrench commented 4 years ago

Hello,

is there any README detailing the solution from @diegobes ? Is there any progress on that ticket ?

Thank you !

FlorianFranzen commented 3 years ago

Issue is tracked upstream under wasmerio/wasmer-go#113

qdm12 commented 3 years ago

Hi there πŸ‘‹

Maybe a bit irrelevant, I made #1813 initially trying to address this issue, using sgerrand/alpine-pkg-glibc.

The build would not work (logs below), but with a multi stage Dockerfile, it seems like it's feasible to run the program on a final image based on Alpine with that glibc package (correct me if I'm wrong!). The final image is 'only' 122MB, coming from the 3GB it is currently so that's nice.

Regarding building on Alpine, golang:1.15-alpine3.12 is 300MB and golang:1.15-debian is 840MB, but the Alpine image would require to install a bunch of C libraries to compile the program, which would likely result in the same size almost (and potentially take longer). Building on Alpine is great if you have only pure Go code, but in this case, it might not help that much the build. Although, it's worth a quick try once wasmerio/wasmer-go#113 is done πŸ˜‰

Failed Alpine + glibc build logs:

go build cmd/gossamer/main.go
# github.com/wasmerio/go-ext-wasm/wasmer
/go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.3.2-0.20200326095750-0a32be6068ec/wasmer/import.go:25:9: undefined: cWasmerImportObjectT
...
/go/pkg/mod/github.com/wasmerio/go-ext-wasm@v0.3.2-0.20200326095750-0a32be6068ec/wasmer/instance.go:120:24: too many errors
# github.com/ChainSafe/gossamer/lib/runtime
lib/runtime/sig_verifier.go:173:9: undefined: secp256k1.VerifySignature

Trying to build an example from the wasmer-go repo gives errors on Alpine + glibc:

/tmp/wasmer-go # CGO_ENABLED=1 go build examples/appendices/simple.go 
# github.com/wasmerio/wasmer-go/wasmer
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: warning: libdl.so.2, needed by wasmer/packaged/lib/linux-amd64/libwasmer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: wasmer/packaged/lib/linux-amd64/libwasmer.so: undefined reference to `memset@GLIBC_2.2.5'
...
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: wasmer/packaged/lib/linux-amd64/libwasmer.so: undefined reference to `posix_memalign@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status