Open hoxnox opened 2 years ago
Does #16 (comment) help?
Unfortunately, no. The problem is not in that warning. But may be below. I don't know yacc, so it's very hard for me to understand the root of the problem.
bison -y -d common/sub/expr_gram.y
common/sub/expr_gram.y:52.19-24: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
52 | %type <lv_number> NUMBER expr
| ^~~~~~
sed -e 's/[yY][yY]/sub_expr_gram_/g' y.tab.c > \
common/sub/expr_gram.yacc.c
sed -e 's/[yY][yY]/sub_expr_gram_/g' y.tab.h > \
common/sub/expr_gram.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -I. -c common/sub/expr_gram.yacc.c
y.tab.c: In function 'sub_expr_gram_parse':
y.tab.c:147:29: error: called object is not a function or function pointer
y.tab.c:1324:7: note: in expansion of macro 'sub_expr_gram_error'
y.tab.c:147:29: error: called object is not a function or function pointer
y.tab.c:1435:3: note: in expansion of macro 'sub_expr_gram_error'
make: *** [Makefile:769: common/sub/expr_gram.yacc.o] Error 1
There are many such problems. They all connected with yyerror:
bison -y -d cook/hashline.y
cook/hashline.y:867.21-33: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
867 | %type <lv_word> HASHLINE_WORD
| ^~~~~~~~~~~~~
sed -e 's/[yY][yY]/hashline_/g' y.tab.c > cook/hashline.yacc.c
sed -e 's/[yY][yY]/hashline_/g' y.tab.h > cook/hashline.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -I. -c cook/hashline.yacc.c
cook/hashline.y:79:24: error: 'parse_error' redeclared as different kind of symbol
79 | #define yyerror parse_error
| ^~~~
y.tab.c:919:5: note: in expansion of macro 'hashline_error'
In file included from cook/hashline.y:52:
./cook/lex.h:49:6: note: previous declaration of 'parse_error' with type 'void(char *)'
49 | void parse_error(char *);
| ^~~~~~~~~~~
y.tab.c:943: warning: "hashline_error" redefined
cook/hashline.y:79: note: this is the location of the previous definition
79 | #define yyerror parse_error
|
y.tab.c: In function 'hashline_parse':
y.tab.c:943:24: error: called object is not a function or function pointer
y.tab.c:2173:7: note: in expansion of macro 'hashline_error'
y.tab.c:943:24: error: called object is not a function or function pointer
y.tab.c:2284:3: note: in expansion of macro 'hashline_error'
make: *** [Makefile:1871: cook/hashline.yacc.o] Error 1
Looks like this part makes some evil because of mess YY and yy.
common/sub/expr_gram.yacc.c common/sub/expr_gram.yacc.h: \
common/sub/expr_gram.y
$(YACC) -d common/sub/expr_gram.y
sed -e 's/[yY][yY]/sub_expr_gram_/g' y.tab.c > \
common/sub/expr_gram.yacc.c
sed -e 's/[yY][yY]/sub_expr_gram_/g' y.tab.h > \
common/sub/expr_gram.yacc.h
rm y.tab.c y.tab.h
I've build statically linked binaries for Linux: https://github.com/hoxnox/cook/releases/download/v2.35/cook-2.35.tar.gz you can attach them to the release
I just attempted a build on a fresh install of Ubuntu 22.04. "make" fails exactly as described in the initial issue submission above.
The build succeeds on Ubuntu 20.04
I applied the FIX to Makefile.in by "hoxnox" and the build succeeds on both 20.04 and 22.04. The tests "make sure" succeed and fail the same on both systems. I was able to "cook" my project on the 22.04
I don't know what to do with this. Can anybody point the root of the problem?