EnterpriseDB / mysql_fdw

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

unknow type 'my_bool' #164

Open jerome-peng opened 6 years ago

jerome-peng commented 6 years ago

uname -a

Linux localhost.localdomain 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:05:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/redhat-release

CentOS Linux release 7.5.1804 (Core)

rpm -qa |grep mysql

mysql-community-libs-8.0.11-1.el7.x86_64 mysql80-community-release-el7-1.noarch mysql-community-devel-8.0.11-1.el7.x86_64 mysql-community-common-8.0.11-1.el7.x86_64 mysql-community-libs-compat-8.0.11-1.el7.x86_64 mysql-community-client-8.0.11-1.el7.x86_64

mysql_config --version

8.0.11

pg_config

BINDIR = /home/jerome/work/pgsql/bin DOCDIR = /home/jerome/work/pgsql/doc/postgresql HTMLDIR = /home/jerome/work/pgsql/doc/postgresql INCLUDEDIR = /home/jerome/work/pgsql/include PKGINCLUDEDIR = /home/jerome/work/pgsql/include/postgresql INCLUDEDIR-SERVER = /home/jerome/work/pgsql/include/postgresql/server LIBDIR = /home/jerome/work/pgsql/lib PKGLIBDIR = /home/jerome/work/pgsql/lib/postgresql LOCALEDIR = /home/jerome/work/pgsql/share/locale MANDIR = /home/jerome/work/pgsql/share/man SHAREDIR = /home/jerome/work/pgsql/share/postgresql SYSCONFDIR = /home/jerome/work/pgsql/etc/postgresql PGXS = /home/jerome/work/pgsql/lib/postgresql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--enable-debug' '--with-libs=/opt/local/Current/lib' '--with-includes=/opt/local/Current/include/libxml2:/opt/local/Current/include' '--prefix=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build' '--with-ldap' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/opt/local/EnterpriseDB/LanguagePack/9.5/Tcl-8.5/lib' '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--docdir=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build/doc/postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' 'LD_LIBRARY_PATH=/opt/local/Current/lib' 'CFLAGS=-O2 -DMAP_HUGETLB=0x40000' CC = gcc CPPFLAGS = -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 CFLAGS_SL = -fPIC LDFLAGS = -L../../../src/common -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64.build/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.5.12

[root@localhost mysql_fdw-REL-2_4_0]# make USE_PGXS=1 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x40000 -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/home/jerome/work/pgsql/include/postgresql/server -I/home/jerome/work/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o connection.o connection.c connection.c: 在函数‘mysql_connect’中: connection.c:188:2: 错误:未知的类型名‘my_bool’ my_bool secure_auth = svr_sa; ^ connection.c:199:23: 错误:‘MYSQL_SECURE_AUTH’未声明(在此函数内第一次使用) _mysql_options(conn, MYSQL_SECURE_AUTH, &secure_auth); ^ connection.c:199:23: 附注:每个未声明的标识符在其出现的函数内只报告一次 make: *** [connection.o] 错误 1

ahsanhadi commented 6 years ago

Can you please explain the issue that you want to report? It is not clear to understand the issue from the description.

LeMerP commented 6 years ago

I think he is trying to compile mysql_fdw against MySQL 8, because I am getting the same error on a Ubuntu machine if I am doing so. I run: make USE_PGXS=1 && make USE_PGXS=1 install and get: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/opt/postgresql-10.4/include/server -I/opt/postgresql-10.4/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o connection.o connection.c connection.c: In function ‘mysql_connect’: connection.c:188:2: error: unknown type name ‘my_bool’ my_bool secure_auth = svr_sa; ^ connection.c:199:23: error: ‘MYSQL_SECURE_AUTH’ undeclared (first use in this function) _mysql_options(conn, MYSQL_SECURE_AUTH, &secure_auth); ^ connection.c:199:23: note: each undeclared identifier is reported only once for each function it appears in

: recipe for target 'connection.o' failed make: *** [connection.o] Error 1 Compiling against MySQL 5.7 works like a charm instead. Used package: https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-server_8.0.11-1ubuntu16.04_amd64.deb-bundle.tar
cbandy commented 5 years ago

Fixed by https://github.com/EnterpriseDB/mysql_fdw/commit/bac92d1123fd0fa53a25c8477800f22c585d12ba perhaps?