gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
17.66k stars 737 forks source link

fail to compile ezstd #3067

Closed max-tern closed 1 month ago

max-tern commented 5 months ago

platfrom: max m1 gleam: v 1.1.0, installed with brew

gleam add ezstd & gleam run

LINK obj/conf_713d974d1b5639d588bafad52bd377d1/zstd
zstd build completed
~/WebstormProjects/gleam/e/build/dev/erlang/ezstd/_build/deps ~/WebstormProjects/gleam/e/build/dev/erlang/ezstd
~/WebstormProjects/gleam/e/build/dev/erlang/ezstd
 CPP    ezstd_nif.cc
 CPP    nif_utils.cc
 LD     ezstd_nif.so
===> Analyzing applications...
===> Compiling ezstd
===> Missing artifact priv/ezstd_nif.so
error: Shell command failure

if I clone repo: https://github.com/silviucpp/ezstd and rebar3 compile same working if try rebar3 lib with rebar3 new lib myapp & rebar3 compile after adding ezstd as dep

try same with mix also looks like working

Nicd commented 5 months ago

Checking with watchexec, the ezstd_nif.so seems to be very briefly created into build/dev/erlang/ezstd/c_src/priv/ezstd_nif.so, before all the build output is removed. So maybe it's looking for it in the wrong directory, such as with https://github.com/elixir-lang/elixir/issues/11530#issuecomment-1003310506 (just something I found)

Nicd commented 5 months ago

Similar issue in another package: https://github.com/silviucpp/erlkaf/issues/42

lpil commented 5 months ago

Thank you