firebird_fdw icon indicating copy to clipboard operation
firebird_fdw copied to clipboard

Build error against PostgreSQL 18 beta1

Open devrimgunduz opened this issue 8 months ago • 6 comments

Hi @ibarwick ,

I hope you are doing well. firebird_fdw fails to build against PostgreSQL 18 beta1. (after updating Makefile and adding entry for v18). Can you please take a look?

Thanks! Devrim

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -Wmissing-variable-declarations -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -I. -I./ -I/usr/pgsql-18/include/server -I/usr/pgsql-18/include/internal    -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP  -I/usr/include  -c -o src/firebird_fdw.o src/firebird_fdw.c
In file included from /usr/pgsql-18/include/server/access/tupdesc.h:19,
                 from /usr/pgsql-18/include/server/funcapi.h:20,
                 from src/firebird_fdw.c:23:
src/firebird_fdw.c: In function ‘firebirdGetForeignPaths’:
/usr/pgsql-18/include/server/nodes/pg_list.h:68:58: error: incompatible type for argument 7 of ‘create_foreignscan_path’
   68 | #define NIL                                             ((List *) NULL)
      |                                                         ~^~~~~~~~~~~~~~
      |                                                          |
      |                                                          List *
src/firebird_fdw.c:1238:74: note: in expansion of macro ‘NIL’
 1238 |                                                                          NIL,           /* no pathkeys */
      |                                                                          ^~~
In file included from src/firebird_fdw.c:50:
/usr/pgsql-18/include/server/optimizer/pathnode.h:129:113: note: expected ‘Cost’ {aka ‘double’} but argument is of type ‘List *’
  129 |                                                                                         Cost startup_cost, Cost total_cost,
      |                                                                                                            ~~~~~^~~~~~~~~~
/usr/pgsql-18/include/server/nodes/pg_list.h:68:58: error: passing argument 10 of ‘create_foreignscan_path’ from incompatible pointer type [-Wincompatible-pointer-types]
   68 | #define NIL                                             ((List *) NULL)
      |                                                         ~^~~~~~~~~~~~~~
      |                                                          |
      |                                                          List *
src/firebird_fdw.c:1241:74: note: in expansion of macro ‘NIL’
 1241 |                                                                          NIL,   /* no fdw_restrictinfo list */
      |                                                                          ^~~
/usr/pgsql-18/include/server/optimizer/pathnode.h:132:95: note: expected ‘Path *’ but argument is of type ‘List *’
  132 |                                                                                         Path *fdw_outerpath,
      |                                                                                         ~~~~~~^~~~~~~~~~~~~
src/firebird_fdw.c:1233:26: error: too few arguments to function ‘create_foreignscan_path’; expected 12, have 11
 1233 |                          create_foreignscan_path(root, baserel,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
/usr/pgsql-18/include/server/optimizer/pathnode.h:126:21: note: declared here
  126 | extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
src/firebird_fdw.c: At top level:
src/firebird_fdw.c:1399:52: error: unknown type name ‘ExplainState’; did you mean ‘ExplainStmt’?
 1399 |                                                    ExplainState *es)
      |                                                    ^~~~~~~~~~~~
      |                                                    ExplainStmt
src/firebird_fdw.c: In function ‘firebirdExplainForeignModify’:
src/firebird_fdw.c:2933:9: error: implicit declaration of function ‘ExplainPropertyText’; did you mean ‘ExplainQueryText’? [-Wimplicit-function-declaration]
 2933 |         ExplainPropertyText("Firebird query",
      |         ^~~~~~~~~~~~~~~~~~~
      |         ExplainQueryText
src/firebird_fdw.c:2939:15: error: invalid use of undefined type ‘struct ExplainState’
 2939 |         if (es->verbose)
      |               ^~
src/firebird_fdw.c:2946:25: error: implicit declaration of function ‘ExplainPropertyInteger’ [-Wimplicit-function-declaration]
 2946 |                         ExplainPropertyInteger("Batch Size", NULL, resultRelInfo->ri_BatchSize, es);
      |                         ^~~~~~~~~~~~~~~~~~~~~~
src/firebird_fdw.c: In function ‘fbAcquireSampleRowsFunc’:
src/firebird_fdw.c:3506:17: error: too few arguments to function ‘vacuum_delay_point’; expected 1, have 0
 3506 |                 vacuum_delay_point();
      |                 ^~~~~~~~~~~~~~~~~~
In file included from src/firebird_fdw.c:36:
/usr/pgsql-18/include/server/commands/vacuum.h:364:13: note: declared here
  364 | extern void vacuum_delay_point(bool is_analyze);
      |             ^~~~~~~~~~~~~~~~~~
src/firebird_fdw.c: At top level:
src/firebird_fdw.c:151:13: warning: ‘firebirdExplainForeignScan’ used but never defined
  151 | static void firebirdExplainForeignScan(ForeignScanState *node,

devrimgunduz avatar Jun 23 '25 11:06 devrimgunduz

@devrimgunduz those issues were fixed in master a while back. Are you building against a tarball or something?

ibarwick avatar Jul 05 '25 01:07 ibarwick

@ibarwick building against the latest tarball (we test against latest releases).

devrimgunduz avatar Aug 11 '25 07:08 devrimgunduz

Just a heads-up: PostgreSQL 18 RC1 will be out this Thursday (4 September). GA is currently planned at 25 September

devrimgunduz avatar Sep 02 '25 10:09 devrimgunduz

That said git head builds cleanly against v18 rc1, so all we need a new release.

devrimgunduz avatar Sep 04 '25 12:09 devrimgunduz

ping. v18 is due next week.

devrimgunduz avatar Sep 17 '25 18:09 devrimgunduz

@devrimgunduz there is now a 1.4.1 release with Pg18 compatibility. There is a corresponding libfq 0.6.2 release with various compiler fixes. Apologies for the delay.

ibarwick avatar Sep 22 '25 08:09 ibarwick