Compilation error in file lib/prometheus/registry.ex: UndefinedFunctionError
Environment
- Installation type: from source
- Pleroma version: 2.4.4 - 2022-08-19 (according to CHANGELOG.md)
- Elixir version: Elixir 1.14.1 (compiled with Erlang/OTP 25)
- Operating system: Linux Fedora 37
- PostgreSQL version: psql (PostgreSQL) 14.3
Bug description
Following the manual at https://docs-develop.pleroma.social/backend/installation/debian_based_en/.
When running:
sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen
I get the following compilation error::
warning: `config/prod.secret.exs` not found. You may want to create one by running `mix pleroma.instance gen`
==> prometheus_ex
Compiling 19 files (.ex)
== Compilation error in file lib/prometheus/registry.ex ==
** (UndefinedFunctionError) function Kernel.Utils.defdelegate/2 is undefined or private. Did you mean:
* defdelegate_all/3
* defdelegate_each/2
(elixir 1.14.1) Kernel.Utils.defdelegate({:exists, [line: 21], [{:name, [line: 21], nil}]}, [])
lib/prometheus/registry.ex:21: (module)
could not compile dependency :prometheus_ex, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile prometheus_ex", update it with "mix deps.update prometheus_ex" or clean it with "mix deps.clean prometheus_ex"
So the error gets thrown in line 21 of ./deps/prometheus_ex/lib/prometheus/registry.ex
. Unfortunately, I don't have any knowledge in Elexir, otherwise I would try to bug-track it.
Edited by Chris Makenzie