firecracker-microvm/firectl

Compile firectl statically?

luxas opened this issue · 4 comments

luxas commented

Hi, thanks for this great tool!

I wonder, is there a specific reason firectl is not statically linked? (i.e. specific imports)
Otherwise, I think it'd be good as a general best practice to compile it statically to reduce deps :)

xibz commented

Hello @luxas,

Thank you for reaching out to us. We've just completed a release for firectlv which includes the binary to download. If you have any additional questions please let us know!

Hi @luxas! My apologies for the long delay. We do not have any specific imports that require firectl to be dynamically-linked; it will build and function (as far as I can tell) fine as a statically-linked binary.

As of right now we're building a dynamically-linked binary that links to libc and libpthread, but it can be built either way. I'll open a PR to add this option to the Makefile.

Hi @luxas, we've merged a change to the Makefile to build a statically-linked binary if desired. You can enable this by passing the STATIC_BINARY variable (i.e., make firectl STATIC_BINARY=1).

luxas commented

Thank you!