I have ncurses installed in /opt/ncurses/5.9-1/, when I issue "make menuconfig" in busybox 1.22.1, I get this error: HOSTCC scripts/kconfig/lxdialog/checklist.o In file included from scripts/kconfig/lxdialog/checklist.c:24:0: scripts/kconfig/lxdialog/dialog.h:31:20: fatal error: curses.h: No such file or directory compilation terminated. make[2]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1 make[1]: *** [menuconfig] Error 2 make: *** [menuconfig] Error 2 I try to set CFLAGS but it had no effect: export CFLAGS="-I/opt/ncurses/5.9-1/include/ncurses -DCURSES_LOC=<ncurses.h>" make menuconfig ... same error I changed busybox-1.22.1/scripts/kconfig/lxdialog/Makefile like this: HOST_EXTRACFLAGS += -DLOCALE -I/opt/ncurses/5.9-1/include/ncurses HOST_LOADLIBES += -ltinfo -lncurses -L/opt/ncurses/5.9-1/lib/ And in dialog.h I have to change #include CURSES_LOC to: #include <ncurses.h> Now it compiles lxdialog binary, and I can see busybox ncurses configuration screens. In busybox-1.22.1/scripts/kconfig/lxdialog/Makefile, there is -ccflags instead of -cflags, I'm not sure if that is the problem, I tried to change it but it didn't help. I don't know why -DCURSES_LOC=<ncurses.h> doesn't work either, I have to change it in dialog.h. Bug: "make menuconfig" should accept CFLAGS and LDFLAGS.
(In reply to comment #0) > I have ncurses installed in /opt/ncurses/5.9-1/ Why do you do that?
> > I have ncurses installed in /opt/ncurses/5.9-1/ > Why do you do that? So that I can have multiple versions installed and easily switch between them.
Try HOSTCFLAGS
> Try HOSTCFLAGS export HOSTCFLAGS=-I/opt/ncurses/5.9-1/include/ncurses make menuconfig > curses.h: No such file or directory But it is there: $ ls /opt/ncurses/5.9-1/include/ncurses/curses.h /opt/ncurses/5.9-1/include/ncurses/curses.h
This works for me: make HOSTCFLAGS=... menuconfig
> make HOSTCFLAGS=... menuconfig Yes, this helped with including ncurses, but now I have problem at linking stage. How do I pass "-L/opt/ncurses/5.9-1/lib -lncurses" ?
HOST_LOADLIBES
(In reply to comment #7) > HOST_LOADLIBES This one finds ncurses, but fails on linking: $ make HOSTCFLAGS=-I/opt/ncurses/5.9-1/include/ncurses menuconfig This one doesn't find ncurses: $ make HOSTCFLAGS=-I/opt/ncurses/5.9-1/include/ncurses HOST_LOADLIBES="-L/opt/ncurses/5.9-1/lib -ltinfo -lncurses" menuconfig What is entire make command?