-1

I was following the guide here and when I tried running make menuconfig it said

Unable to find the ncurses libraries or the required header files.
'make menuconfig' requires the ncurses libraries.
Install ncurses (ncurses-devel) and try again

ncurses-devel doesn't exist on the AUR though. I tried reinstalling ncurses but it still wouldn't work. It does work when working on the Linux kernel. Also I do want to compile a 64 bit version so I don't think that I would need a 32 bit version of ncurses.

Edit: I have given up on this I don't really need to do it anyways.

11
  • Apparently Arch does not package development headers & libraries into separate -dev or -devel packages, like many other distributions do, so just having ncurses installed should suffice. If you can successfully run make menuconfig or make nconfig on the Linux kernel, that would support the theory that your ncurses actually works and the build process of busybox is somehow looking for it in the wrong place. Commented Jan 27 at 4:47
  • make menuconfig doesn't work and make nconfig gives the error make[1]: *** No rule to make target 'nconfig'. Stop. make: *** [Makefile:444: nconfig] Error 2 Commented Jan 27 at 4:49
  • Are you talking about the Linux kernel source directory (which should have both menuconfig and nconfig Make targets) or busybox's source directory (which has menuconfig only if I recall correctly)? Commented Jan 27 at 4:50
  • I am talking about busybox. The linux kernel has no problem compiling and make menuconfig works there. busybox is the issue Commented Jan 27 at 4:51
  • Then your ncurses seems to be correctly installed and the problem is probably that the Busybox build procedure is looking at a wrong place. See if you can add some ./configure options to tell it where ncurses actually is. Commented Jan 27 at 4:53

2 Answers 2

1

Unfortunately Busybox's make menuconfig does not produce a log of its actions, so you'll need to dig a bit deeper to figure out exactly where the process goes wrong.

The error message seems to be the one produced by busybox-1.34.1/scripts/kconfig/lxdialog/check-lxdialog.sh. It is a fairly short script that tests for the presence of ncurses library and its programming headers. It seems to prefer ncursesw (= ncurses with support for >8-bit character sets) over regular ncurses, and will accept classic curses if it's the only one available.

You'll have to run essentially the same tests the script does, and see which of them are successful and which are not. The script redirects error messages to /dev/null, but you don't want to do that here - you'll want to see the exact error message.

Here are simplified command-line equivalents of the tests the check-lxdialog.sh script does.

One or both of the following commands should output some compiler options and exit without an error. Try them:

pkg-config --libs --cflags ncursesw
pkg-config --libs --cflags ncurses

Some or all of the following commands should display a full pathname of the ncurses library file:

cc -print-file-name=libncursesw.so
cc -print-file-name=libncursesw.a
cc -print-file-name=libncurses.so
cc -print-file-name=libncurses.a
cc -print-file-name=libcurses.so
cc -print-file-name=libcurses.a

(The script also tests for library filename suffixes .dll.a and .dylib, but these would seem to be for non-Linux systems, I left them out.)

Also, there should be a file named ncurses.h or curses.h at one of these locations:

ls -l /usr/include/*curses.h /usr/include/ncursesw/*curses.h /usr/include/ncurses/*curses.h

Please run all the commands above, and edit your question to add the resulting output to it. These tests cover the script's ldflags() and ccflags() functions; if their results seem normal, there's one more test to run, but I need the answers from the above tests before I can write a version of it that's suitable for running on the command line.

0

There's a simple issue in check-lxdialog.sh at line 50. It's making up a tiny c program and then trying to compile it. It always fails and reports ncurses as missing, unless you add "int" so main is defined as a function returning int, IOW make line 50 below say "int main", as shown:

# Check if we can link to ncurses
check() {
        $cc -x c - -o $tmp 2>/dev/null <<'EOF'
#include CURSES_LOC
int main() {}
EOF
    if [ $? != 0 ]; then
        echo " *** Unable to find the ncurses libraries or the"       1>&2
        echo " *** required header files."                            1>&2
        echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
        echo " *** "                                                  1>&2
        echo " *** Install ncurses (ncurses-devel) and try again."    1>&2
        echo " *** "                                                  1>&2
        exit 1
    fi
}

Credit where it's due: I learned this by following the link here, then the second link given in a post by "seth", to this post which gives the exact fix:

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.