Re: Annoying build warnings from latest Apple toolchain

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Annoying build warnings from latest Apple toolchain
Date: 2023-09-28 22:22:48
Message-ID: 20230928222248.jw6s7yktpfsfczha@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-09-28 16:46:08 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2023-09-27 16:52:44 -0400, Tom Lane wrote:
> >> I think it doesn't, as long as all the relevant build targets
> >> write their dependencies with "frontend_code" before "libpq".
>
> > Hm, that's not great. I don't think that should be required. I'll try to take
> > a look at why that's needed.
>
> Well, it's only important on platforms where we can't restrict
> libpq.so from exporting all symbols. I don't know how close we are
> to deciding that such cases are no longer interesting to worry about.
> Makefile.shlib seems to know how to do it everywhere except Windows,
> and I imagine we know how to do it over in the MSVC scripts.

Hm, then I'd argue that we don't need to care about it anymore. The meson
build does the necessary magic on windows, as do the current msvc scripts.

I think right now it doesn't work as-is on sonoma, because apple decided to
change the option syntax, which is what causes the -e warning below, so the
relevant option is just ignored.

> There's still one duplicate warning
> from the backend link:
>
> ld: warning: ignoring duplicate libraries: '-lpam'
>
> I'm a bit baffled why that's showing up; there's no obvious
> double reference to pam.

I think it's because multiple libraries/binaries depend on it. Meson knows how
to deduplicate libraries found via pkg-config (presumably because that has
enough information for a topological sort), but apparently not when they're
found as "raw" libraries. Until now that was also just pretty harmless, so I
understand not doing anything about it.

I see a way to avoid the warnings, but perhaps it's better to ask the meson
folks to put in a generic way of dealing with this.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-09-28 22:58:49 Re: Annoying build warnings from latest Apple toolchain
Previous Message Tom Lane 2023-09-28 21:59:45 Re: Does anyone ever use OPTIMIZER_DEBUG?