Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running tflint v0.5.0 on alpine linux #151

Closed
hposca opened this issue Oct 17, 2017 · 2 comments
Closed

Problem running tflint v0.5.0 on alpine linux #151

hposca opened this issue Oct 17, 2017 · 2 comments

Comments

@hposca
Copy link

hposca commented Oct 17, 2017

Hi there.

I was very excited to test the new version of tflint on our project as it ran on my machine so I decided to put it on our CI. Unfortunately things didn't go well :/
Long story short: I think there was something different/strange regarding linking libraries when generating this new version.

These are some steps one can do to reproduce the issue:

Version 0.4.3 - Everything working

$ docker run --entrypoint /bin/sh -ti hashicorp/terraform:0.10.6
# curl -L -o /tmp/tflint.zip https://github.com/wata727/tflint/releases/download/v0.4.3/tflint_linux_amd64.zip && unzip /tmp/tflint.zip -d /usr/local/bin
...
# tflint
Awesome! Your code is following the best practices :)

# apk add --upgrade file
...
# file /usr/local/bin/tflint
/usr/local/bin/tflint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped

# ldd /usr/local/bin/tflint
ldd: /usr/local/bin/tflint: Not a valid dynamic program

Version 0.5.0 - with terraform 0.10.6

$ docker run --entrypoint /bin/sh -ti hashicorp/terraform:0.10.6
# curl -L -o /tmp/tflint.zip https://github.com/wata727/tflint/releases/download/v0.5.0/tflint_linux_amd64.zip && unzip /tmp/tflint.zip -d /usr/local/bin
...
# tflint
/bin/sh: tflint: not found

# apk add --upgrade file
...
# file /usr/local/bin/tflint
/usr/local/bin/tflint: 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

# ldd /usr/local/bin/tflint
        /lib64/ld-linux-x86-64.so.2 (0x5605e5ca0000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x5605e5ca0000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x5605e5ca0000)
Error relocating /usr/local/bin/tflint: __vfprintf_chk: symbol not found
Error relocating /usr/local/bin/tflint: __fprintf_chk: symbol not found

Version 0.5.0 - with terraform 0.10.7

$ docker run --entrypoint /bin/sh -ti hashicorp/terraform:0.10.7
# curl -L -o /tmp/tflint.zip https://github.com/wata727/tflint/releases/download/v0.5.0/tflint_linux_amd64.zip && unzip /tmp/tflint.zip -d /usr/local/bin
...
# tflint
/bin/sh: tflint: not found

# apk add --upgrade file
...
# file /usr/local/bin/tflint
/usr/local/bin/tflint: 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

# ldd /usr/local/bin/tflint
        /lib64/ld-linux-x86-64.so.2 (0x55e51813d000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x55e51813d000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55e51813d000)
Error relocating /usr/local/bin/tflint: __vfprintf_chk: symbol not found
Error relocating /usr/local/bin/tflint: __fprintf_chk: symbol not found

Please ping if there is something I can do to help.

@wata727
Copy link
Member

wata727 commented Oct 18, 2017

@hposca I certainly confirmed this problem. I think that it is probably caused by the different release environment. Since v0.5.1 was released in the previous environment, please try this.

In the future, I would like to release this on Travis and to prevent this problem.

@hposca
Copy link
Author

hposca commented Oct 18, 2017

@wata727 working as a charm 👍
Thank you very much 😄

And yes, if you create the release process inside a CI like travis or circleci it will avoid this type of problem in the future.

@hposca hposca closed this as completed Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants