johnyrose / minict

A minimal container runtime written in Go that was made mainly for learning purposes and is intended to be as simple as possible.
GNU General Public License v3.0
172 stars 9 forks source link

static binary? #2

Open pwFoo opened 2 years ago

pwFoo commented 2 years ago

Hi,

is it possible to compile it as static binary?

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lassuan
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpg-error

Searched about that error and found a glibc dependency, right? I try to compile with alpine linux / musl and would prefer a small binary build.

johnyrose commented 2 years ago

Hi, could you try installing the gpgme-dev package? It might solve your issue, if not I'll try compiling it on Alpine myself today or tomorrow when I get the chance.

pwFoo commented 2 years ago

gpgme-dev is installed:

/go/src/minict # cat /etc/apk/world 
alpine-baselayout
alpine-keys
apk-tools
build-base
busybox
ca-certificates
git
gpgme-dev
libc-utils

Haven't found the link again... That pointed to a problem with glibc dependency which isn't solved with musl?! But I don't any experience with that topic... static build still fails with alpine / musl.