msteveb / jimtcl

Official repository of Jim Tcl, an open-source, small footprint implementation of Tcl
http://jim.tcl.tk/
Other
445 stars 123 forks source link

failed to build 0.82 release #308

Closed chenrui333 closed 2 months ago

chenrui333 commented 2 months ago

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log ``` In file included from /home/linuxbrew/.linuxbrew/include/readline/readline.h:36, from jim-readline.c:37: /home/linuxbrew/.linuxbrew/include/readline/rltypedefs.h:71:29: error: unknown type name ‘FILE’ 71 | typedef int rl_getc_func_t (FILE *); | ^~~~ /home/linuxbrew/.linuxbrew/include/readline/rltypedefs.h:1:1: note: ‘FILE’ is defined in header ‘’; did you forget to ‘#include ’? +++ |+#include 1 | /* rltypedefs.h -- Type declarations for readline functions. */ gcc-11 -fPIC -I. -fno-unwind-tables -fno-asynchronous-unwind-tables -DUSE_UTF8 -DHAVE_OPENPTY -O2 -Wall -D_GNU_SOURCE -c jim-signal.c -o jim-signal.o In file included from jim-readline.c:37: /home/linuxbrew/.linuxbrew/include/readline/readline.h:450:21: error: unknown type name ‘FILE’ 450 | extern int rl_getc (FILE *); | ^~~~ /home/linuxbrew/.linuxbrew/include/readline/readline.h:39:1: note: ‘FILE’ is defined in header ‘’; did you forget to ‘#include ’? 38 | # include +++ |+#include 39 | #endif /home/linuxbrew/.linuxbrew/include/readline/readline.h:591:8: error: unknown type name ‘FILE’ 591 | extern FILE *rl_instream; | ^~~~ /home/linuxbrew/.linuxbrew/include/readline/readline.h:592:8: error: unknown type name ‘FILE’ 592 | extern FILE *rl_outstream; | ^~~~ /home/linuxbrew/.linuxbrew/include/readline/readline.h:623:8: error: unknown type name ‘rl_getc_func_t’ 623 | extern rl_getc_func_t *rl_getc_function; | ^~~~~~~~~~~~~~ /home/linuxbrew/.linuxbrew/include/readline/readline.h:954:3: error: unknown type name ‘FILE’ 954 | FILE *inf; | ^~~~ /home/linuxbrew/.linuxbrew/include/readline/readline.h:955:3: error: unknown type name ‘FILE’ 955 | FILE *outf; | ^~~~ make: *** [Makefile:61: jim-readline.o] Error 1 make: *** Waiting for unfinished jobs.... ```

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10600259415/job/29377601524?pr=182751 relates to Homebrew/homebrew-core#182751

msteveb commented 2 months ago

Interesting. Debian patches readline.h to include stdio.h (seems like a bug that is missing since it refers to FILE) - https://sources.debian.org/patches/readline/8.2-5/rl-header.diff/

I guess homebrew is building it's own version without this patch. We can work around it by including stdio.h in jim-readline.c but it still seems like a readline bug to me.

msteveb commented 2 months ago

Also, while you are there. It is no longer necessary to specify --full, --utf8, --math as these are the default. And it is probably not correct to include --maintainer.

chenrui333 commented 2 months ago

Also, while you are there. It is no longer necessary to specify --full, --utf8, --math as these are the default. And it is probably not correct to include --maintainer.

yeah, I can remove the obsolete options, for --maintainer I dont why we have it in the first place :)

feel free to drop a PR 🙏