Subject: Re: Help Resolving Compiler Errors With enable-dtrace Flag

From: Barry Walker <[email-masked]>
Date: Sun, 20 Oct 2024 15:02:06 -0400

Unfortunately the people remaining are just as lost as me. No one has
attempted to build with dtrace so I'm in uncharted territory.

A diff of the object file doesn't give any useful information, the custom
version has a lot of differences since there have been a number of changes
from stock. postgresql_transaction__commit_semaphore does exist in the
symbol table of both .o files though when compared with objdump.

On Sun, Oct 20, 2024 at 1:50 PM Adrian Klaver <[email-masked]>
wrote:

> On 10/20/24 09:30, Barry Walker wrote:
> > Hey folks,
>
> > I have compiled vanilla pg16.4 with the same flags and the probes got
> > created and linked as expected with no issues so I'm assuming there is
> > some difference in the custom version that is causing the errors but I'm
> > having a hard time tracking it down. I'm wondering if anyone here has
> > any experience with this error or has any hints as to why the linker
> > can't find these definitions or even just where the actual definitions
> > for these probes should live so I can try to work backwards and see if
> > there is any differences in the custom version that is messing with
> > the linker.
>
> Talking to the folks that created the custom version is not possible?
>
> If you do a diff on:
>
> access/transam/xact.o
>
> between the stock and custom version does it shed any light?
>
> >
> > Thanks!
>
> --
> Adrian Klaver
> [email-masked]
>
>

---

From: Adrian Klaver <[email-masked]>
Date: Sun, 20 Oct 2024 12:47:38 -0700

> attempted to build with dtrace so I'm in uncharted territory.

Was the customization done under version control?

If so then as last resort use bisect or equivalent to find the breaking 
change?

> 
> A diff of the object file doesn't give any useful information, the 
> custom version has a lot of differences since there have been a number 
> of changes from stock. postgresql_transaction__commit_semaphore does 
> exist in the symbol table of both .o files though when compared with 
> objdump.

My mistake, was not paying attention. I meant to point the diff at:

~/src/backend/access/transam/xact.c

---

From: Barry Walker <[email-masked]>
Date: Sun, 20 Oct 2024 17:08:53 -0400

> Was the customization done under version control?
Yes it was. My thinking though is that I am getting this error with every
probe, not just the ones in xact.c so I suspect there is something more
than just a code change to the file. I compared the common makefiles and
don't see any changes that would cause the linker error. In any case I'll
try to go back through some of the commit history to see if anything stands
out. Thanks for the input!

---

From: Tom Lane <[email-masked]>
Date: Sun, 20 Oct 2024 17:52:53 -0400

Barry Walker <[email-masked]> writes:
> probe, not just the ones in xact.c 

Now you tell us?

If that's the case, I wonder whether probes.o is getting built
correctly and included in the link.  The relevant bits are in
src/backend/Makefile ... they don't look that easy to mess up,
but maybe.

			regards, tom lane

---

From: Barry Walker <[email-masked]>
Date: Sun, 20 Oct 2024 19:21:27 -0400

> src/backend/Makefile ... they don't look that easy to mess up,

I thought I mentioned it in my original message but it wasn't super clear.

I just checked and you're right, the probes.o is not getting built for some
reason. I don't even see it attempting to in the build output and when I
add a debug print statement to the utils/probes.o rule I don't see that in
the output. Either way that most certainly explains why I'm getting that
error and gives me something to dig in to more. Thanks for the help!