Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
2.98k stars 90 forks source link

[BUG] build-fzf-tab-module fails with "conflicting types for ‘boolcodes’" #451

Open h4-n1 opened 3 days ago

h4-n1 commented 3 days ago

Firstly: I've just discovered this plugin - it's incredible. Thank you so much for your work!

Describe the bug

build-fzf-tab-module fails due to "conflicting types for ‘boolcodes’; have ‘char *[]’". This looks like it's caused by /usr/include/term.h, which is owned by the package ncurses 6.5-3.

I can make sure:

To Reproduce

Run build-fzf-tab-module on an Arch Linux system with ncurses 6.5-3 installed.

Environment:

Log

# [...truncated...]
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o signals.o signals.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o signames.o signames.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o sort.o sort.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o string.o string.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o subst.o subst.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o text.o text.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o utils.o utils.c
gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o openssh_bsd_setres_id.o openssh_bsd_setres_id.c
make[3]: Entering directory '/home/hani/.local/share/zsh/plugins/fzf-tab/modules/zsh/5.9/Src/Builtins'
gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o rlimits.o rlimits.c
gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o sched.o sched.c
make[3]: Leaving directory '/home/hani/.local/share/zsh/plugins/fzf-tab/modules/zsh/5.9/Src/Builtins'
make[3]: Entering directory '/home/hani/.local/share/zsh/plugins/fzf-tab/modules/zsh/5.9/Src/Modules'
gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o datetime.o datetime.c
gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o langinfo.o langinfo.c
gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o parameter.o parameter.c
gcc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o termcap.o termcap.c
termcap.c:45:14: error: conflicting types for ‘boolcodes’; have ‘char *[]’
   45 | static char *boolcodes[] = {
      |              ^~~~~~~~~
In file included from ../../Src/zshterm.h:1,
                 from ../../Src/zsh_system.h:932,
                 from ../../Src/zsh.mdh:15,
                 from termcap.mdh:15,
                 from termcap.c:38:
/usr/include/term.h:783:56: note: previous declaration of ‘boolcodes’ with type ‘const char * const[]’
  783 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
      |                                                        ^~~~~~~~~
make[3]: *** [Makefile:230: termcap.o] Error 1
make[3]: Leaving directory '/home/hani/.local/share/zsh/plugins/fzf-tab/modules/zsh/5.9/Src/Modules'
make[2]: *** [Makemod:372: modobjs] Error 1
make[2]: Leaving directory '/home/hani/.local/share/zsh/plugins/fzf-tab/modules/zsh/5.9/Src'
make[1]: *** [Makefile:449: modobjs] Error 2
make[1]: Leaving directory '/home/hani/.local/share/zsh/plugins/fzf-tab/modules/zsh/5.9/Src'
make: *** [Makefile:188: all] Error 1
The module building has failed. See the output above for details.