bison - Nap6.4 for tcl fails to install and make due to "conflicted types for Nap_parse" -
i need install nap6.4, fails "error: conflicting types nap_parse". have dockerfile include "add ./nap6_4_0src.tar.gz /usr/local" , usr/local/nap/unix type:
./configure --prefix=/usr/local && make && make install
i have installed proj4, hdf4 , netcdf using same approach. have tried other versions of nap, give same error. have spent last days trying modify files under nap/generic, of them generated bison , there m4 files there. recognize error , know how fix it? highly appreciated!
here error message:
cc -c -dpackage_name=\"\" -dpackage_tarname=\"\" -dpackage_version=\"\" - dpackage_string=\"\" -dpackage_bugreport=\"\" -dstdc_headers=1 -dhave_sys_types_h=1 -dhave_sys_stat_h=1 -dhave_stdlib_h=1 -dhave_string_h=1 -dhave_memory_h=1 -dhave_strings_h=1 -dhave_inttypes_h=1 -dhave_stdint_h=1 -dhave_unistd_h=1 -duse_tcl_stubs=1 -duse_tk_stubs=1 -dhave_unistd_h=1 -disnan64=isnan -dversion=\"6.4\" -dpatchlevel=\".0\" -i`echo /build/nap/generic` -i`echo /usr/local/include` -i`echo /usr/local/include` -i`echo /usr/local/include` -i`echo /lib/activetcl-8.6/include` -o -d__no_string_inlines -d__no_math_inlines -fpic `echo /build/nap/generic/eval_tree.c` in file included /build/nap/generic/eval_tree.c:16:0: /build/nap/generic/napparse.tab.h:79:5: error: conflicting types 'nap_parse' int nap_parse (void); ^ in file included /build/nap/generic/eval_tree.c:14:0: /build/nap/generic/nap.h,m4:610:13: note: previous declaration of nap_parse here extern int nap_parse(void *nap_param); /* defined in napparse.y */ ^ make: *** [eval_tree.o] error 1
additionally, other errors:
napparse.tab.c:2122:46: error: macro "nap_error" passed 2 arguments, takes 1 /usr/local/nap/generic/napparse.tab.c:65:25: error: 'nap_error' undeclared (first use in function) #define yyerror nap_error ^ napparse.tab.c:2122:7: note: in expansion of macro 'yyerror' /usr/local/nap/generic/napparse.tab.c:65:25: note: each undeclared identifier reported once each function appears in #define yyerror nap_error ^
and
make: *** no rule make target `netcdf.h', needed `nap_get.o'.
i suspect latter 1 along other similar errors because tried
./configure --prefix=/lib/activetcl8.6
any ideas of goes wrong here?
the source code nap6.4 old, , seems expect particular range of versions of bison. it's bison new fit range.
in particular, lines 28 , 29 of napparse.y
:
#define yyparse_param nap_param #define yylex_param nap_param
will not have effect if bison v2.7 or more recent. macros deprecated in 2002, , in 2012 removed generated code. define
s have no effect.
also, in line 36:
%pure_parser
i think may still accepted has been deprecated long time, too.
with modern bison, want delete 3 lines, , (where %pure_parser
declaration used be), insert following:
%define api.pure full %param { void* nap_param }
if version of bison not quite up-to-date, might complain %param
line, in case use:
%define api.pure full %parse-param { void* nap_param } %lex-param { void* nap_param }
you need correct definition of nap_error
, find in file generic/nap_check.h
@ line 194. definition should read:
#define nap_error(nap_param, message) \ nap_check(nap_param, __file__, __line__, message)
current bison
scanners add parameter specified in %parse-param
call error function, need change prototype of macro accept parameter rather picking environment.
if works, might want file bug report, although not @ clear me maintaining software.
Comments
Post a Comment