question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alpine target binary is missing symbols

See original GitHub issue

👋 and thank you so much for this valuable project! We’ve been using it successfully for the past 2 years, and really appreciate the hard work behind it!

We’re facing an issue where building our project for the alpine platform generates a binary file that ~segfaults~ has missing symbols when executed.

~Our workaround is to spin up an alpine container and build our project inside it for the alpine platform. This generates a proper binary.~ This wasn’t really the workaround, it’s just that node:alpine includes libstdc++, and alpine:latest doesn’t.

Our project is https://github.com/snyk/snyk, ~and our workaround is described here - https://github.com/snyk/snyk/pull/608~ and we now simply build against the alpine target.

~1. How can we help troubleshoot and fix this issue?~ 2. If you are facing something similar, please see if our workaround can help you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
drazisilcommented, May 8, 2020

Adding the following two libs got the binary working for me. I’d love a way to compile them in statically though, any thoughts?

apk add libstdc++
apk add libgcc
1reaction
jeseccommented, May 14, 2021

This issue has been resolved. Please let me know if it is still relevant.

https://github.com/vercel/pkg-fetch/commit/21ab8a26c835bb2d9ae5f96760ca840d68da2064

Read more comments on GitHub >

github_iconTop Results From Across the Web

binutils: Not all default linker targets are built on x86_64
On x86_64, Alpine's binutils ld and ld.gold binaries do not support all targets that are otherwise available on other architectures.
Read more >
1926567 – Can't enter a container based on an Alpine image
Yes, the "500MB" string is hard coded. It's a historical relic from back when Toolbox was implemented in POSIX shell and there was...
Read more >
Docker image with Alpine Linux: an executable file is definitely ...
My guess is that your binary is using non-standard functions that do not exist under Alpine. I see two solutions to that :...
Read more >
Building the JDK - OpenJDK
A complete list of valid JVM features can be found using bash configure --help . --with-target-bits=<bits> - Create a target binary suitable for...
Read more >
Building a Native Executable - Quarkus
Mandrel is recommended for building native executables that target Linux ... GraalVM binaries are not (yet) notarized for macOS Catalina as reported in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found