pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Broken handling of lwlocknames.h
11+ messages / 5 participants
[nested] [flat]

* Broken handling of lwlocknames.h
@ 2016-06-27 14:13 Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2016-06-27 14:13 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers

Bjorn Munch reported off-list that this sequence:

unpack tarball, cd into it
./configure ...
cd src/test/regress
make

no longer works in 9.6beta2, where it did work in previous releases.
I have confirmed both statements.  The failure looks like

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O1 -fpic -I../../../src/include -D_GNU_SOURCE   -c -o regress.o regress.c
In file included from ../../../src/include/storage/lock.h:23,
                 from ../../../src/include/access/heapam.h:22,
                 from ../../../src/include/nodes/execnodes.h:18,
                 from ../../../src/include/commands/trigger.h:17,
                 from regress.c:29:
../../../src/include/storage/lwlock.h:129:33: error: storage/lwlocknames.h: No such file or directory
make: *** [regress.o] Error 1

So this is some sort of fallout from commit aa65de042f582896, which
invented that as a generated file.

Perhaps the solution is to extend src/test/regress/GNUmakefile to know
about this file explicitly (as it already does know about
src/port/pg_config_paths.h).  But that seems rather brute-force; in
particular it seems like that does nothing to keep us from getting burnt
again the same way in future.  I wonder if we should modify
src/backend/Makefile so that it exposes a phony target for "update all the
generated include files", and then have src/test/regress/GNUmakefile call
that.  Or maybe there are other ways.

			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



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-06-27 18:22 ` Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Christoph Berg @ 2016-06-27 18:22 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Haas <robertmhaas@gmail.com>; pgsql-hackers

Re: Tom Lane 2016-06-27 <31398.1467036827@sss.pgh.pa.us>
> Bjorn Munch reported off-list that this sequence:
> 
> unpack tarball, cd into it
> ./configure ...
> cd src/test/regress
> make
> 
> no longer works in 9.6beta2, where it did work in previous releases.
> I have confirmed both statements.  The failure looks like
> 
> gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O1 -fpic -I../../../src/include -D_GNU_SOURCE   -c -o regress.o regress.c
> In file included from ../../../src/include/storage/lock.h:23,
>                  from ../../../src/include/access/heapam.h:22,
>                  from ../../../src/include/nodes/execnodes.h:18,
>                  from ../../../src/include/commands/trigger.h:17,
>                  from regress.c:29:
> ../../../src/include/storage/lwlock.h:129:33: error: storage/lwlocknames.h: No such file or directory
> make: *** [regress.o] Error 1
> 
> So this is some sort of fallout from commit aa65de042f582896, which
> invented that as a generated file.
> 
> Perhaps the solution is to extend src/test/regress/GNUmakefile to know
> about this file explicitly (as it already does know about
> src/port/pg_config_paths.h).  But that seems rather brute-force; in
> particular it seems like that does nothing to keep us from getting burnt
> again the same way in future.  I wonder if we should modify
> src/backend/Makefile so that it exposes a phony target for "update all the
> generated include files", and then have src/test/regress/GNUmakefile call
> that.  Or maybe there are other ways.

That would also fix the "build plpython3 only" problem I was aiming at
in https://www.postgresql.org/message-id/20150916200959.GB32090@msg.df7cb.de

So another +1 from a packagers perspective.

Christoph

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
@ 2016-06-28 03:26   ` Michael Paquier <michael.paquier@gmail.com>
  2016-07-01 04:09     ` Re: Broken handling of lwlocknames.h Noah Misch <noah@leadboat.com>
  2016-07-01 18:01     ` Re: Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-07-01 19:13     ` Re: Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 3 replies; 11+ messages in thread

From: Michael Paquier @ 2016-06-28 03:26 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; Tom Lane <tgl@sss.pgh.pa.us>; Robert Haas <robertmhaas@gmail.com>; pgsql-hackers

On Tue, Jun 28, 2016 at 3:22 AM, Christoph Berg <myon@debian.org> wrote:
> Re: Tom Lane 2016-06-27 <31398.1467036827@sss.pgh.pa.us>
>> Bjorn Munch reported off-list that this sequence:
>>
>> unpack tarball, cd into it
>> ./configure ...
>> cd src/test/regress
>> make
>>
>> no longer works in 9.6beta2, where it did work in previous releases.
>> I have confirmed both statements.  The failure looks like
>>
>> gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O1 -fpic -I../../../src/include -D_GNU_SOURCE   -c -o regress.o regress.c
>> In file included from ../../../src/include/storage/lock.h:23,
>>                  from ../../../src/include/access/heapam.h:22,
>>                  from ../../../src/include/nodes/execnodes.h:18,
>>                  from ../../../src/include/commands/trigger.h:17,
>>                  from regress.c:29:
>> ../../../src/include/storage/lwlock.h:129:33: error: storage/lwlocknames.h: No such file or directory
>> make: *** [regress.o] Error 1
>>
>> So this is some sort of fallout from commit aa65de042f582896, which
>> invented that as a generated file.
>>
>> Perhaps the solution is to extend src/test/regress/GNUmakefile to know
>> about this file explicitly (as it already does know about
>> src/port/pg_config_paths.h).  But that seems rather brute-force; in
>> particular it seems like that does nothing to keep us from getting burnt
>> again the same way in future.  I wonder if we should modify
>> src/backend/Makefile so that it exposes a phony target for "update all the
>> generated include files", and then have src/test/regress/GNUmakefile call
>> that.  Or maybe there are other ways.
>
> That would also fix the "build plpython3 only" problem I was aiming at
> in https://www.postgresql.org/message-id/20150916200959.GB32090@msg.df7cb.de
>
> So another +1 from a packagers perspective.

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.
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

makefile-generate.patch (invalid/octet-stream, 4.6K) download diff --git a/src/backend/Makefile b/src/backend/Makefile index ec2dc7b..04385ec 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -109,19 +109,16 @@ endif endif # aix -# Update the commonly used headers before building the subdirectories -$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h +submake-genfiles: parser/gram.h storage/lmgr/lwlocknames.h utils/fmgroids.h utils/errcodes.h utils/probes.h catalog/schemapg.h -# run this unconditionally to avoid needing to know its dependencies here: -submake-schemapg: - $(MAKE) -C catalog schemapg.h +submake-symlink: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h -# src/port needs a convenient way to force errcodes.h to get built -submake-errcodes: $(top_builddir)/src/include/utils/errcodes.h +submake-generate: submake-genfiles submake-symlink -.PHONY: submake-schemapg submake-errcodes +# Update the commonly used headers before building the subdirectories +$(SUBDIRS:%=%-recursive): submake-generate -catalog/schemapg.h: | submake-schemapg +.PHONY: submake-generate $(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport @@ -151,6 +148,9 @@ utils/errcodes.h: utils/generate-errcodes.pl utils/errcodes.txt utils/probes.h: utils/probes.d $(MAKE) -C utils probes.h +catalog/schemapg.h: + $(MAKE) -C catalog schemapg.h + # Make symlinks for these headers in the include directory. That way # we can cut down on the -I options. Also, a symlink is automatically # up to date when we update the base file. @@ -188,8 +188,9 @@ $(top_builddir)/src/include/utils/fmgroids.h: utils/fmgroids.h $(LN_S) "$$prereqdir/$(notdir $<)" . $(top_builddir)/src/include/utils/probes.h: utils/probes.h - cd '$(dir $@)' && rm -f $(notdir $@) && \ - $(LN_S) "../../../$(subdir)/utils/probes.h" . + prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \ + cd '$(dir $@)' && rm -f $(notdir $@) && \ + $(LN_S) "$$prereqdir/$(notdir $<)" . utils/probes.o: utils/probes.d $(SUBDIROBJS) diff --git a/src/common/Makefile b/src/common/Makefile index 72b7369..c37aa90 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -77,12 +77,12 @@ libpgcommon_srv.a: $(OBJS_SRV) %_srv.o: %.c %.o $(CC) $(CFLAGS) $(subst -DFRONTEND ,, $(CPPFLAGS)) -c $< -o $@ -$(OBJS_SRV): | submake-errcodes +$(OBJS_SRV): | submake-generate -.PHONY: submake-errcodes +.PHONY: submake-generate -submake-errcodes: - $(MAKE) -C ../backend submake-errcodes +submake-generate: + $(MAKE) -C ../backend submake-generate # Dependencies of keywords.o need to be managed explicitly to make sure # that you don't get broken parsing code, even in a non-enable-depend build. diff --git a/src/port/Makefile b/src/port/Makefile index bc9b63a..5dbb4c3 100644 --- a/src/port/Makefile +++ b/src/port/Makefile @@ -79,12 +79,12 @@ libpgport_srv.a: $(OBJS_SRV) %_srv.o: %.c %.o $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ -$(OBJS_SRV): | submake-errcodes +$(OBJS_SRV): | submake-generate -.PHONY: submake-errcodes +submake-generate: + $(MAKE) -C ../backend submake-generate -submake-errcodes: - $(MAKE) -C ../backend submake-errcodes +.PHONY: submake-generate # Dependency is to ensure that path changes propagate diff --git a/src/test/modules/Makefile b/src/test/modules/Makefile index 8926627..8f289ba 100644 --- a/src/test/modules/Makefile +++ b/src/test/modules/Makefile @@ -17,9 +17,11 @@ SUBDIRS = \ test_shm_mq \ worker_spi -all: submake-errcodes +all: submake-generate -submake-errcodes: - $(MAKE) -C $(top_builddir)/src/backend submake-errcodes +.PHONY: submake-generate + +submake-generate: + $(MAKE) -C $(top_builddir)/src/backend submake-generate $(recurse) diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile index f5ed474..751d755 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -36,7 +36,7 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \ all: pg_regress$(X) -pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport +pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport submake-generate $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ # dependencies ensure that path changes propagate
^ permalink raw reply [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
@ 2016-07-01 04:09     ` Noah Misch <noah@leadboat.com>
  2016-07-01 13:18       ` Re: Broken handling of lwlocknames.h Robert Haas <robertmhaas@gmail.com>
  2 siblings, 1 reply; 11+ messages in thread

From: Noah Misch @ 2016-07-01 04:09 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: Christoph Berg <myon@debian.org>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-hackers

On Tue, Jun 28, 2016 at 12:26:00PM +0900, Michael Paquier wrote:
> On Tue, Jun 28, 2016 at 3:22 AM, Christoph Berg <myon@debian.org> wrote:
> > Re: Tom Lane 2016-06-27 <31398.1467036827@sss.pgh.pa.us>
> >> Bjorn Munch reported off-list that this sequence:
> >>
> >> unpack tarball, cd into it
> >> ./configure ...
> >> cd src/test/regress
> >> make
> >>
> >> no longer works in 9.6beta2, where it did work in previous releases.
> >> I have confirmed both statements.  The failure looks like
> >>
> >> gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O1 -fpic -I../../../src/include -D_GNU_SOURCE   -c -o regress.o regress.c
> >> In file included from ../../../src/include/storage/lock.h:23,
> >>                  from ../../../src/include/access/heapam.h:22,
> >>                  from ../../../src/include/nodes/execnodes.h:18,
> >>                  from ../../../src/include/commands/trigger.h:17,
> >>                  from regress.c:29:
> >> ../../../src/include/storage/lwlock.h:129:33: error: storage/lwlocknames.h: No such file or directory
> >> make: *** [regress.o] Error 1
> >>
> >> So this is some sort of fallout from commit aa65de042f582896, which
> >> invented that as a generated file.
> >>
> >> Perhaps the solution is to extend src/test/regress/GNUmakefile to know
> >> about this file explicitly (as it already does know about
> >> src/port/pg_config_paths.h).  But that seems rather brute-force; in
> >> particular it seems like that does nothing to keep us from getting burnt
> >> again the same way in future.  I wonder if we should modify
> >> src/backend/Makefile so that it exposes a phony target for "update all the
> >> generated include files", and then have src/test/regress/GNUmakefile call
> >> that.  Or maybe there are other ways.
> >
> > That would also fix the "build plpython3 only" problem I was aiming at
> > in https://www.postgresql.org/message-id/20150916200959.GB32090@msg.df7cb.de
> >
> > So another +1 from a packagers perspective.
> 
> 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.

[Action required within 72 hours.  This is a generic notification.]

The above-described topic is currently a PostgreSQL 9.6 open item.  Robert,
since you committed the patch believed to have created it, you own this open
item.  If some other commit is more relevant or if this does not belong as a
9.6 open item, please let us know.  Otherwise, please observe the policy on
open item ownership[1] and send a status update within 72 hours of this
message.  Include a date for your subsequent status update.  Testers may
discover new open items at any time, and I want to plan to get them all fixed
well in advance of shipping 9.6rc1.  Consequently, I will appreciate your
efforts toward speedy resolution.  Thanks.

[1] http://www.postgresql.org/message-id/20160527025039.GA447393@tornado.leadboat.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  2016-07-01 04:09     ` Re: Broken handling of lwlocknames.h Noah Misch <noah@leadboat.com>
@ 2016-07-01 13:18       ` Robert Haas <robertmhaas@gmail.com>
  2016-07-01 13:29         ` Re: Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Robert Haas @ 2016-07-01 13:18 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: Christoph Berg <myon@debian.org>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-hackers

On Fri, Jul 1, 2016 at 12:09 AM, Noah Misch <noah@leadboat.com> wrote:
> [Action required within 72 hours.  This is a generic notification.]
>
> The above-described topic is currently a PostgreSQL 9.6 open item.  Robert,
> since you committed the patch believed to have created it, you own this open
> item.  If some other commit is more relevant or if this does not belong as a
> 9.6 open item, please let us know.  Otherwise, please observe the policy on
> open item ownership[1] and send a status update within 72 hours of this
> message.  Include a date for your subsequent status update.  Testers may
> discover new open items at any time, and I want to plan to get them all fixed
> well in advance of shipping 9.6rc1.  Consequently, I will appreciate your
> efforts toward speedy resolution.  Thanks.
>
> [1] http://www.postgresql.org/message-id/20160527025039.GA447393@tornado.leadboat.com

Since Tom proposed the approach which Michael's patch takes, I'm
hoping he will review and commit this.  If it is left to me to fix it,
I may just adopt a minimal fix.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  2016-07-01 04:09     ` Re: Broken handling of lwlocknames.h Noah Misch <noah@leadboat.com>
  2016-07-01 13:18       ` Re: Broken handling of lwlocknames.h Robert Haas <robertmhaas@gmail.com>
@ 2016-07-01 13:29         ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-07-01 13:30           ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2016-07-01 13:29 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: Noah Misch <noah@leadboat.com>; Christoph Berg <myon@debian.org>; Michael Paquier <michael.paquier@gmail.com>; pgsql-hackers

Robert Haas <robertmhaas@gmail.com> writes:
> Since Tom proposed the approach which Michael's patch takes, I'm
> hoping he will review and commit this.  If it is left to me to fix it,
> I may just adopt a minimal fix.

I'll take a look at it.

			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



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  2016-07-01 04:09     ` Re: Broken handling of lwlocknames.h Noah Misch <noah@leadboat.com>
  2016-07-01 13:18       ` Re: Broken handling of lwlocknames.h Robert Haas <robertmhaas@gmail.com>
  2016-07-01 13:29         ` Re: Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-01 13:30           ` Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 11+ messages in thread

From: Michael Paquier @ 2016-07-01 13:30 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Haas <robertmhaas@gmail.com>; Noah Misch <noah@leadboat.com>; Christoph Berg <myon@debian.org>; pgsql-hackers

On Fri, Jul 1, 2016 at 10:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Since Tom proposed the approach which Michael's patch takes, I'm
>> hoping he will review and commit this.  If it is left to me to fix it,
>> I may just adopt a minimal fix.
>
> I'll take a look at it.

Note: the patch is not complete yet. I found some bugs in it.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
@ 2016-07-01 18:01     ` Tom Lane <tgl@sss.pgh.pa.us>
  2 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2016-07-01 18:01 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Christoph Berg <myon@debian.org>; Robert Haas <robertmhaas@gmail.com>; pgsql-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



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
@ 2016-07-01 19:13     ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-07-01 22:05       ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  2016-07-02 11:51       ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2 siblings, 2 replies; 11+ messages in thread

From: Tom Lane @ 2016-07-01 19:13 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Christoph Berg <myon@debian.org>; Robert Haas <robertmhaas@gmail.com>; pgsql-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.

I made some mostly-cosmetic changes to this and pushed it.  One thing
to note is that it seemed to me you'd broken the rule for schemapg.h:
by removing the phony target, I think you removed the behavior that
we'd always go and recheck schemapg.h's dependencies.  To do it correctly
without that target, we'd need src/backend/Makefile to know all of those
dependencies, duplicating the rather long list in catalog/Makefile.

			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



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  2016-07-01 19:13     ` Re: Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-01 22:05       ` Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 0 replies; 11+ messages in thread

From: Michael Paquier @ 2016-07-01 22:05 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Christoph Berg <myon@debian.org>; Robert Haas <robertmhaas@gmail.com>; pgsql-hackers

On Sat, Jul 2, 2016 at 4:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.
>
> I made some mostly-cosmetic changes to this and pushed it.  One thing
> to note is that it seemed to me you'd broken the rule for schemapg.h:
> by removing the phony target, I think you removed the behavior that
> we'd always go and recheck schemapg.h's dependencies.  To do it correctly
> without that target, we'd need src/backend/Makefile to know all of those
> dependencies, duplicating the rather long list in catalog/Makefile.

Thanks. Yes the bug that I was mentioning yesterday was that I missed
one place where the target of schemapg.h was referenced, and I didn't
take the time to fully cover this set of dependencies..
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Broken handling of lwlocknames.h
  2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
  2016-06-27 18:22 ` Re: Broken handling of lwlocknames.h Christoph Berg <myon@debian.org>
  2016-06-28 03:26   ` Re: Broken handling of lwlocknames.h Michael Paquier <michael.paquier@gmail.com>
  2016-07-01 19:13     ` Re: Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-02 11:51       ` Christoph Berg <myon@debian.org>
  1 sibling, 0 replies; 11+ messages in thread

From: Christoph Berg @ 2016-07-02 11:51 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Michael Paquier <michael.paquier@gmail.com>; Robert Haas <robertmhaas@gmail.com>; pgsql-hackers

Re: Tom Lane 2016-07-01 <26357.1467400438@sss.pgh.pa.us>
> I made some mostly-cosmetic changes to this and pushed it.

I confirm that Debian's out-of-tree python3 build works now when
invoked directly in the relevant plpython/hstore_plpython
subdirectories. Thanks!

Christoph


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2016-07-02 11:51 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 14:13 Broken handling of lwlocknames.h Tom Lane <tgl@sss.pgh.pa.us>
2016-06-27 18:22 ` Christoph Berg <myon@debian.org>
2016-06-28 03:26   ` Michael Paquier <michael.paquier@gmail.com>
2016-07-01 04:09     ` Noah Misch <noah@leadboat.com>
2016-07-01 13:18       ` Robert Haas <robertmhaas@gmail.com>
2016-07-01 13:29         ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-01 13:30           ` Michael Paquier <michael.paquier@gmail.com>
2016-07-01 18:01     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-01 19:13     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-01 22:05       ` Michael Paquier <michael.paquier@gmail.com>
2016-07-02 11:51       ` Christoph Berg <myon@debian.org>

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