Opened 2 years ago

Closed 2 years ago

#5066 closed defect (fixed)

Can't build under mingw64

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS 3.3.0
Component: build Version: master
Keywords: Cc:

Description

Since commit

[dd4ab0d7/git]

both winnie and I are getting error https://winnie.postgis.net/job/PostGIS_EDB_Regress_winnie/13183/consoleFull

NOTICE:  schema "public" already exists, skipping
CREATE SCHEMA
SET
BEGIN
SET
DO
DO
CREATE FUNCTION
psql:E:/jenkins/postgis/branches/3.3/regress/00-regress-install/share/contrib/postgis/postgis.sql:106: ERROR:  could not access file "/projects/postgis/branches/3.3/regress/00-regress-install/lib/postgis-3.3": No such file or directory
-----------------------------------------------------------------------------
 failed (Error encountered loading /projects/postgis/branches/3.3/regress/00-regress-install/share/contrib/postgis/postgis_comments.sql: /projects/postgis/tmp/3.3.0dev_pg11_geos3.11_gdal3.3.3w64/regress_log)
-----------------------------------------------------------------------------

and last commit still has error

https://winnie.postgis.net/job/PostGIS_EDB_Regress_winnie/13192/console — corresponding to [cbb884c5/git]

NOTICE:  schema "public" already exists, skipping
CREATE SCHEMA
SET
BEGIN
SET
DO
DO
CREATE FUNCTION
psql:E:/jenkins/postgis/branches/3.3/regress/00-regress-install/share/contrib/postgis/postgis.sql:106: ERROR:  could not access file "/projects/postgis/branches/3.3/regress/00-regress-install/lib/postgis-3.3": No such file or directory
-----------------------------------------------------------------------------
 failed (Error encountered loading /projects/postgis/branches/3.3/regress/00-regress-install/share/contrib/postgis/postgis_comments.sql: /projects/postgis/tmp/3.3.0dev_pg11_geos3.11_gdal3.3.3w64/regress_log)
-----------------------------------------------------------------------------

Change History (16)

comment:1 by robe, 2 years ago

Owner: changed from pramsey to robe

comment:2 by robe, 2 years ago

No I don't think this is an sfcgal issue. I had fixed the SFCGAL issue with it not working for older SFCGAL and it was working. Now it is not.

comment:3 by robe, 2 years ago

Summary: Can't build under mingw64, might be sfcgal issueCan't build under mingw64

comment:4 by strk, 2 years ago

My builds do have regress/00-regress-install/lib/postgis-3.so installed in build dir. I see your script looks for postgis-3.3.so which makes me think this *could* be related to —with-library-minor-version — is jenkins the only CI using that switch ?

comment:5 by strk, 2 years ago

I tried locally with --with-library-minor-version and after make staged-install I do have the file: regress/00-regress-install/lib/postgis-3.3.so (in the build tree)

in reply to:  4 comment:6 by robe, 2 years ago

Replying to strk:

My builds do have regress/00-regress-install/lib/postgis-3.so installed in build dir. I see your script looks for postgis-3.3.so which makes me think this *could* be related to —with-library-minor-version — is jenkins the only CI using that switch ?

I thought I had changed the dronie bots to use —with-library-minor-version as well so they could properly test upgrades from 3, 3.1, 3.2 etc. anyway I think debbie has that too and she isn't having issue.

comment:7 by robe, 2 years ago

strk I usually do

make install

and then regess check with extensions. I'll check what happens with make staged-install

comment:8 by strk, 2 years ago

Component: postgisbuild/upgrade/install

comment:9 by strk, 2 years ago

We did NOT change the Dronie script to use —with-library-minor-version I will ASAP

comment:10 by strk, 2 years ago

Actually, it's better to have a separate ticket if we want to change Dronie, it's kind of good to have different bots test different configurations. The drop of minor version is still scary to me so it's nice if some bot can eventually make some related bug surface

comment:11 by strk, 2 years ago

In https://winnie.postgis.net/job/PostGIS_EDB_Regress_winnie/13211/console I see:

/bin/install -c -m 755  postgis-3.3.dll '/projects/postgis/branches/3.3/regress/00-regress-install/lib/postgis-3.3.dll'

So it looks like the DLL is being installed in /projects/postgis/branches/3.3/regress/00-regress-install/lib/postgis-3.3.dll

I don't see why the file should not be there anymore later (or would that reference really need a .dll suffix?)

psql:E:/jenkins/postgis/branches/3.3/regress/00-regress-install/share/contrib/postgis/postgis.sql:106: ERROR: could not access file "/projects/postgis/branches/3.3/regress/00-regress-install/lib/postgis-3.3": No such file or directory

comment:12 by robe, 2 years ago

no it doesn't need a suffix. I'm working on 3.0 branch right now and my regress paths look like "C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/lib/postgis-3.0".

Oh I think I see the issue now. You see under mingw64, I have fstab which makes my and winnies C:/ming64gcc81/projects/postgis E:/ming64gcc81/projects/postgis look like /projects/postgis/branches.

But the PostgreSQL testing environment is pure windows, doesn't use mingw64.

Before the scripts would correctly resolve to the windows path, this seems to have changed with your logic, so now it's using the mingw64 linux pathing rules.

comment:13 by strk, 2 years ago

Do you confirm it stopped wowrking in [dd4ab0d780092be3e5c31172f54afeff96255b37/git] ? I think the change responsible for the breakage could be this, in regress/Makefile.in:

-# Where we put our regression installation
-ifeq ($(MINGWBUILD),1)
-       srcdir=$(shell bash -c "pwd -W")
-else
-       srcdir=$(shell pwd)
-endif
-REGRESS_INSTALLDIR=$(srcdir)/00-regress-install
+REGRESS_INSTALLDIR = $(realpath $(builddir) )/00-regress-install

I'm guessing realpath Makefile variable is not doing paths in the window way. I'll push a "win" branch to origin for winnie to catch up (will she build it ?)

comment:14 by strk, 2 years ago

I've pushed a "win" branch, could you test it and merge to "master" if happy ?

comment:15 by robe, 2 years ago

That worked,okay I'll merge in a bit and close this.

comment:16 by Sandro Santilli <strk@…>, 2 years ago

Resolution: fixed
Status: newclosed

In 2ff1c5b3/git:

Fix staged-install path for windows builds

Closes #5066

Note: See TracTickets for help on using tickets.