tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
381 stars 102 forks source link

PostgreSQL 10 undefined symbol: Float4GetDatum #153

Closed mbothorel closed 6 years ago

mbothorel commented 6 years ago

Hello,

I am able to compile tds_fdw 1.0.8 with PG10 (from official repository) but I get an error when I create the extension in PG.

2017-12-27 16:42:16 UTC [3160-1] postgres@postgres ERROR:  XX000: could not load library "/usr/lib/postgresql/10/lib/tds_fdw.so": /usr/lib/postgresql/10/lib/tds_fdw.so: undefined symbol: Float4GetDatum
2017-12-27 16:42:16 UTC [3160-2] postgres@postgres LOCATION:  internal_load_library, dfmgr.c:240
2017-12-27 16:42:16 UTC [3160-3] postgres@postgres STATEMENT:  CREATE EXTENSION tds_fdw;

There is my pg_config output:

BINDIR = /usr/lib/postgresql/10/bin
DOCDIR = /usr/share/doc/postgresql-doc-10
HTMLDIR = /usr/share/doc/postgresql-doc-10
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/10/server
LIBDIR = /usr/lib/x86_64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/10/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/10/man
SHAREDIR = /usr/share/postgresql/10
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/10/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-icu' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-tclconfig=/usr/lib/x86_64-linux-gnu/tcl8.6' '--with-includes=/usr/include/tcl8.6' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/10/man' '--docdir=/usr/share/doc/postgresql-doc-10' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/10' '--bindir=/usr/lib/postgresql/10/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' '--with-systemd' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' '--with-gssapi' '--with-ldap' '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' '--with-selinux' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'
CC = gcc
CPPFLAGS = -DFRONTEND -I/usr/include/x86_64-linux-gnu -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5
CFLAGS = -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 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer
CFLAGS_SL = -fPIC
LDFLAGS = -L../../src/common -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lpthread -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm  
VERSION = PostgreSQL 10.1

I'm using Debian Jessie (8.10) and I have no problem when using PG9.6 and tds_fdw 1.0.8. Could you help me ?

Thanks, Maxence.

juliogonzalez commented 6 years ago

Hi @mbothorel,

1.0.8 is passing tests at the CI for Ubuntu 14.10 and PostgreSQL 10.1: https://jenkins.juliogonzalez.es/job/tds_fdw-build-free/DISTRO=ubuntu14.04,PG_VER=10,label=docker/47/console

Please let us know:

mbothorel commented 6 years ago

Hi @juliogonzalez,

Well, I am embarrassed. I just built a new server to provide to you the all procedure to reproduce, and I can't. I probably missed something the first time, everything is working now.

Sorry for the inconvenience, Maxence.