Re: Implicit make rules break test examples

From: Donald Dong <xdong(at)csumb(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Implicit make rules break test examples
Date: 2019-01-01 18:24:55
Message-ID: CAKABAqsWzee4Q6qnkgO8UnWrDroRJnZL3f2bxxgQ+B=rpLnoZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for the explanation! That makes sense. It is strange that it does
not work for me.

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

I'm using Ubuntu 18.04.1 LTS.

gcc version:
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

ld version:
GNU ld (GNU Binutils for Ubuntu) 2.30

Regards,
Donald Dong

On Tue, Jan 1, 2019 at 9:54 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Donald Dong <xdong(at)csumb(dot)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
>

--
Donald Dong

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-01-01 19:08:30 Re: FETCH FIRST clause PERCENT option
Previous Message Andres Freund 2019-01-01 18:03:18 Re: shared-memory based stats collector