make USE_PGXS=1 compile error
michaelwang opened this issue · comments
Hi masahiko
I followed readme in the project to install the extension, but I met below error,
what PG version are you using? At present I have tried 16, 15, 14, but all of them reports below error.
Thanks for advance.
michael@mars:~/.../pgroad$ sudo make USE_PGXS=1
[sudo] michael のパスワード:
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -ggdb -Og -g3 -fno-omit-frame-pointer -DUSE_VALGRIND -fPIC -I. -I./ -I/home/michael/projects/postgres/build/include/server -I/home/michael/projects/postgres/build/include/internal -D_GNU_SOURCE -c -o skiplist_table.o skiplist_table.c
skiplist_table.c: In function ‘skiplist_create_for_rel’:
skiplist_table.c:213:92: warning: passing argument 14 of ‘index_create’ makes integer from pointer without a cast [-Wint-conversion]
213 | collationIds, opclassIds, NULL, coloptions, (Datum) 0,
| ^~~~~~~~~~
| |
| int16 * {aka short int *}
In file included from skiplist_table.c:14:
/home/michael/projects/postgres/build/include/server/catalog/index.h:82:56: note: expected ‘Datum’ {aka ‘long unsigned int’} but argument is of type ‘int16 *’ {aka ‘short int *’}
82 | Datum reloptions,
| ~~~~~~^~~~~~~~~~
skiplist_table.c:214:94: warning: passing argument 19 of ‘index_create’ makes pointer from integer without a cast [-Wint-conversion]
214 | INDEX_CREATE_IS_PRIMARY, 0, true, true, NULL);
| ^~~~
| |
| int
In file included from skiplist_table.c:14:
/home/michael/projects/postgres/build/include/server/catalog/index.h:87:55: note: expected ‘Oid *’ {aka ‘unsigned int *’} but argument is of type ‘int’
87 | Oid *constraintId);
| ~~~~~^~~~~~~~~~~~
skiplist_table.c:207:23: error: too many arguments to function ‘index_create’
207 | skip_idxoid = index_create(skip_rel, skip_idxname, InvalidOid, InvalidOid,
| ^~~~~~~~~~~~
In file included from skiplist_table.c:14:
/home/michael/projects/postgres/build/include/server/catalog/index.h:69:17: note: declared here
69 | extern Oid index_create(Relation heapRelation,
| ^~~~~~~~~~~~
make: *** [<ビルトイン>: skiplist_table.o] エラー 1
Hi,
Thank you for trying to use this extension and reporting the issue.
I've just pushed the fixes and it now should be able to work with PG16 and PG17. Since PG17 is still under development, other compile errors could happen again due to API changes. But you can use pgroad with the current PG17 at least.
Thanks for your reply and fixing the compile error.
I think it's a good start for me to get hands on PG.