pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Broken handling of lwlocknames.h
Date: Fri, 01 Jul 2016 14:01:42 -0400
Message-ID: <29822.1467396102@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqSi9L6DP_ubOnDcqkKHiVvjv8oUEC32J-KY-Ta8uHKMSg@mail.gmail.com>
References: <31398.1467036827@sss.pgh.pa.us>
<20160627182256.GB8514@msg.df7cb.de>
<CAB7nPqSi9L6DP_ubOnDcqkKHiVvjv8oUEC32J-KY-Ta8uHKMSg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Michael Paquier <michael.paquier@gmail.com> writes:
> Yes that would be indeed cleaner this way. I have poked a bit at that
> and finished with the attached that defines some rules to generate all
> the files needed. But actually it does not seem to be enough, for
> example on OSX this would fail to compile because it cannot find the
> postgres binary in src/backend/postgres. Does somebody have an idea
> what this is about? It seems that we have two problems here.
Yeah, on OS X, building regress.so (or any other loadable extension)
will fail unless you built the backend first:
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -g -O2 -bundle -multiply_defined suppress -Wl,-undefined,dynamic_lookup -o regress.so regress.o -L../../../src/port -L../../../src/common -Wl,-dead_strip_dylibs -bundle_loader ../../../src/backend/postgres
ld: file not found: ../../../src/backend/postgres
The reason is you need the "-bundle_loader postgres" option, because
OS X's linker is pickier about unresolved symbols than Linux's.
However, that is not a 9.6 regression: that's never worked on OS X, or at
least not since we started using -bundle_loader.
I do not think that we want the makefiles to enforce this build
dependency, as that would completely destroy any speed advantage of trying
to build just the particular .so. Maybe we could enforce the dependency
just on OS X, but since we haven't gotten complaints from people trying
to build like this on OS X, I doubt it's worth the trouble.
So my inclination is to fix the include-file issue and call it good.
In any case, if someone did want to deal with making the -bundle_loader
calls safer, it would be material for a separate patch IMO.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (11+ messages) latest in thread
Message-ID: <29822.1467396102@sss.pgh.pa.us> Permalink: ../29822.1467396102@sss.pgh.pa.us/ Also on: postgresql.org/message-id/29822.1467396102@sss.pgh.pa.us ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-hackers@postgresql.org Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, myon@debian.org, robertmhaas@gmail.com Subject: Re: Broken handling of lwlocknames.h In-Reply-To: <29822.1467396102@sss.pgh.pa.us> References: <31398.1467036827@sss.pgh.pa.us> <20160627182256.GB8514@msg.df7cb.de> <CAB7nPqSi9L6DP_ubOnDcqkKHiVvjv8oUEC32J-KY-Ta8uHKMSg@mail.gmail.com> <29822.1467396102@sss.pgh.pa.us> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox