Skip to content

Error loading function rebar_pkg_resource:init/2 please re-compile this module with an Erlang/OTP 28 compiler or update your Erlang/OTP version #14662

@saper

Description

@saper

Elixir and Erlang/OTP versions

% elixir --version
Erlang/OTP 28 [erts-16.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]

Elixir 1.18.2 (compiled with Erlang/OTP 28)

Operating system

MacOS 12

Current behavior

Trying to run just setup-dev target of the bonfire-app (which I think gets down to mix compile). This seems to occur when trying to compile https://github.com/benoitc/mimerl dependency with rebar3 downloaded by elixir.

With $HOME/.mix/elixir/1-18/rebar3 removed I get the following output:

....
Compile-time config ready
Could not find "rebar3", which is needed to build dependency :mimerl
Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] y
* creating /Users/macbook/.mix/elixir/1-18/rebar3
===> Using custom resource rebar_pkg_resource that implements a deprecated api. It should be upgraded to rebar_resource_v2.
=ERROR REPORT==== 22-Jul-2025::00:43:32.281386 ===
beam/beam_load.c(594): Error loading function rebar_pkg_resource:init/2: op bs_add p x i u x:
  please re-compile this module with an Erlang/OTP 28 compiler or update your Erlang/OTP version


=ERROR REPORT==== 22-Jul-2025::00:43:32.321362 ===
beam/beam_load.c(594): Error loading function rebar_prv_deps:source_text/1: op bs_append p i u u u x u x:
  please re-compile this module with an Erlang/OTP 28 compiler or update your Erlang/OTP version


===> Failed creating providers. Run with DIAGNOSTIC=1 for stacktrace or consult rebar3.crashdump.
** (Mix) Could not compile dependency :mimerl, "/Users/macbook/.mix/elixir/1-18/rebar3 bare compile --paths /Users/macbook/src/bonfire-app/_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile mimerl --force", update it with "mix deps.update mimerl" or clean it with "mix deps.clean mimerl"

Just running /Users/macbook/.mix/elixir/1-18/rebar3 fails with the same error:

Users/macbook/.mix/elixir/1-18/rebar3
===> Using custom resource rebar_pkg_resource that implements a deprecated api. It should be upgraded to rebar_resource_v2.
=ERROR REPORT==== 22-Jul-2025::00:45:59.004181 ===
beam/beam_load.c(594): Error loading function rebar_pkg_resource:init/2: op bs_add p x i u x:
  please re-compile this module with an Erlang/OTP 28 compiler or update your Erlang/OTP version


=ERROR REPORT==== 22-Jul-2025::00:45:59.049464 ===
beam/beam_load.c(594): Error loading function rebar_prv_deps:source_text/1: op bs_append p i u u u x u x:
  please re-compile this module with an Erlang/OTP 28 compiler or update your Erlang/OTP version


===> Failed creating providers. Run with DIAGNOSTIC=1 for stacktrace or consult rebar3.crashdump.

Expected behavior

Running globally installed rebar3 (from MacPorts) rebar3 bare compile --paths /Users/macbook/src/bonfire-app/_build/dev/lib/*/ebin in the mimers directory works.

% rebar3 bare compile --paths /Users/macbook/src/bonfire-app/_build/dev/lib/*/ebin
===> Analyzing applications...
===> Compiling mimerl
% echo $?
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions