Re: Apple's ranlib warns about protocol_openssl.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Apple's ranlib warns about protocol_openssl.c
Date: 2021-12-16 15:25:56
Message-ID: 917495.1639668356@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> Apple's ranlib doesn't like empty translation units[1], but
> protocol_openssl.c doesn't define any symbols (unless you have an
> ancient EOL'd openssl), so longfin and CI say:

> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libpgcommon.a(protocol_openssl.o) has no symbols

> I guess we still can't switch to (Apple) libtool. Maybe configure
> should be doing a test and adding it to LIBOBJS or a similar variable
> only if necessary, or something like that?

Hmm ... right now, with only one test to make, the configure change
wouldn't be that hard; but that might change in future, plus I'm
unsure how to do it in MSVC.

A lazy man's answer could be to ensure the translation unit isn't
empty, say by adding

+#else
+
+int dummy_protocol_openssl_variable = 0;
+
#endif /* !SSL_CTX_set_min_proto_version */

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Brindle 2021-12-16 15:43:15 Re: Granting SET and ALTER SYSTE privileges for GUCs
Previous Message Tom Lane 2021-12-16 15:15:22 Re: pg_dump: Refactor getIndexes()