Re: Apple's ranlib warns about protocol_openssl.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Apple's ranlib warns about protocol_openssl.c
Date
Msg-id 917495.1639668356@sss.pgh.pa.us
Whole thread Raw
In response to Apple's ranlib warns about protocol_openssl.c  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Apple's ranlib warns about protocol_openssl.c
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump: Refactor getIndexes()
Next
From: Joshua Brindle
Date:
Subject: Re: Granting SET and ALTER SYSTE privileges for GUCs