Date: Wed, 3 Feb 2021 12:57:43 -0500 From: Kurt Hackenberg <kh@panix.com> To: freebsd-questions@freebsd.org Subject: Re: Pleroma, erlang problem. Message-ID: <354af4d4-4578-2688-d5b7-f3602465f3ef@panix.com> In-Reply-To: <YBqcYUuePsJr19n5@mithril.foucry.net> References: <YBqcYUuePsJr19n5@mithril.foucry.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2/3/21 7:51 AM, Jacques Foucry wrote: > Since this upgrade, Pleroma does not start and it seems it's an erlang > problem. > > When I try run launch is by hand, it fail: > > MIX_ENV=prod mix phx.server > ld-elf.so.1: /usr/local/lib/erlang/erts-10.3.5.15/bin/beam.smp: Undefined symbol "pthread_setname_np@FBSD_1.6" > > I did not know anythіng about erlang. Could it be a bug on it? > > I use a poudriere. I recompile erlang, look at threard options, all are > checked. Well, apparently it links to a shared library, which means some symbols have to be resolved when erlang is run. Apparently erlang (I guess an executable "beam.smp") tries to call a function pthread_name_np() that's not in any shared library included in the original link. Posix thread functions are in a separate library. Is beam.smp linked with -lpthread? It probably is. See "man pthread". Functions pthread_*_np are non-portable FreeBSD extensions to the Posix thread standard. They could come and go across releases, virtual machines, and so on -- though pthread_setname_np() has a man page on my 13-CURRENT system. The rest of that undefined symbol -- the part "@FBSD_1.6" -- is a mystery to me. It looks like a version number of an ancient FreeBSD, but I've never heard of such version numbers being included in symbols. I don't know what that's about. That function sets the name of a Posix thread. Probably erlang would run fine without setting those names. If the trouble is just that function is missing, and the standard Posix thread functions are present and linked, then, as a crude, short-term workaround, if you're willing to modify the source code slightly, you could remove calls to that function.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?354af4d4-4578-2688-d5b7-f3602465f3ef>