Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Latest release breaks under Alpine #29

Closed
moritzheiber opened this issue Feb 9, 2018 · 6 comments
Closed

Latest release breaks under Alpine #29

moritzheiber opened this issue Feb 9, 2018 · 6 comments

Comments

@moritzheiber
Copy link

Is there a reason as to why the latest release (0.5.0) is dynamically linked instead of statically? It breaks Alpine compatibility:

# 0.5.0
/ # file /root/.terraform.d/plugins/terraform-provider-acme 
/root/.terraform.d/plugins/terraform-provider-acme: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, with debug_info, not stripped

# 0.4.0
/ # file /root/.terraform.d/plugins/terraform-provider-acme 
/root/.terraform.d/plugins/terraform-provider-acme: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped

I know this isn't necessarily a target platform, but it looks like unwanted side-effect to me .. ?

Alpine version used is 3.7.0 (stable).

@vancluever
Copy link
Owner

Hey @moritzheiber, something in the dependency chain more than likely depends on cgo by default, so probably built dynamic by default... this is definitely an oversight and not done intentionally.

For now, you might have to build it by yourself either static or say within Alpine itself (so it links against musl). But I will add this as an enhancement for next release!

@moritzheiber
Copy link
Author

No worries, I don't need to rely on the latest release. I'll just stick with 0.4.0 for the time being. Thank you for taking this up.

@miguelaferreira
Copy link

miguelaferreira commented Mar 5, 2018

Hi peepz! I've landed here because I've been a very happy customer of this great terraform provider until I've upgraded to version 0.5.0 and that broke my pipelines (that run on alpine).

I'm not experienced with golang, but I needed to fix my pipelines so I've built the binary for this project in a golang:alpine container and that worked well.
I'm publishing the linux binary I've built against musl in my fork of this repo under the 0.5.0 tag.

Anyone not wanting to just download a binary off the internet and execute that blindly (would be a smart person and) can build it as well with the following steps:

  1. clone this repo and cd to it
  2. run command docker run --rm -it -v $PWD:/go/src/github.com/vancluever/terraform-provider-acme golang:alpine
  3. (already in the container) run command apk add --udpate make git followed by make build
  4. the binary will be available outside the container in the cloned repo directory under pkg/linux_amd64.

Hope this helps anyone that lands here looking for it.

@viyh
Copy link

viyh commented Mar 23, 2018

I was able to get it working by just installing the "libc6-compat" package in alpine.

@grahamlyons
Copy link

I've just found this too. The Hashicorp Docker images run under Alpine so it would be nice to fix this so it works by default.

@viyh's libc6-compat fix worked for me.

grahamlyons referenced this issue in mergermarket/cdflow-commands Apr 23, 2018
This works around a bug in the acme provider where the latest release
is broken in Alphine:
vancluever/terraform-provider-acme#29
@vancluever
Copy link
Owner

Hey all! This should now be fixed with the 0.6.0 release:

$ ldd ./terraform-provider-acme 
	not a dynamic executable

Enjoy!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants