firecracker-microvm / firectl

firectl is a command-line tool to run Firecracker microVMs
Apache License 2.0
477 stars 72 forks source link

Compile firectl statically? #15

Closed luxas closed 5 years ago

luxas commented 5 years ago

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 5 years ago

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!

samuelkarp commented 5 years ago

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.

samuelkarp commented 5 years ago

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 5 years ago

Thank you!