pramsey / pgsql-ogr-fdw

PostgreSQL foreign data wrapper for OGR
MIT License
237 stars 34 forks source link

PG16 compile failure #249

Closed robe2 closed 1 year ago

robe2 commented 1 year ago

Getting this error when compiling against PG16

ogr_fdw.c: In function ‘ogrLookupGeometryFunctionOid’:
ogr_fdw.c:1562:10: error: too few arguments to function ‘stringToQualifiedNameList’
 1562 |  names = stringToQualifiedNameList(proname);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ogr_fdw.c:34:
/usr/include/postgresql/16/server/utils/regproc.h:28:14: note: declared here
   28 | extern List *stringToQualifiedNameList(const char *string, Node *escontext);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: ogr_fdw.o] Error 1

Also is there a reason you have ci turned off on master branch?

robe2 commented 1 year ago

Okay I answered my question about why you disabled it. The pg16 is failing cause of the icu stuff going on. The PG14 and PG15 I presume are failing cause you haven't changed the regress tests.

robe2 commented 1 year ago

Can we also have a release after. PG16 is at feature freeze, so hopefully there will be no more breaking changes before PG16 release time.

pramsey commented 1 year ago

It looks to me like CI is failing because the GHA runners permission structure changed... the tests that try to reference the data in the repo are failing.

robe2 commented 1 year ago

Yah I think the PG13-PG15 are failing for that reason, but PG16, might be a permission issue too or some timing issue, but it's failing on startup before it even gets to compile step.

update-alternatives: error: alternative path /usr/share/postgresql/16/man/man1/postmaster.1.gz doesn't exist
dpkg: error processing package postgresql-16 (--configure):
 installed postgresql-16 package post-installation script subprocess returned error exit status 2
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for postgresql-common (248.pgdg22.04+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
  en_us
Removing obsolete dictionary files:
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 postgresql-16
pramsey commented 1 year ago

I don't have 16 in CI, and I think you might be pushing the bounds of propriety trying to :)

robe2 commented 1 year ago

I just noticed a different problem with PG13. It seems PG13 is failing at the install step. I think it might be maybe PG14 is shipped by default, so that has to be removed.

The output suggest PG13 might be installing in PG14 Note how the error notice install path for PG13 has a mix of PG13 and PG 14 and first error is:

 CREATE EXTENSION ogr_fdw;
+ERROR:  could not open extension control file "/usr/share/postgresql/13/extension/ogr_fdw.control": No such file or directory
usr/bin/install -c -m 644 stringbuffer_pg.bc '/usr/lib/postgresql/14/lib/bitcode'/ogr_fdw/./
cd '/usr/lib/postgresql/14/lib/bitcode' && /usr/lib/llvm-14/bin/llvm-lto -thinlto -thinlto-action=thinlink -o ogr_fdw.index.bc ogr_fdw/ogr_fdw.bc ogr_fdw/ogr_fdw_deparse.bc ogr_fdw/ogr_fdw_common.bc ogr_fdw/ogr_fdw_func.bc ogr_fdw/stringbuffer_pg.bc
/usr/lib/postgresql/13/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/lib/postgresql/13/bin'    --encoding=UTF8 --dbname=contrib_regression file pgsql import

anyway I'll take a stab at cleaning this up. I confirmed it installs fine on PG13, but I can't test locally because of the whole windows/linux path mess since your earlier fixes that' it not picking up my running paths anymore.

robe2 commented 1 year ago

Okay I added back PG16 now that it working again, so guess you can close this out after you commit #251 .