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
commit 823b36d98b
Author: Andrew Dunstan <and...@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-0698ee1c5...@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
 

Reply via email to