bcrypt_elixir icon indicating copy to clipboard operation
bcrypt_elixir copied to clipboard

Compile failed on Alpine Docker Image

Open AashishChakravarty opened this issue 3 years ago • 2 comments

I am facing this issue in bitwalker/alpine-elixir-phoenix:1.13 docker image.

make: uname: Operation not permitted
mkdir -p "/opt/credible_platform/_build/dev/lib/bcrypt_elixir/priv"
make: /bin/sh: Operation not permitted
make: *** [Makefile:36: _priv_dir] Error 127
could not compile dependency :bcrypt_elixir, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile bcrypt_elixir", update it with "mix deps.update bcrypt_elixir" or clean it with "mix deps.clean bcrypt_elixir"
==>
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

AashishChakravarty avatar Nov 30 '22 09:11 AashishChakravarty

I think error is self-explanatory, (you need gcc and make). On Ubuntu build-essential, add around 300MB of the docker image.

I am new to elixir, but can we create pre-build versions of bcrypt for common platforms ? It is a common approach in node.js world.

chyzwar avatar Dec 03 '22 11:12 chyzwar

I had the same problem in my CI build process and the problem was some permission or whatever. Try to update the docker version you are using to create the build. I updated the build machine on CI and everything worked as expected. This solved for me: https://github.com/riverrun/bcrypt_elixir/issues/26#issuecomment-881802458

chrisrp avatar Feb 13 '24 17:02 chrisrp

Closing this issue. If anyone feels like reopening, please let me know.

riverrun avatar Oct 04 '24 12:10 riverrun