mix_task_archive_deps release is incompatible with recent versions of Erlang

98 views
Skip to first unread message

noxdafox

unread,
Dec 11, 2022, 11:38:34 AM12/11/22
to rabbitmq-users
Greetings,

Trying to build a plugin using Erlang 25.0 and Elixir 13.4 (minimum required by RMQ) I get the following error:
```
Error: 16:25:46.053 [error] beam/beam_load.c(551): Error loading function 'Elixir.Mix.Tasks.Archive.Build.Deps':list/1: op put_tuple u x:
please re-compile this module with an Erlang/OTP 25 compiler
Error: 16:25:46.053 [error] Loading of /home/runner/.mix/archives/mix_task_archive_deps-0.5.0/mix_task_archive_deps-0.5.0/ebin/Elixir.Mix.Tasks.Archive.Build.Deps.beam failed: :badfile
** (UndefinedFunctionError) function Mix.Tasks.Archive.Build.Deps.build_archives/1 is undefined (module Mix.Tasks.Archive.Build.Deps is not available)
```
GitHub Actions example:

The issue seems to be due to incompatibility between the binary and Erlang 25. Re-compiling locally `mix_task_archive_deps` solves the problem.

Luke Bakken

unread,
Dec 11, 2022, 6:20:52 PM12/11/22
to rabbitmq-users
Thanks for the report. Will I see this issue if I try to build your plugin here? https://github.com/noxdafox/rabbitmq-message-deduplication

Luke Bakken

unread,
Dec 12, 2022, 11:02:53 AM12/12/22
to rabbitmq-users
Hi  Matteo,

Building your deduplication plugin worked fine using Erlang 25, so my guess is that it doesn't use mix_task_archive_deps

I'm working on the 1.0.0 release of mix_task_archive_deps, and will be sure to compile it using the oldest version of Erlang that RabbitMQ supports, 23.2

Thanks,
Luke

noxdafox

unread,
Dec 12, 2022, 3:53:23 PM12/12/22
to rabbitmq-users
Hi Luke,

sorry for not being so clear in my first email.

The `mix_task_archive_deps` is the one downloaded from GitHub releases at this location:

From a vanilla Docker container (debian-latest):
```
...

# cd rabbitmq-message-deduplication
...

# make dist
...
** (Mix) fetching from URIs require a checksum to be given

Could not run archive.install for:

    https://github.com/rabbitmq/mix_task_archive_deps/releases/download/0.5.0/mix_task_archive_deps-0.5.0.ez

Please download the file above to your current directory and run:

    mix archive.install ./mix_task_archive_deps-0.5.0.ez

You can download it either with your browser or via the command line.

On Unix-like operating systems (Linux, macOS):

    wget https://github.com/rabbitmq/mix_task_archive_deps/releases/download/0.5.0/mix_task_archive_deps-0.5.0.ez

# wget https://github.com/rabbitmq/mix_task_archive_deps/releases/download/0.5.0/mix_task_archive_deps-0.5.0.ez
...

# mix archive.install ./mix_task_archive_deps-0.5.0.ez
...

# make dist
...

20:48:56.695 [error] beam/beam_load.c(551): Error loading function 'Elixir.Mix.Tasks.Archive.Build.Deps':list/1: op put_tuple u x:                                                                                   

 please re-compile this module with an Erlang/OTP 25 compiler                                                                                                                                                       
                                                                                                                                                       
20:48:56.695 [error] Loading of /root/.mix/archives/mix_task_archive_deps-0.5.0/mix_task_archive_deps-0.5.0/ebin/Elixir.Mix.Tasks.Archive.Build.Deps.beam failed: :badfile                                         
```

You can follow up the setup process in here:
And see how the tests are skipped due to the same error in here:

The build succeeds but the tests are actually skipped. Downloading `mix_task_archive_deps` and compiling it with Erlang 25 fixes the issue. With Erlang 23, the issue used not to show up.

Kind regards,

M.

Luke Bakken

unread,
Dec 12, 2022, 5:58:00 PM12/12/22
to rabbitmq-users
Hi  Matteo,

Great, thank you. I can reproduce this. I will fix the released file as well as how rabbitmq-dist.mk downloads and uses it.

Luke Bakken

unread,
Dec 12, 2022, 7:53:51 PM12/12/22
to rabbitmq-users
Hi again Matteo,

Please see the new release of mix_task_archive_deps -


Please see the following PR which will update rabbitmq-dist.mk to use the new version -


I compiled the binary release with Erlang 23.2 and Elixir 1.13.0, and the release appears to work correctly using Erlang 25.1.2. See the attached transcript which shows the software versions I'm using and commands I ran.
rabbitmq-message-deduplication-build.txt

Nagaraju Dandrakula

unread,
Dec 13, 2022, 12:15:31 AM12/13/22
to rabbitm...@googlegroups.com
Hi Team,

How to install rabbitmq 3.10 version in ubuntu 18.04

can anyone help me on this.

Thanks,
Nagaraju.



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/5ca36899-49fc-4e34-b794-5afb83ffbfc5n%40googlegroups.com.

Luke Bakken

unread,
Dec 13, 2022, 10:56:23 AM12/13/22
to rabbitmq-users
Please start a new thread rather than replying to an existing one.

Reply all
Reply to author
Forward
0 new messages