processone / ejabberd

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

Unable to build with OTP 27.0.1 and rebar3 HEAD #4268

Closed licaon-kter closed 2 months ago

licaon-kter commented 2 months ago

Environment

$ export PATH=/usr/local/erlang27/bin:$PATH
$ ./autogen.sh
$ ./configure --enable-new-sql-schema --enable-pgsql --enable-sip --enable-stun --enable-user=ejabberd --enable-group=ejabberd --prefix=/usr/local --with-rebar=/home/pi/rebar3/rebar3 --with-erlang=/usr/local/erlang27
checking whether make sets $(MAKE)... yes
checking for gawk... no
checking for mawk... mawk
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for a sed that does not truncate output... /usr/bin/sed
checking for erl... /usr/local/erlang27/bin/erl
checking for erlc... /usr/local/erlang27/bin/erlc
checking for epmd... /usr/local/erlang27/bin/epmd
checking for rebar... no
checking for rebar3... no
checking for elixir... no
checking for iex... no
checking for mix... no
checking for erl... /usr/local/erlang27/bin/erl
checking for erlc... /usr/local/erlang27/bin/erlc
checking for Erlang/OTP root directory... /usr/local/erlang27/lib/erlang
checking for escript... /usr/local/erlang27/lib/erlang/bin/escript
checking for make... make
checking Erlang/OTP version... ok
allow this system group to start ejabberd: ejabberd
allow this system user to start ejabberd: ejabberd
build tool to use (change using --with-rebar): /home/pi/rebar3/rebar3
configure: creating ./config.status
config.status: creating Makefile
config.status: creating vars.config
configure: unlocking disabled rebar3 dependencies: epam,eredis,p1_mysql,sqlite3,
===> Analyzing applications...
===> Compiling configure_deps
=ERROR REPORT==== 17-Aug-2024::09:31:31.548454 ===
beam/beam_load.c(607): Error loading function pc_prv_compile:do/1: op allocate_zero u u:
  no specific operation found

===> Failed creating providers. Run with DIAGNOSTIC=1 for stacktrace or consult rebar3.crashdump.
configure: unlocking rebar3 dependencies for old Erlang/OTP: jiffy,
===> Analyzing applications...
===> Compiling configure_deps
=ERROR REPORT==== 17-Aug-2024::09:31:35.817088 ===
beam/beam_load.c(607): Error loading function pc_prv_compile:do/1: op allocate_zero u u:
  no specific operation found

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

Log with DIAGNOSTIC=1: https://gist.github.com/licaon-kter/eeb0d1df3e46984b39700a4ae4c5a537

prefiks commented 2 months ago

Looks like issue with pc rebar3 plugin, could you if deleting _build/default/plugins helps here?

licaon-kter commented 2 months ago

@prefiks ok, now it configures ok :tada:

/LE: clarified

licaon-kter commented 2 months ago

And builds fine :+1:

What did I do wrong?

prefiks commented 2 months ago

I thing it could be corrupted beam file on disc, as it looks like it it had bad vm opcode stored in that. Other possiblity could be leftover beam from uncompatible version of erlang, but iirc it usually tells that it uses incompatible version, and not something like that.

licaon-kter commented 2 months ago

Ok, I'll reclone and retry.

I only reset --hard and clean -fdx

licaon-kter commented 2 months ago

looks like user error from my part :facepalm:

sorry for the noise

a fresh cloned repo builds fine