2ndquadrant-it / pgespresso

Optional Extension for Barman, Backup and Recovery Manager for PostgreSQL
Other
27 stars 5 forks source link

Build error against PostgreSQL 11 #11

Closed devrimgunduz closed 6 years ago

devrimgunduz commented 6 years ago

Hi,

pgespresso 1.2 cannot be built against PostgreSQL 11, breaking upgrades. Can you please take a look? Below is the build failure:

  • /usr/bin/make USE_PGXS=1 -j8 make[1]: Entering directory '/home/devrim/Documents/Devrim/Projects/repo/pgrpms/rpm/redhat/master/pgespresso/master/pgespresso-1.2' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -I. -I./ -I/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o pgespresso.o pgespresso.c /usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I. -I./ -I/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o pgespresso.bc pgespresso.c pgespresso.c: In function 'pgespresso_start_backup': pgespresso.c:104:47: warning: passing argument 4 of 'do_pg_start_backup' from incompatible pointer type [-Wincompatible-pointer-types] do_pg_start_backup(backupidstr, fast, NULL, &labelfile, ^~~~~~ In file included from pgespresso.c:22: /usr/pgsql-11/include/server/access/xlog.h:313:43: note: expected 'StringInfo' {aka 'struct StringInfoData *'} but argument is of type 'char *' TimeLineID starttli_p, StringInfo labelfile,
    
    pgespresso.c:105:10: warning: passing argument 5 of 'do_pg_start_backup' from incompatible pointer type [-Wincompatible-pointer-types]
    dir, NULL, &tblspcmapfile, false, false);
    ^~~
    In file included from pgespresso.c:22:
    /usr/pgsql-11/include/server/access/xlog.h:314:15: note: expected 'List **' {aka 'struct List **'} but argument is of type 'DIR *' {aka 'struct __dirstream *'}
    List **tablespaces, StringInfo tblspcmapfile, bool infotbssize,
    ~~~~~~~^~~~~~~~~~~
    pgespresso.c:105:10: warning: the address of 'tblspcmapfile' will always evaluate as 'true' [-Waddress]
    dir, NULL, &tblspcmapfile, false, false);
    ^~~
    pgespresso.c:104:3: error: too many arguments to function 'do_pg_start_backup'
    do_pg_start_backup(backupidstr, fast, NULL, &labelfile,
    ^~~~~~~~~~~~~~~~~~
    In file included from pgespresso.c:22:
    /usr/pgsql-11/include/server/access/xlog.h:312:19: note: declared here
    extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
    ^~~~~~~~~~~~~~~~~~
    pgespresso.c: In function 'pgespresso_stop_backup':
    pgespresso.c:157:39: error: macro "XLByteToPrevSeg" requires 3 arguments, but only 2 given
    XLByteToPrevSeg(stoppoint, xlogsegno);
    ^
    pgespresso.c:157:3: error: 'XLByteToPrevSeg' undeclared (first use in this function)
    XLByteToPrevSeg(stoppoint, xlogsegno);
    ^~~~~~~~~~~~~~~
    pgespresso.c:157:3: note: each undeclared identifier is reported only once for each function it appears in
    pgespresso.c:158:47: error: macro "XLogFileName" requires 4 arguments, but only 3 given
    XLogFileName(xlogfilename, endtli, xlogsegno);
    ^
    pgespresso.c:158:3: error: 'XLogFileName' undeclared (first use in this function); did you mean 'XLogFileNameP'?
    XLogFileName(xlogfilename, endtli, xlogsegno);
    ^~~~~~~~~~~~
    XLogFileNameP
    pgespresso.c:150:13: warning: unused variable 'xlogsegno' [-Wunused-variable]
    XLogSegNo xlogsegno;
    ^~~~~~~~~
    pgespresso.c:136:13: warning: variable 'stoppoint' set but not used [-Wunused-but-set-variable]
    XLogRecPtr stoppoint;
    ^~~~~~~~~
    make[1]: *** [<builtin>: pgespresso.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    pgespresso.c:105:44: error: too many arguments to function call, expected 8, have 9
    dir, NULL, &tblspcmapfile, false, false);
    ^~~~~
    /usr/lib64/clang/6.0.1/include/stdbool.h:33:15: note: expanded from macro 'false'
    #define false 0
    ^
    /usr/pgsql-11/include/server/access/xlog.h:312:1: note: 'do_pg_start_backup' declared here
    extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
    ^
    pgespresso.c:157:39: error: too few arguments provided to function-like macro invocation
    XLByteToPrevSeg(stoppoint, xlogsegno);
    ^
    /usr/pgsql-11/include/server/access/xlog_internal.h:121:9: note: macro 'XLByteToPrevSeg' defined here
    #define XLByteToPrevSeg(xlrp, logSegNo, wal_segsz_bytes) \
    ^
    pgespresso.c:157:3: error: use of undeclared identifier 'XLByteToPrevSeg'
    XLByteToPrevSeg(stoppoint, xlogsegno);
    ^
    pgespresso.c:158:47: error: too few arguments provided to function-like macro invocation
    XLogFileName(xlogfilename, endtli, xlogsegno);
    ^
    /usr/pgsql-11/include/server/access/xlog_internal.h:155:9: note: macro 'XLogFileName' defined here
    #define XLogFileName(fname, tli, logSegNo, wal_segsz_bytes)     \
    ^
    pgespresso.c:158:3: error: use of undeclared identifier 'XLogFileName'; did you mean 'XLogFileNameP'?
    XLogFileName(xlogfilename, endtli, xlogsegno);
    ^~~~~~~~~~~~
    XLogFileNameP
    /usr/pgsql-11/include/server/access/xlog.h:255:14: note: 'XLogFileNameP' declared here
    extern char *XLogFileNameP(TimeLineID tli, XLogSegNo segno);
    ^
    pgespresso.c:158:3: warning: expression result unused [-Wunused-value]
    XLogFileName(xlogfilename, endtli, xlogsegno);
    ^~~~~~~~~~~~
    1 warning and 5 errors generated.
    make[1]: *** [/usr/pgsql-11/lib/pgxs/src/makefiles/../../src/Makefile.global:1009: pgespresso.bc] Error 1
    make[1]: Leaving directory '/home/devrim/Documents/Devrim/Projects/repo/pgrpms/rpm/redhat/master/pgespresso/master/pgespresso-1.2'
    error: Bad exit status from /var/tmp/rpm-tmp.8gRxi8 (%build)
devrimgunduz commented 6 years ago

Ping. v11 is out on Thursday.

mnencia commented 6 years ago

pgespresso is not needed on pg11 as its functionalities are in the core since PG 9.6

devrimgunduz commented 6 years ago

Hi Marco,

Thanks! I removed pgespresso from 9.6+ (RPMs)

Regards, Devrim