Closed devrimgunduz closed 5 years ago
I was getting the same errors as you when trying to build from a release package.
The v11 changes are in the master branch if you build from the repository though.
Here's a list of the v11 changes that were incorporated: https://github.com/tds-fdw/tds_fdw/pull/169
Also, if you are running the LLVM JIT build (postgresql11-llvmjit.x86_64) you might need extra tools to make/install.
If you are on CentOS (7.5), this is what I did:
yum install centos-release-scl
yum install devtoolset-7
scl enable devtoolset-7 bash
yum install llvm5.0
yum install llvm-toolset-7-clang
Using alpine (via docker) I show no build failure. Testing the table definitions, I am getting no errors and the data loads fine. Can you try building from source directly? Also, can you describe your build context (OS version)?
Confirmed on both CentOS6 and Ubuntu 14.04 using the tag v2.0.0-alpha.2
: https://jenkins.juliogonzalez.es/job/tds_fdw-build-free/59/ (ignore PostgreSQL10 failure for Ubuntu 14.04, it's a CI problem that was not fixed for that tag).
@devrimgunduz, can the issue be closed?
@juliogonzalez Any chance you can roll a new alpha or so? RPMs depend on released tarballs -- so that I can test.
@devrimgunduz, I am afraid that depends on @GeoffMontee rather than me.
@GeoffMontee, maybe we should consider releasing Alpha2, so I can update https://github.com/juliogonzalez/tds_fdw-rpm as well, and include support for new PostgreSQL versions.
Then the development can be continued for Alpha3.
What do you think?
@juliogonzalez,
It looks like we already had an alpha2, so I made an alpha3.
@devrimgunduz,
You can find it here:
https://github.com/tds-fdw/tds_fdw/releases/tag/v2.0.0-alpha.3
RPM is on its way and under testing now. I will publish it tomorrow.
Thanks, @juliogonzalez!
I added yesterday to the project the SPECs I use to generate RPMs: https://github.com/tds-fdw/rpm
As a bonus, now we have a Yum repository with the packages starting with 2.0.0-alpha3: https://tds-fdw.github.io/yum/ (instructions to use it are pending approval at https://github.com/tds-fdw/tds_fdw/pull/194)
@devrimgunduz, can this issue be closed?
Thanks @juliogonzalez ! I updated the packages in the YUM repo.
Regards, Devrim
Hi, 2.0.0-alpha2 throws errors while building against PostgreSQL 11. Can you please take a look?
Thanks!
`/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I./include/ -fvisibility=hidden -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 src/deparse.bc src/deparse.c src/deparse.c: In function 'deparse_type_name': src/deparse.c:698:10: warning: implicit declaration of function 'format_type_with_typemod_qualified'; did you mean 'format_type_with_typemod'? [-Wimplicit-function-declaration] return format_type_with_typemod_qualified(type_oid, typemod); ^
~~~~~~~~~ format_type_with_typemod src/deparse.c:698:10: warning: returning 'int' from a function with return type 'char ' makes pointer from integer without a cast [-Wint-conversion] return format_type_with_typemod_qualified(type_oid, typemod); ^~~~~~~~~~~~~ src/deparse.c: In function 'deparseTargetList': src/deparse.c:811:28: error: incompatible types when initializing type 'Form_pg_attribute' {aka 'struct FormData_pg_attribute '} using type 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'} Form_pg_attribute attr = tupdesc->attrs[i - 1]; ^~~ src/deparse.c: In function 'deparseAnalyzeSql': src/deparse.c:1125:24: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'}) if (tupdesc->attrs[i]->attisdropped) ^~ In file included from /usr/pgsql-11/include/server/postgres.h:46, from src/deparse.c:52: src/deparse.c:1133:38: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'}) colname = NameStr(tupdesc->attrs[i]->attname); ^~ /usr/pgsql-11/include/server/c.h:576:25: note: in definition of macro 'NameStr'define NameStr(name) ((name).data)
src/deparse.c: In function 'deparseColumnRef': src/deparse.c:1202:13: warning: implicit declaration of function 'get_relid_attribute_name'; did you mean 'get_rte_attribute_name'? [-Wimplicit-function-declaration] colname = get_relid_attribute_name(rte->relid, varattno); ^: src/deparse.o] Error 1
make[1]: Waiting for unfinished jobs....
src/tds_fdw.c: In function 'tdsGetColumnMetadata':
src/tds_fdw.c:1395:72: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'})
column->attr_oid = festate->attinmeta->tupdesc->attrs[local_ncol]->atttypid;
^~
src/tds_fdw.c:1404:65: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'})
local_name = festate->attinmeta->tupdesc->attrs[local_ncol]->attname.data;
^~
src/tds_fdw.c:1417:72: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'})
column->attr_oid = festate->attinmeta->tupdesc->attrs[local_ncol]->atttypid;
^~
src/tds_fdw.c:1443:63: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'})
column->attr_oid = festate->attinmeta->tupdesc->attrs[ncol]->atttypid;
^~
In file included from /usr/pgsql-11/include/server/postgres.h:47,
from src/tds_fdw.c:32:
src/tds_fdw.c:1461:47: error: invalid type argument of '->' (have 'FormData_pg_attribute' {aka 'struct FormData_pg_attribute'})
festate->attinmeta->tupdesc->attrs[ncol]->attname.data)
^~
/usr/pgsql-11/include/server/utils/elog.h:107:14: note: in definition of macro 'ereport_domain'
errfinish rest; \
^~~~
src/tds_fdw.c:1457:5: note: in expansion of macro 'ereport'
ereport(WARNING,
^: src/tds_fdw.o] Error 1
src/deparse.c:698:10: warning: implicit declaration of function 'format_type_with_typemod_qualified' is invalid in C99 [-Wimplicit-function-declaration]
return format_type_with_typemod_qualified(type_oid, typemod);
^
src/deparse.c:698:10: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'char ' [-Wint-conversion]
return format_type_with_typemod_qualified(type_oid, typemod);
^
~~~~~~~ get_rte_attribute_name src/deparse.c:1202:11: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] colname = get_relid_attribute_name(rte->relid, varattno); ^ make[1]: [~~ make[1]: ** [~~~~~~~~~~~~ src/deparse.c:811:21: error: initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *') with an expression of incompatible type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute'); take the address with & Form_pg_attribute attr = tupdesc->attrs[i - 1]; ^~~~~~ & src/deparse.c:1125:24: error: member reference type 'FormData_pg_attribute' (aka 'struct FormData_pg_attribute') is not a pointer; did you mean to use '.'? if (tupdesc->attrs[i]->attisdropped)