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

Binary not linked statically anymore #666

Open
escoand opened this issue Jul 20, 2020 · 1 comment
Open

Binary not linked statically anymore #666

escoand opened this issue Jul 20, 2020 · 1 comment

Comments

@escoand
Copy link

escoand commented Jul 20, 2020

Title

Summary

I've upgraded from keycloak-gatekeeper version 10.0.1 (git+sha: 691bc4c, built: 08-05-2020) to louketo-proxy 1.0.0 but failing to get it running with my previous configuration.

Environment

  • OS: Alpine Linux
  • Kernel (e.g. uname -a): Linux f54ee906-7482-4341-421b-d0fa 4.15.0-106-generic #107~16.04.1-Ubuntu SMP Thu Jun 4 15:40:05 UTC 2020 x86_64 Linux
  • Go (e.g. go version)
  • Server (e.g. Keycloak or any other IdP): Keycload
  • Louketo: 1.0.0

Expected Results

The binary is linked statically, to be able to run it on any x86_64 Linux system.

Actual Results

The linux x86_64 binary is not statically linked anymore, which fails on musl systems (Alpine Linux):

# ldd /usr/local/bin/keycloak-gatekeeper
/lib/ld-musl-x86_64.so.1: /usr/local/bin/keycloak-gatekeeper: Not a valid dynamic program
# ldd /usr/local/bin/louketo-proxy
        /lib64/ld-linux-x86-64.so.2 (0x7f2178c4f000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f2178c4f000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f2178c4f000)

This could be fixed easily with (but is not a perfect solution):

# mkdir /lib64 && ln -s /lib/ld-musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

Steps to reproduce

Additional Information

@mreinli
Copy link

mreinli commented Jul 21, 2020

Having the exact same problem here. Fixed it by installing the libc6-compat package using apk.

apk add libc6-compat

However, it would be nice if we could run it in a vanilla Alpine Linux image.

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

No branches or pull requests

2 participants