pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dominyktiller@gmail.com
Subject: BUG #15358: PostgreSQL fails to build on 10.14 when Perl is enabled.
Date: Thu, 30 Aug 2018 00:24:16 +0000
Message-ID: <153558865647.1483.573481613491501077@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15358
Logged by:          Dominyk Tiller
Email address:      dominyktiller@gmail.com
PostgreSQL version: 10.5
Operating system:   macOS 10.14
Description:        

As of macOS 10.14/Mojave the headers for Perl are no longer available inside
`/System`, which breaks several assumptions PostgreSQL makes during the
compile process. PostgreSQL uses `perl -MConfig -e 'print
$Config{archlibexp}'` + "CORE" to determine the location, and on macOS 10.14
this returns `/System/Library/Perl/5.18/darwin-thread-multi-2level` +
"CORE".

That location contains only `libperl.dylib` now, but the output is correct
as far as Apple are concerned because the usage of `-I` on Darwin is
erroneous when trying to build against system-provided tools; the advice is
for people to switch over to using `-iwithsysroot` in those circumstances.
The absolute minimal patch to achieve that is to replace the three calls of
`-I$perl_archlibexp/CORE` or `-I$(perl_archlibexp)/CORE` in `configure`,
`contrib/hstore_plperl/Makefile` and `src/pl/plperl/GNUmakefile` with
`-iwithsysroot $perl_archlibexp/CORE` or `-iwithsysroot
$(perl_archlibexp)/CORE` respectively, which clang understands as
`/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE`
or the Xcode equivalent of that path and thus PostgreSQL compiles
successfully.

That's the route we're going down in Homebrew to ensure Mojave support.
However, I'm assuming PostgreSQL wants to retain compatibility with using
non-system Perls on macOS, so the minimal patch wouldn't work in that case.
I would guess the sensible thing to do would be to check the path and use
`-iwithsysroot ` if the path returns `/System` on macOS and in all other
cases keep using `-I`, but I think there are a few different avenues
PostgreSQL could go down there, which is why I'm kinda leaving this to y'all
with a bug report rather than trying to file a patch. I'm happy to file a
patch if you wish, though.

As things stand in the 10.5 release, and I'm assuming prior versions of
PostgreSQL as well, the build errors out during configure with:
```
checking for perl.h... no
configure: error: header file <perl.h> is required for Perl
```

Please let me know if you need any further information; I fully appreciate
how bad I remain at writing coherent bug reports! Thanks for your time.



view thread (4+ messages)  latest in thread

Message-ID: <153558865647.1483.573481613491501077@wrigleys.postgresql.org>
Permalink:  ../153558865647.1483.573481613491501077@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/153558865647.1483.573481613491501077@wrigleys.postgresql.org

 · 

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, dominyktiller@gmail.com
  Subject: Re: BUG #15358: PostgreSQL fails to build on 10.14 when Perl is enabled.
  In-Reply-To: <153558865647.1483.573481613491501077@wrigleys.postgresql.org>
  References: <153558865647.1483.573481613491501077@wrigleys.postgresql.org>

* 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