postgrespro / rum

RUM access method - inverted index with additional information in posting lists
Other
727 stars 54 forks source link

src/rum.h:794:2: error: unknown type name ‘RBTNode’ with PostgreSQL 10.12 #80

Closed matrix07012 closed 3 weeks ago

matrix07012 commented 4 years ago

Hello,

I'm trying to install RUM on Ubuntu 18.04.4 to PostgreSQL 10.12 and I'm getting this error when using the command 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 -Wno-format-truncation -g -g -O2 -fdebug-prefix-map=/build/postgresql-10-QwtiCa/postgresql-10-10.12=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/10/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/rumsort.o src/rumsort.c
In file included from src/rumsort.c:28:0:
src/rum.h:794:2: error: unknown type name ‘RBTNode’
  RBTNode  rbnode;
  ^~~~~~~
<builtin>: recipe for target 'src/rumsort.o' failed
make: *** [src/rumsort.o] Error 1

I tried changing the line 788 in rum.h to #if PG_VERSION_NUM <= 100006 || PG_VERSION_NUM >= 100012 just to see what it does and it gives these warnings when I run 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 -Wno-format-truncation -g -g -O2 -fdebug-prefix-map=/build/postgresql-10-QwtiCa/postgresql-10-10.12=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/10/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/rumbulk.o src/rumbulk.c
src/rumbulk.c: In function ‘rumInitBA’:
src/rumbulk.c:118:16: warning: implicit declaration of function ‘rbt_create’; did you mean ‘rb_create’? [-Wimplicit-function-declaration]
  accum->tree = rbt_create(sizeof(RumEntryAccumulator),
                ^~~~~~~~~~
                rb_create
src/rumbulk.c:118:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  accum->tree = rbt_create(sizeof(RumEntryAccumulator),
              ^
src/rumbulk.c: In function ‘rumInsertBAEntry’:
src/rumbulk.c:174:31: warning: implicit declaration of function ‘rbt_insert’; did you mean ‘rb_insert’? [-Wimplicit-function-declaration]
  ea = (RumEntryAccumulator *) rbt_insert(accum->tree, (RBTNode *) &eatmp,
                               ^~~~~~~~~~
                               rb_insert
src/rumbulk.c:174:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ea = (RumEntryAccumulator *) rbt_insert(accum->tree, (RBTNode *) &eatmp,
       ^
src/rumbulk.c: In function ‘rumBeginBAScan’:
src/rumbulk.c:284:2: warning: implicit declaration of function ‘rbt_begin_iterate’; did you mean ‘rb_begin_iterate’? [-Wimplicit-function-declaration]
  rbt_begin_iterate(accum->tree, LeftRightWalk, &accum->tree_walk);
  ^~~~~~~~~~~~~~~~~
  rb_begin_iterate
src/rumbulk.c: In function ‘rumGetBAEntry’:
src/rumbulk.c:306:34: warning: implicit declaration of function ‘rbt_iterate’; did you mean ‘rb_iterate’? [-Wimplicit-function-declaration]
  entry = (RumEntryAccumulator *) rbt_iterate(&accum->tree_walk);
                                  ^~~~~~~~~~~
                                  rb_iterate
src/rumbulk.c:306:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  entry = (RumEntryAccumulator *) rbt_iterate(&accum->tree_walk);
          ^
SilentWalker commented 4 years ago

same problem
git checkout 1.1.0 fixed