Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build 0.82 release #308

Closed
chenrui333 opened this issue Aug 28, 2024 · 3 comments
Closed

failed to build 0.82 release #308

chenrui333 opened this issue Aug 28, 2024 · 3 comments

Comments

@chenrui333
Copy link

👋 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 ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
    +++ |+#include <stdio.h>
      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 ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
     38 | #  include <readline/tilde.h>
    +++ |+#include <stdio.h>
     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
Copy link
Owner

msteveb commented Aug 28, 2024

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
Copy link
Owner

msteveb commented Aug 28, 2024

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
Copy link
Author

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 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants