Open EOSIT opened 6 years ago
Have you tried building it from a git clone? I have got this to work with 9.6 and 10.1 by making sure that the PATH is set to pick up the appropriate version of pg_config. Are you stuck on 9.5?
Any solution to this? Got the same error
I believe that if you compile HEAD against PostgreSQL 9.6 or more recent, it will build and work correctly. If you must stay on an earlier revision, then one can try to backport the missing macros e.g.
ALLOCSET_SMALL_MINSIZE, ALLOCSET_SMALL_INITSIZE, ALLOCSET_SMALL_MAXSIZE
However, I did not try to do this so I don't know if it can work. I have had no problems at all with building and using the extension with 10.1
pjjH
compiling from source (via git clone) actually fixes the issue. thanks!
I also had trouble installing using pgxn. I tried building from master on this repo but got some errors.
Ubuntu:9.6 PostgreSQL:11.1
errors on make
:
(venv) root@2f4138288daf:/tmp/multi/Multi/Multicorn# make
Python version is 2.7
[ -d sql ] || mkdir sql
[ -d src ] || mkdir src
touch directories.stamp
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 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/python2.7 -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 src/errors.o src/errors.c
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 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/python2.7 -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 src/python.o src/python.c
src/python.c: In function ‘getColumnsFromTable’:
src/python.c:462: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 att = desc->attrs[i];
^~~~
src/python.c: In function ‘pythonDictToTuple’:
src/python.c:1217: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 = slot->tts_tupleDescriptor->attrs[i];
^~~~
src/python.c: In function ‘pythonSequenceToTuple’:
src/python.c:1266: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 = slot->tts_tupleDescriptor->attrs[i];
^~~~
src/python.c: In function ‘tupleTableSlotToPyObject’:
src/python.c:1661: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];
^~~~~~~
<builtin>: recipe for target 'src/python.o' failed
make: *** [src/python.o] Error 1
After a successful
sudo apt install pgxnclient
, I triedsudo pgxn install multicorn
and got this error: