Closed pascoda closed 1 year ago
Do you have some more informations for me? :) Error in compiling, dependencies or something else?
pleroma.log
Hi @taddydevil
At the step of generating the configuration file with mix pleroma.instance gen
it fails with a compilation error (full log attached):
== Compilation error in file lib/prometheus/collector.ex == ** (UndefinedFunctionError) function Kernel.Utils.defdelegate/2 is undefined or private. Did you mean:
- defdelegate_all/3
- defdelegate_each/2
(elixir 1.14.0) Kernel.Utils.defdelegate({:collect_mf, [line: 87], [{:\, [line: 87], [{:registry, [line: 87], nil}, :default]}, {:collector, [line: 87], nil}, {:callback, [line: 87], nil}]}, []) lib/prometheus/collector.ex:87: (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"
I already tried
mix deps.compile prometheus_ex
mix deps.update prometheus_ex
mix deps.clean prometheus_ex
mix deps.get
but always results in same compilation error unfortunately. Would be glad if you could help on this one :) If you need any further details, let me know.
Oo.
Please try Erlang 22 @custompyramidfellow . On my working instance with Pleroma 2.4.0 I can compile prometheus_ex.
On my other U7 I can't compile idna, maybe a memory issue. But what I saw in your logs is you have no issues with idna, so this should be not a problem for you.
🎉 Yay, Erlang 22 surprisingly works :) A bunch of deprecated warnings showed up during compilation though, but it does work with the latest Pleroma release (v2.4.4).
So I guess we should adjust the guide to use uberspace tools version use erlang 22
Although I'm not sure about future releases, will it be safe to use Erlang version 22?
Nice!
But how? I am pretty sure that Pleroma once worked with Erlang version 24 - Uberspace itself has adapted the guide to 24, they do not do that without testing. However, there must be a reason why I continue to use 22 on my production instance. I guess 22 is safe until the Uberspace team removes the libraries. Similar to PHP7 - and every damn Pleroma update must be checked for compatibility for that time.
This issue should remain open until 24 is running again.
Never touch a running version :p
@pascoda I can reproduce that pleroma 2.4.4 / the compiling of prometheus_ex works only with Erlang 22. The guide should be adapted to Erlang 22 and everything is fine - can you do that?
Background:
There is a active issue in prometheus_ex repo already with a fix: https://github.com/deadtrickster/prometheus.ex/issues/48
Elixir 1.14 changed Kernel.Utils.defdelegate/2 into Kernel.Utils.defdelegate_each/2
There are two ways to "fix" the compiling.
prometheus_ex
, exlude the pleroma source and add the original source with fixed branch {:prometheus_ex, git: "https://github.com/lanodan/prometheus.ex", branch: "fix/elixir-1.14", override: true},
Tested and works without any issues. But local edited configs from a replicated repo are not cool imho. This will blew up the lab guide.
...
{:prometheus, "~> 4.6"},
# {:prometheus_ex,
# git: "https://git.pleroma.social/pleroma/elixir-libraries/prometheus.ex.git",
# ref: "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5",
# override: true},
{:prometheus_ex, git: "https://github.com/lanodan/prometheus.ex", branch: "fix/elixir-1.14", override: true},
{:prometheus_plugs, "~> 1.1"},
...
I can confirm that both solutions @taddydevil mentions are working, but this is an issue that should be fixed upstream, soon.
But don't try to switch to Erlang 22 in production as it breaks your installation. I had to learn that the hard way. :unamused:
Pleroma 2.4.5 is out. Is there a chance to make an upgrade to this new version or does is it fail as well? I wouldn't use my installation to test this.
Yep, prometheus_ex source changed to the solution I mentioned before. Line 167 at https://git.pleroma.social/pleroma/pleroma/-/blob/develop/mix.exs
Compiled it "successfully"... but only with mix deps.compile prometheus_ex
.
But there is a new error. I`ll check this out.
nevermind. Everything working, error caused by a local edit myself. If you have a error at mix deps.get
simply try run mix local.hex
.
@hikerus I think you can upgrade to 2.4.5. If you have make changes in mix.exs, remove this file with mix.lock before pulling the stable channel.
I can confirm that updating to 2.4.5 works without errors using Erlang version 22. Is it safe to just switch to v24 now?
Erlang 24 is totally safe now. Erlang 25 will be experimental (its working with my instance, so just now "it works" too)
@pascoda Btw the guide is not broken anymore with the latest stable release. Can you undo the hint in the guide and close this issue?
My upgrade to 2.4.5 failes - with Erlang 24 or Erlang 25
Also a fresh installation of Pleroma fails: mix: Compilation failed due to warnings while using the --warnings-as-errors option
So my instance is dead now.
Whats your compilation command? At which application does it fail? Can you show us some more of the log (before, after the fail)?
I had some merging conflicts in Git - after solving them it compiles the develop version - but there are tons of warning messages. After that the instance is up again.
Had the warning messages too but without any known issues now. If your federation won't work, remove the directorys _build
& deps
and run again mix deps.get
and MIX_ENV=prod mix ecto.migrate
. Can be related with Erlang 25, or with the different versions you compiled before (your tries with 24 / 25).
Nothing to worry about.
Btw, update Pleroma 2.5.0 working perfectly fine. Follow the update instructions in the lab and be happy with the latest major release.
Copy that. I just switched to Erlang 25 and upgraded Pleroma to v2.5.0.
Although I noticed three error messages, they don't seem to impair Pleroma from running.
==> pleroma
Compiling 592 files (.ex)
[error] Loading of /home/$USER/pleroma/_build/prod/lib/gen_smtp/ebin/mimemail.beam failed: :badfile
[error] The following dependencies are required to use Swoosh.Adapters.Sendmail:
- mimemail from :gen_smtp
[error] beam/beam_load.c(86): Error loading module mimemail:
lambda already defined for label 491. To fix this, please recompile this module with an OTP 25 compiler.
we were informed, and could reproduce, that setting up pleroma currently does not work (neither with new, nor with older versions).
@taddydevil - can you help?