Re: Annoying build warnings from latest Apple toolchain

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Annoying build warnings from latest Apple toolchain
Дата
Msg-id 20231201040515.p5bshhhtfru7d3da@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Annoying build warnings from latest Apple toolchain  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Annoying build warnings from latest Apple toolchain  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

On 2023-11-30 21:24:21 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2023-11-28 10:48:04 -0500, Robert Haas wrote:
> >> What a stupid, annoying decision on Apple's part. It seems like
> >> -Wl,-undefined,error is the default behavior, so they could have just
> >> ignored that flag if present, but instead they complain about being
> >> asked to do what they were going to do anyway.
> 
> > Especially because I think it didn't actually use to be the default when
> > building a dylib.
> 
> Indeed.  Whoever's in charge of their linker now seems to be quite
> clueless, or at least aggressively anti-backwards-compatibility.

It looks like it even affects a bunch of Apple's own products [1]...


> > While not helpful for this, I just noticed that there is
> > -no_warn_duplicate_libraries, which would at least get rid of the
> >   ld: warning: ignoring duplicate libraries: '-lxml2'
> > style warnings.
> 
> Oh!  If that's been there long enough to rely on, that does seem
> very helpful.

I think it's new too. But we can just check if the flag is supported.


This is really ridiculous. For at least part of venturas life they warned
about -Wl,-undefined,dynamic_lookup, which lead to 9a95a510adf3. They don't
seem to do that anymore, but now you can't specify -Wl,-undefined,error
anymore without a warning.


Attached is a prototype testing this via CI on both Sonoma and Ventura.


It's certainly possible to encounter the duplicate library issue with
autoconf, but probably not that common. So I'm not sure if we should inject
-Wl,-no_warn_duplicate_libraries as well?

Greetings,

Andres Freund


[1] https://developer.apple.com/forums/thread/733317

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [Proposal] global sequence implemented by snowflake ID
Следующее
От: Andres Freund
Дата:
Сообщение: Re: meson: Stop using deprecated way getting path of files