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 on otp 27 #144

Closed
GregorGrasselli opened this issue Jun 13, 2024 · 9 comments · Fixed by #146
Closed

Fails to compile on otp 27 #144

GregorGrasselli opened this issue Jun 13, 2024 · 9 comments · Fixed by #146

Comments

@GregorGrasselli
Copy link

GregorGrasselli commented Jun 13, 2024

Hi, switching to elixir 1.17.0 and otp 27 breaks this for me.

The setup:

asdf .tool_versions

elixir 1.17.0-otp-27
erlang 27.0

asdf install
mix deps.get
mix deps.compile

results in:

** (Mix) Could not compile dependency :snappyer, "/home/gregor/.asdf/installs/elixir/1.17.0-otp-27/.mix/elixir/1-17/rebar3 bare compile --paths .../_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile snappyer --force", update it with "mix deps.update snappyer" or clean it with "mix deps.clean snappyer"

Obviously, this is not an issue with broadway_kafka directly, but with snappyer, which is a dependency of brod. The reason I'm opening an issue here is that both brod and snappyer are erlang libs and I'm not sure how to reproduce this without mix.

@josevalim
Copy link
Member

You can try cloning the projects and running the steps to build them. That should be enough to reproduce the issue.

@slashmili
Copy link
Collaborator

slashmili commented Jun 13, 2024

I tried on a new elixir app and added only snappyer as dependency.

mix compile
===> Fetching pc v1.14.0
===> Analyzing applications...
===> Compiling pc
===> Compiling _build/default/plugins/pc/src/pc_port_env.erl failed
_build/default/plugins/pc/src/pc_port_env.erl:190:10: code:lib_dir/2 is deprecated; this functionality will be removed in a future release

===> Errors loading plugin pc. Run rebar3 with DEBUG=1 set to see errors.
===> Analyzing applications...
===> Compiling pc
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`

We should report it to snappyer.

UPDATE: The error is related to pc


ENV:

Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1]

Interactive Elixir (1.16.1) - press Ctrl+C to exit (type h() ENTER for help)

@slashmili
Copy link
Collaborator

I reported the issue on pc blt/port_compiler#82

@mhdatie
Copy link

mhdatie commented Jun 13, 2024

I am experiencing this issue on ELIXIR_VERSION=1.16.2 and OTP_VERSION=26.2.1 when using hexpm/elixir packages. On CircleCI, this is not an issue when using cimg/elixir

@slashmili
Copy link
Collaborator

Another related issue reported at zmstone/snappyer#10

@slashmili
Copy link
Collaborator

slashmili commented Jun 25, 2024

I managed to fix my build by cleaning caches [1]

$ rm -rf  $HOME/.cache/rebar3/hex/hexpm/
$ rm -rf deps _build
$ mix deps.get
$ mix deps.compile

As snappyer doesn't use pin version of pc, I think it uses what you already have in your cache dir

@mhdatie I suggest to delete the cache, maybe it help. Would be good to provide the error message, and specially if it's related to snappyer follow up on zmstone/snappyer#10

@deepfryed
Copy link
Contributor

deepfryed commented Jul 6, 2024

brod 4.0 removes dependency on snappyer, @josevalim can broadway_kafka be updated to use the latest version of brod ?

@josevalim
Copy link
Member

Please send a PR!

@deepfryed
Copy link
Contributor

#146

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.

5 participants