Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with building Elixir and beam on Alpine Linux

Tags:

alpine-linux

I am running a build with Alpine linux 3.12 and build fails with the following output indicating an error building beam and ERTS with a C++ dependency.

Error relocating /opt/app/erts-12.3.2.1/bin/beam.smp: _ZSt28__throw_bad_array_new_lengthv: symbol not found
Error relocating /opt/app/erts-12.3.2.1/bin/beam.smp: pthread_getname_np: symbol not found

So far I have been looking at threads on these two specific errors with various threads as to the failure.

Is there some dependency that may need updating?

like image 509
William Ross Avatar asked Dec 30 '25 10:12

William Ross


1 Answers

It may be caused by an update of the Elixir image in elixir:1.12.3-alpine, which bumped the base image from alpine:3.14 to alpine:3.16.

If you build the Elixir release from elixir:1.12.3-alpine and try to run the release on an older alpine, you will hit this error because of the runtime image has an older musl version.

To fix it, you can upgrade the runtime image to alpine:3.16.

like image 53
Shou Ya Avatar answered Jan 02 '26 17:01

Shou Ya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!