thjbdvlt commented on PR #1452:
URL: https://github.com/apache/age/pull/1452#issuecomment-1934036660

   hello :-)
   
   i have tried while looking for a way to use `OR` (bar) operator in Cypher 
queries, as i mentionned [here](https://github.com/apache/age/issues/865).
   
   but i couldn't compile. here is the output of `make` after i have `gh pr 
checkout 1452` from inside AGE directory:
   
   ```
   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 
-g -O2 -fstack-protector-strong -Wformat -Werror=format-security 
-fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ 
-I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal  
-Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o 
src/backend/parser/cypher_label_expr.o src/backend/parser/cypher_label_expr.c
   src/backend/parser/cypher_label_expr.c: In function 
‘get_label_expr_relations’:
   src/backend/parser/cypher_label_expr.c:263:9: error: a label can only be 
part of a statement and a declaration is not a statement
     263 |         List *reloids;
         |         ^~~~
   src/backend/parser/cypher_label_expr.c:264:9: error: expected expression 
before ‘List’
     264 |         List *(*merge_lists)(List *, const List *);
         |         ^~~~
   src/backend/parser/cypher_label_expr.c:265:9: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     265 |         ListCell *lc;
         |         ^~~~~~~~
   src/backend/parser/cypher_label_expr.c:281:9: error: ‘merge_lists’ 
undeclared (first use in this function)
     281 |         merge_lists = label_expr_type == LABEL_EXPR_TYPE_AND ?
         |         ^~~~~~~~~~~
   src/backend/parser/cypher_label_expr.c:281:9: note: each undeclared 
identifier is reported only once for each function it appears in
   src/backend/parser/cypher_label_expr.c:321:27: warning: implicit declaration 
of function ‘merge_lists’ [-Wimplicit-function-declaration]
     321 |                 reloids = merge_lists(reloids, lcd->allrelations);
         |                           ^~~~~~~~~~~
   src/backend/parser/cypher_label_expr.c:321:25: warning: assignment to ‘List 
*’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     321 |                 reloids = merge_lists(reloids, lcd->allrelations);
         |                         ^
   src/backend/parser/cypher_label_expr.c: In function ‘label_expr_relname’:
   src/backend/parser/cypher_label_expr.c:385:9: error: a label can only be 
part of a statement and a declaration is not a statement
     385 |         StringInfo relname_strinfo;
         |         ^~~~~~~~~~
   src/backend/parser/cypher_label_expr.c:386:9: error: expected expression 
before ‘ListCell’
     386 |         ListCell *lc;
         |         ^~~~~~~~
   src/backend/parser/cypher_label_expr.c:387:9: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     387 |         char *relname;
         |         ^~~~
   In file included from /usr/include/postgresql/15/server/access/tupdesc.h:19,
                    from /usr/include/postgresql/15/server/utils/relcache.h:17,
                    from /usr/include/postgresql/15/server/access/genam.h:21,
                    from src/backend/parser/cypher_label_expr.c:3:
   src/backend/parser/cypher_label_expr.c:394:18: error: ‘lc’ undeclared (first 
use in this function)
     394 |         foreach (lc, label_expr->label_names)
         |                  ^~
   /usr/include/postgresql/15/server/nodes/pg_list.h:356:5: note: in definition 
of macro ‘foreach’
     356 |    (cell = &cell##__state.l->elements[cell##__state.i], true) : \
         |     ^~~~
   /usr/include/postgresql/15/server/nodes/pg_list.h:356:55: warning: left-hand 
operand of comma expression has no effect [-Wunused-value]
     356 |    (cell = &cell##__state.l->elements[cell##__state.i], true) : \
         |                                                       ^
   src/backend/parser/cypher_label_expr.c:394:9: note: in expansion of macro 
‘foreach’
     394 |         foreach (lc, label_expr->label_names)
         |         ^~~~~~~
   /usr/include/postgresql/15/server/nodes/pg_list.h:357:16: warning: left-hand 
operand of comma expression has no effect [-Wunused-value]
     357 |    (cell = NULL, false); \
         |                ^
   src/backend/parser/cypher_label_expr.c:394:9: note: in expansion of macro 
‘foreach’
     394 |         foreach (lc, label_expr->label_names)
         |         ^~~~~~~
   make: *** [<commande interne> : src/backend/parser/cypher_label_expr.o] 
Erreur 1
   ```
   
   here is the output of `psql --version`: 
   
   ```
   psql (PostgreSQL) 15.5 (Debian 15.5-1.pgdg110+1)
   ```
   
   i am running postgresql 15 on Debian 11 bullseye, installed with these 
debian apt packages:
   ```
   postgresql-client-15 
   postgresql-15 
   postgresql-server-dev-15 
   libpq-dev
   ```
   
   i have tried on these PG15 branchs of AGE (for both, in META.JSON file, the 
version is said to be `1.3.0`):
   
   ```
   git clone --branch PG15 https://github.com/apache/age
   git clone --branch PG15/v1.5.0-rc0 https://github.com/apache/age .
   ```
   
   it's probably meaningless but to make AGE compile, i had to install two deps 
from debian: `bison` and `flex`.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to