mattolenik / hclq

Command-line processor for HashiCorp config files, like sed for HCL — Terraform, Consul, Nomad, Vault
https://hclq.sh
The Unlicense
252 stars 23 forks source link

Consider releasing statically linked binaries #22

Open invidian opened 3 years ago

invidian commented 3 years ago

Currently, if hclq is installed on Alpine Linux, it does not work and gives following error:

/ # ./hclq-linux-amd64
/bin/sh: ./hclq-linux-amd64: not found
NikolaLohinski commented 3 years ago

Hi !

Just confirmed it works on alpine, you are not loading the correct processor build. Consider using 386.

wget -qO /bin/hclq https://github.com/mattolenik/hclq/releases/download/${HCLQ_VERSION}/hclq-linux-386 \
&& chmod +x /bin/hclq

However I confirm the install script does not work inside alpine.

invidian commented 3 years ago

Just confirmed it works on alpine, you are not loading the correct processor build. Consider using 386.

Using 386 build seems like an workaround, as it's statically linked, which is why it works in contrary to amd64 build:

/ # file hclq-linux-amd64
hclq-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=tIObn0JcRt4t7mKZUrxH/b-btFO2_KdSHwn6i0W7c/c-1srTsj_N73rGCUjaaB/vF8B_vkNgQ44xuFID9pw, stripped
/ # file hclq-linux-386
hclq-linux-386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, Go BuildID=MLoNZrIlwWx5zKn57MaC/tTZiapLXpVLLqG7Su0xM/N6g69xFevSz7g1vZeqxh/IdEdig3BEAM2gt3PdVCX, stripped