processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.01k stars 1.5k forks source link

Elixir 1.15 breaks "make relive": FORMATTER ERROR: bad return value #4087

Closed badlop closed 5 months ago

badlop commented 10 months ago

make relive works perfectly with Elixir versions like 1.14.5 or older.

However, when using Elixir 1.15.0 or higher, make relive crashes:

$ make relive
escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run
Preparing relive dir _build/relive...
Preparing relive dir _build/relive/conf...
Preparing relive dir _build/relive/database...
Preparing relive dir _build/relive/logs...
FORMATTER ERROR: bad return value
FORMATTER ERROR: bad return value
FORMATTER ERROR: bad return value
...

Looking at the Elixir v1.15 release announcement , it mentions: Integration with Erlang/OTP logger. Apparently this only affects make relive; make dev and make rel work perfectly.

Compilation process:

``` $ iex --version IEx 1.15.4 (compiled with Erlang/OTP 26) $ ./autogen.sh $ ./configure \ --with-rebar=mix \ --enable-all checking whether make sets $(MAKE)... yes checking for a BSD-compatible install... /usr/bin/install -c checking for a sed that does not truncate output... /usr/bin/sed checking for erl... /home/badlop/.asdf/shims/erl checking for erlc... /home/badlop/.asdf/shims/erlc checking for epmd... /home/badlop/.asdf/shims/epmd checking for erl... (cached) /home/badlop/.asdf/shims/erl checking for erlc... (cached) /home/badlop/.asdf/shims/erlc checking for Erlang/OTP root directory... /home/badlop/.asdf/installs/erlang/26.0.1 checking for escript... /home/badlop/.asdf/installs/erlang/26.0.1/bin/escript checking for make... make checking Erlang/OTP version... ok checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking for SQLite3 library >= 3.6.19... yes configure: creating ./config.status config.status: creating Makefile config.status: creating vars.config $ make ... ==> ejabberd Compiling 1 file (.yrl) Compiling 281 files (.erl) Compiling 17 files (.ex) Generated ejabberd app mix compile $ make relive escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run Preparing relive dir _build/relive... Preparing relive dir _build/relive/conf... Preparing relive dir _build/relive/database... Preparing relive dir _build/relive/logs... FORMATTER ERROR: bad return value FORMATTER ERROR: bad return value FORMATTER ERROR: bad return value ... FORMATTER ERROR: bad return value Erlang/OTP 26 [erts-14.0.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] FORMATTER ERROR: bad return value [os_mon] memory supervisor port (memsup): Erlang has closed make: *** [Makefile:286: relive] Error 1 ```
badlop commented 5 months ago

A fix for this has been added in commit 1bf80e861da8d6771cd296e672168ccd14899ed6