Re: Mingw task for Cirrus CI - Mailing list pgsql-hackers
From | Andres Freund |
---|---|
Subject | Re: Mingw task for Cirrus CI |
Date | |
Msg-id | 20220226002746.h3vwarvbxkphdoau@alap3.anarazel.de Whole thread Raw |
In response to | Mingw task for Cirrus CI (Melih Mutlu <m.melihmutlu@gmail.com>) |
Responses |
Re: Mingw task for Cirrus CI
Re: Mingw task for Cirrus CI |
List | pgsql-hackers |
Hi, Andrew, CCIng you both because you might be interested in the CI bit, and because you might know the answer. On 2022-02-25 19:44:27 +0300, Melih Mutlu wrote: > I've been working on adding Windows+MinGW environment into cirrus-ci tasks > (discussion about ci is here [1]). > It uses MSYS2 to set the environment. UCRT is chosen as C standard library, > instead of MSVCRT. > The task configures postgres with features that are available in MSYS2 (see > available packages [2]) and tap tests are enabled. > I already added the necessary docker image, you can find the related PR at > [3] and a successful cirruc-ci run with these changes at [4]. > Attached patch adds a task runs on Windows with MinGW for cirrus-ci > > However, I cannot run configure with --with-python, --with-perl or > --with-tcl. > There are two issues I encountered while trying to enable. e.g. for > --with-python > > 1- python_ldlibrary is set to "libpython3.9.dll.a". So the related line in > configure cannot retrieve "ldlibrary" This presumably is due to using mingw's python rather than python.org's python. Seems like a reasonable thing to support for the mingw build. Melih, you could try to build against the python.org python (i installed in the CI container). > 2- src/pl/plpython/Makefile looks under "C:/Windows/system32/" for > PYTHONDLL. gendef cannot open that file, give an error like " failed to > open()" when creating a .def file. On my win10 VM in which I installed python.org python I don't see a python dll in c:/windows/system32 either. Looks like none of our windows mingw animals build with python. So it might just be bitrot. > In the end, make check-world still fails, even though I was able to run > configure and make without any obvious error. > I see bunch of errors in tests like: > +ERROR: language "plpython3u" does not exist > +HINT: Use CREATE EXTENSION to load the language into the database. > Here is the logs from failed ci run: > https://api.cirrus-ci.com/v1/artifact/task/4645682031099904/log/build/src/pl/plpython/regression.diffs The URL to the rest of the CI run is https://cirrus-ci.com/task/4645682031099904 The relevant failure is earlier: +ERROR: could not load library "C:/cirrus/build/tmp_install/ucrt64/lib/postgresql/plpython3.dll": The specified module couldnot be found. Clearly plpython is being built, because we see some warnings: [22:44:24.456] C:/msys64/ucrt64/include/python3.9/pyconfig.h:1474: warning: "SIZEOF_OFF_T" redefined [22:44:24.456] 1474 | #define SIZEOF_OFF_T 8 [22:44:24.456] | [22:44:24.456] In file included from c:/cirrus/src/include/c.h:54, [22:44:24.456] from c:/cirrus/src/include/postgres.h:46, [22:44:24.456] from c:/cirrus/contrib/jsonb_plpython/jsonb_plpython.c:1: [22:44:24.456] ../../src/include/pg_config.h:875: note: this is the location of the previous definition [22:44:24.456] 875 | #define SIZEOF_OFF_T 4 Seems we're doing something wrong and end up with a 4 byte off_t, whereas python ends up with an 8byte one. We probably need to fix that. But it's not the cause of this problem. You could take out -s from the make flags and see whether plpython3.dll is being built and installed, and where to. Greetings, Andres Freund
pgsql-hackers by date: