Issue with building Elixir and beam on Alpine Linux

Viewed 1090

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?

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.

Related