Re: Implicit make rules break test examples - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Implicit make rules break test examples
Date
Msg-id 5564.1546365291@sss.pgh.pa.us
Whole thread Raw
In response to Implicit make rules break test examples  (Donald Dong <xdong@csumb.edu>)
Responses Re: Implicit make rules break test examples  (Donald Dong <xdong@csumb.edu>)
List pgsql-hackers
Donald Dong <xdong@csumb.edu> writes:
> In src/test/example, the implicit make rules produce errors:

Hm.  "make" in src/test/examples works fine for me.

The only way I can account for the results you're showing is if your
linker is preferring libpq.a to libpq.so, so that reading the library
before the *.o files causes none of it to get pulled in.  But that
isn't the default behavior on any modern platform AFAIK, and certainly
isn't considered good practice these days.  Moreover, if that's what's
happening, I don't see how you would have managed to build PG at all,
because there are a lot of other places where our Makefiles write
$(LDFLAGS) before the *.o files they're trying to link.  Maybe we
shouldn't have done it like that, but it's been working for everybody
else.

What platform are you on exactly, and what toolchain (gcc and ld
versions) are you using?

            regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: explain plans with information about (modified) gucs
Next
From: Andres Freund
Date:
Subject: Re: shared-memory based stats collector