EnterpriseDB / mysql_fdw

PostgreSQL foreign data wrapper for MySQL
Other
523 stars 161 forks source link

Build failure with PG11: error: macro "AllocSetContextCreate" passed 5 arguments, but takes just 3 #165

Closed df7cb closed 5 years ago

df7cb commented 6 years ago

mysql_fdw fails to build with PG 11beta1:

$ make USE_PGXS=1
Makefile:52: *** PostgreSQL 9.3, 9.4, 9.5, 9.6 or 10beta is required to compile this extension.

After removing this restriction from Makefile, the next error is:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-11-LcCi7f/postgresql-11-11~beta1=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmariadbclient.so\" -I. -I./ -I/usr/include/postgresql/11/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5  -c -o mysql_fdw.o mysql_fdw.c
mysql_fdw.c: In function ‘mysqlBeginForeignScan’:
mysql_fdw.c:431:36: error: macro "AllocSetContextCreate" passed 5 arguments, but takes just 3
              ALLOCSET_SMALL_MAXSIZE);
                                    ^
ahsanhadi commented 6 years ago

We will look to add support for PG 11 asap.

devrimgunduz commented 6 years ago

Hi @ahsanhadi ,

Any updates on the ETA? PG 11 release is not that far away.

Cheers, Devrim

df7cb commented 5 years ago

The AllocSetContextCreate change has been fixed in PG 11.0 so that the macro now accepts both variants. I tried monkey-patching the remaining problems, but the changes required seem to be non-trivial.

cbandy commented 5 years ago

Fixed in https://github.com/EnterpriseDB/mysql_fdw/commit/a7d22fa03fc32fe9a0be7dff0fde97d0c4b55c61#diff-811d944d53a7dabf71c66af45831e8ad perhaps?