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

tds_fdw does not compile on postgres 9.5 and freetds #58

Closed uherbst closed 8 years ago

uherbst commented 8 years ago

Hi, we have:

What have we done: in Makefile we changed: PG_CPPFLAGS := -I/usr/local/postgres/freetds/include -I./include/

Then executed: PATH=/usr/local/postgres/postgres-9.5.0/bin:$PATH make USE_PGXS=1

Error: [postgres@d001dadl tds_fdw-1.0.7]$ PATH=/usr/local/postgres/postgres-9.5.0/bin:$PATH make USE_PGXS=1 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 -shared -o tds_fdw.so src/tds_fdw.o src/options.o -L/usr/local/postgres/postgres-9.5.0/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/postgres/postgres-9.5.0/lib',--enable-new-dtags -lsybdb /bin/ld: cannot find -lsybdb collect2: error: ld returned 1 exit status make: *\ [tds_fdw.so] Error 1

Where have I to add the right -L/usr/local/postgres/freetds/lib - option ?

GeoffMontee commented 8 years ago

Hi @uherbst,

Where have I to add the right -L/usr/local/postgres/freetds/lib - option ?

I would recommend adding it to either SHLIB_LINK or PG_LIBS in the Makefile.