pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [RFC] building postgres with meson
Date: Sun, 6 Feb 2022 12:06:41 -0500
Message-ID: <3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net> (raw)
In-Reply-To: <20d4fa3a-e0f1-0ac4-1657-0698ee1c511f@dunslane.net>
References: <f12e3659-ec71-c6a3-56b8-7fa5e016e3c1@dunslane.net>
	<b9d19d7d-72bd-8f80-e08e-e6dbf523f15d@dunslane.net>
	<20211012165926.phrxn7vwx6ysfioj@alap3.anarazel.de>
	<20211012180934.b22v5nznbgtaoxyn@alap3.anarazel.de>
	<d1ea641b-0822-78dd-7a7e-cfe5f5f9cf8e@dunslane.net>
	<20211012192942.5chfraeix6qih6ke@alap3.anarazel.de>
	<1def3634-8d7d-a501-3caa-83e2f952418d@dunslane.net>
	<20211012204256.ie2l7j6unbbtioj5@alap3.anarazel.de>
	<20211013010304.ox6nssy3eyptbdhc@alap3.anarazel.de>
	<efe62862-6648-9f20-4b29-7441b9f99463@dunslane.net>
	<20211013172654.mjtiwpezmczk6ppy@alap3.anarazel.de>
	<20d4fa3a-e0f1-0ac4-1657-0698ee1c511f@dunslane.net>


On 10/13/21 16:06, Andrew Dunstan wrote:
> On 10/13/21 1:26 PM, Andres Freund wrote:
>>> pexports will be in the resulting path, and the build will use the
>>> native compiler.
>> I don't see pexports anywhere in the msys installation. I can see it available
>> on sourceforge, and I see a few others asking where to get it from in the
>> context of msys, and being pointed to manually downloading it.
>
>
> Weird. fairywren has it, which means that it must have been removed from
> the packages at some stage, fairly recently as fairywren isn't that old.
> I just confirmed the absence on a 100% fresh install.
>
>
> It is in Strawberry's c/bin directory.
>
>
>> Seems like we should consider using gendef instead of pexports, given it's
>> available in msys?
>
> Yeah. It's missing on my ancient msys animal (frogmouth), but it doesn't
> build --with-perl.
>
>
> jacana seems to have it.
>
>
> If you prep a patch I'll test it.
>
>

Here's a patch. I've tested the perl piece on master and it works fine.
It applies cleanly down to 9.4, which is before we got transform modules
(9.5) which fail if we just omit doing this platform-specific piece.


Before that only plpython uses pexports, and we're not committed to
supporting plpython at all on old branches.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachments:

  [text/x-patch] gendef.patch (1.5K, ../3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net/2-gendef.patch)
  download | inline diff:
commit 823b36d98b
Author: Andrew Dunstan <andrew@dunslane.net>
Date:   Sun Feb 6 10:53:06 2022 -0500

    Use gendef instead of pexports for building windows .def files
    
    Modern msys systems lack pexports but have gendef instead, so use that.
    
    Discussion: https://postgr.es/m/20d4fa3a-e0f1-0ac4-1657-0698ee1c511f@dunslane.net>

diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index 919d46453f..a2e6410f53 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -48,7 +48,7 @@ lib$(perlwithver).a: $(perlwithver).def
 	dlltool --dllname $(perlwithver).dll --def $(perlwithver).def --output-lib lib$(perlwithver).a
 
 $(perlwithver).def: $(PERLDLL)
-	pexports $^ > $@
+	gendef - $^ > $@
 
 endif # win32
 
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
index 9e95285af8..a83ae8865c 100644
--- a/src/pl/plpython/Makefile
+++ b/src/pl/plpython/Makefile
@@ -69,7 +69,7 @@ libpython${pytverstr}.a: python${pytverstr}.def
 	dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a
 
 python${pytverstr}.def:
-	pexports $(PYTHONDLL) > $@
+	gendef - $(PYTHONDLL) > $@
 
 endif # win32
 
diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile
index 1e7740da3f..25e65189b6 100644
--- a/src/pl/tcl/Makefile
+++ b/src/pl/tcl/Makefile
@@ -46,7 +46,7 @@ lib$(tclwithver).a: $(tclwithver).def
 	dlltool --dllname $(tclwithver).dll --def $(tclwithver).def --output-lib lib$(tclwithver).a
 
 $(tclwithver).def: $(TCLDLL)
-	pexports $^ > $@
+	gendef - $^ > $@
 
 endif # win32
 


view thread (143+ messages)  latest in thread

Message-ID: <3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net>
Permalink:  ../3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net/
Also on:    postgresql.org/message-id/3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net

 ·  · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andrew@dunslane.net, andres@anarazel.de
  Subject: Re: [RFC] building postgres with meson
  In-Reply-To: <3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net>

* 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