On 2024-Jan-23, Alvaro Herrera wrote:
> ... oh, actually FreeBSD failed with this strange problem while linking:
> [11:39:43.550] ld: error: undefined symbol: __dtraceenabled_postgresql___lwlock__wait__start
> [11:39:43.551] >>> referenced by lwlock.c:1277 (../src/backend/storage/lmgr/lwlock.c:1277)
> [11:39:43.551] >>> lwlock.a.p/lwlock.c.o:(LWLockAcquire) in archive src/backend/storage/lmgr/lwlock.a
> [11:39:43.551] >>> referenced by lwlock.c:1442 (../src/backend/storage/lmgr/lwlock.c:1442)
> [11:39:43.551] >>> lwlock.a.p/lwlock.c.o:(LWLockAcquireOrWait) in archive
src/backend/storage/lmgr/lwlock.a
> [11:39:43.551] >>> referenced by lwlock.c:1660 (../src/backend/storage/lmgr/lwlock.c:1660)
> [11:39:43.551] >>> lwlock.a.p/lwlock.c.o:(LWLockWaitForVar) in archive
src/backend/storage/lmgr/lwlock.a
> [11:39:43.551]
So what's going on here is that lwlock.c is being compiled to a separate
archive (lwlock.a), and when linking it wants to see the dtrace symbols
(__dtraceenabled_postgresql___lwlock__wait__start et al) but it looks
like they're not defined.
I installed systemtap on my machine and reconfigured meson with it so
that it uses dtrace, and it compiles successfully. One interesting
point: on my ninja log, I see dtrace being invoked, which I do not in
the FreeBSD log.
I continue to not understand what is going on.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"El sabio habla porque tiene algo que decir;
el tonto, porque tiene que decir algo" (Platon).