Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile in Alpine #28

Closed
nsweeting opened this issue Jul 25, 2023 · 3 comments · Fixed by #29
Closed

Fails to compile in Alpine #28

nsweeting opened this issue Jul 25, 2023 · 3 comments · Fixed by #29

Comments

@nsweeting
Copy link

Hi there,

Exile is failing to compile in Alpine (3.17 and 3.18 tried) via docker.io/hexpm/elixir:1.14.2-erlang-25.1.2-alpine-3.18.0 at the moment. Here is the stacktrace:

#22 61.28 ==> exile
#22 61.28 mkdir -p priv
#22 61.28 cc -I/usr/local/lib/erlang/usr/include -fPIC -shared -Wall -Werror -Wno-unused-parameter -pedantic -std=c99 -O2 -fsanitize=undefined -D_POSIX_C_SOURCE=200809L c_src/exile.c -o priv/exile.so
#22 61.42 /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: cannot find -lubsan: No such file or directory
#22 61.42 collect2: error: ld returned 1 exit status
#22 61.42 make: *** [Makefile:21: priv/exile.so] Error 1
#22 61.43 could not compile dependency :exile, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile exile", update it with "mix deps.update exile" or clean it with "mix deps.clean exile"
#22 61.43 ==> conduit
#22 61.43 ** (Mix) Could not compile with "make" (exit status: 2).
#22 61.43 You need to have gcc and make installed. If you are using
#22 61.43 Ubuntu or any other Debian-based system, install the packages
#22 61.43 "build-essential". Also install "erlang-dev" package if not
#22 61.43 included in your Erlang/OTP version. If you're on Fedora, run
#22 61.43 "dnf group install 'Development Tools'".
#22 61.43

The build is including alpine-sdk (functional equivalent to build-essential).

Thanks

@akash-akya
Copy link
Owner

Hi @nsweeting, thanks for reporting the issue.

I created a fix, can you try dev branch to see if works?

{:exile, github: "akash-akya/exile", branch: "dev"}

@nsweeting
Copy link
Author

Hi @akash-akya - thanks for the quick followup. I was able to compile in an alpine based build successfully from your dev branch 👍

@akash-akya
Copy link
Owner

@nsweeting released v0.7.0 with the fix 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants