Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

build using docker in template link to musl #33

Open
Codelax opened this issue Mar 7, 2023 · 2 comments
Open

build using docker in template link to musl #33

Codelax opened this issue Mar 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Codelax
Copy link

Codelax commented Mar 7, 2023

Describe the bug
The make docker command to build using docker and the Dockerfile produces builds that link to musl.
This make the binaries not working when using them with waypoint on a system that does not have musl as libc.

Steps to Reproduce

  • Download the linux build that is produced by this build in a plugin, for example cloudfoundry
  • file the binary
 ○ file waypoint-plugin-cloudfoundry
waypoint-plugin-cloudfoundry: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=6AVyHUccoYweMVdpx9Ry/VkjT6-P2icj3imeXHyBd/XqYh8sw7MfBJRfNvR5iX/87-ju-GqBf5OD4Rr1iYh, not stripped

Expected behavior
The produced binaries should not dynamically link to alpine's libc

Additional context
I solved it on scaleway's side by adding CGO_ENABLED=0 when building binaries

@Codelax Codelax added the new label Mar 7, 2023
@catsby catsby added bug Something isn't working and removed new labels Mar 8, 2023
@catsby
Copy link

catsby commented Mar 8, 2023

Thanks for writing in @Codelax - so adding a simple CGO_ENABLED=0 in our Makefile addressed the issue? If so I believe we can make that change

@Codelax
Copy link
Author

Codelax commented Mar 8, 2023

Yes, it did fix it for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants