make menuconfig with ncursesw in /usr/local
Roberto A. Foglietta
roberto.foglietta at gmail.com
Thu Aug 19 08:03:16 UTC 2021
Il giorno gio 19 ago 2021 alle ore 09:09 Bernhard Reutner-Fischer <
rep.dot.nop at gmail.com> ha scritto:
> On Thu, 19 Aug 2021 03:12:17 +0200
> "Roberto A. Foglietta" <roberto.foglietta at gmail.com> wrote:
>
> > Hi all,
> >
> > I want to compile menuconfig with ncursesw in /usr/local{lib,include}
> >
> > I found HOSTCFLAGS that can help me with -I/usr/local/include but I did
> > not found anything useful for the linker. Could you help me, please?
>
> Did you try HOSTLDFLAGS ?
>
Hi Bernhard,
the problem arises because there is no pkg-config installed and the
libraries are in /usr/local/{lib, include}.
With pkg-config installed or libraries linked in /usr/{lib, include}
everything is fine without any specific flag.
I have tried at first attempt but it did not work, I have also tried to
found a patch
make HOSTCFLAGS='-I/usr/local/include/ncursesw'
HOSTLDFLAGS='-L/usr/local/lib' -C src menuconfig
make: Entering directory '/mnt/sdb4/tinycore-editor/busybox/src'
HOSTLD -L/usr/local/lib scripts/kconfig/lxdialog/lxdialog
/usr/local/bin/ld: scripts/kconfig/lxdialog/checklist.o: in function
`print_item':
checklist.c:(.text+0x40): undefined reference to `wmove
the result is the same with and without this patch that helped me to show
the command.
--- src/scripts/Makefile.host.orig
+++ src/scripts/Makefile.host
@@ -105,7 +105,7 @@
# Link an executable based on list of .o files, all plain c
# host-cmulti -> executable
-quiet_cmd_host-cmulti = HOSTLD $@
+quiet_cmd_host-cmulti = HOSTLD $(HOSTLDFLAGS) $@
cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
$(addprefix $(obj)/,$($(@F)-objs)) \
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
@@ -121,7 +121,7 @@
# Link an executable based on list of .o files, a mixture of .c and .cc
# host-cxxmulti -> executable
-quiet_cmd_host-cxxmulti = HOSTLD $@
+quiet_cmd_host-cxxmulti = HOSTLD $(HOSTLDFLAGS) $@
cmd_host-cxxmulti = $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \
$(foreach o,objs cxxobjs,\
$(addprefix $(obj)/,$($(@F)-$(o)))) \
--- src/scripts/kconfig/lxdialog/check-lxdialog.sh.orig
+++ src/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -8,7 +8,7 @@
pkg-config --libs ncurses 2>/dev/null && exit
for ext in so a dll.a dylib ; do
for lib in ncursesw ncurses curses ; do
- $cc -print-file-name=lib${lib}.${ext} | grep -q /
+ $cc ${HOSTCFLAGS} ${HOSTLDFLAGS} -print-file-name=lib${lib}.${ext} | grep
-q /
if [ $? -eq 0 ]; then
echo "-l${lib}"
exit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20210819/1f52f248/attachment.html>
More information about the busybox
mailing list