LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2007, 02:15 PM   #1
GamerX
Member
 
Registered: Nov 2006
Location: Vancouver, BC
Distribution: Slackware
Posts: 102

Rep: Reputation: Disabled
can't "make menuconfig" as non-root, ncurses not found


I tried googling and searching the forums but didn't find anything relevant, my apologies if this is a duplicate.

When I do this
Code:
# cd /usr/src/linux-2.6.18.8/
# make menuconfig
...
this works no problem (as root)

But the following happens
Code:
$ cd /usr/src/linux-2.6.18.8/
$ make menuconfig
 *** Unable to find the ncurses libraries.
 *** make menuconfig require the ncurses libraries
 ***
 *** Install ncurses (ncurses-devel) and try again
 ***
make[2]: *** [scripts/kconfig/lxdialog/dochecklxdialog] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2
as a regular user, I can however just "make config".

Distro: Slackware 11 (slackware-current actually); I tried reinstalling the distro provided package ncurses-5.6-i486-1.tgz to no avail.
I've only recently learned that it's not kosher to build the kernel as root, haven't had any catastrophes from the process (that's ok, wouldn't be the first time I nuked my system) but seems that the 'legit' way is not working.

Any ideas?

P.S. Should this maybe be posted in my distro's forum instead??
 
Old 04-06-2007, 02:45 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Yeah, I think this might be more of a Slackware issue than a kernel issue. You aren't really getting an error building the kernel as such, your system is just failing to find the correct library.

That is definitely an odd problem. Unless your user account somehow has it's PATH variables screwed up, I don't see how this could happen. I assume other ncurses programs fail with the same error?
 
Old 04-06-2007, 03:18 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
I can't say about slack, but on Debian we need: libncurses5-dev. You might try make clean and/or make mrproper as root and then try make menuconfig again as a user. You might need to add "src" to the user's groups.
 
Old 04-06-2007, 04:10 PM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
There is only one ncurses package in Slackware (which he has the proper version of), and no "src" group. He shouldn't have to do anything special to run menuconfig, if ncurses is installed it should work for any user.
 
Old 04-06-2007, 04:38 PM   #5
GamerX
Member
 
Registered: Nov 2006
Location: Vancouver, BC
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: Disabled
Hmm this seems to have fixed the problem (not sure why I haven't tried it before hmm...)
Code:
# cd /usr/src/linux-2.6.18.8/
# cp ./.config ../kernel.2.6.18.8.config
# make clean
# make mrproper
# cp ../kernel.2.6.18.8.config ./.config
(I don't know how many times I've forgotten to backup the config heh...)
Also I recursively chgrp'ed /usr/linux-2.6.18.6 to "users" (was group=root) and give (recursive) rw access to the group. (am I a bad person in any way for doing this last step?)
 
Old 04-06-2007, 05:02 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"Also I recursively chgrp'ed /usr/linux-2.6.18.6 to "users" (was group=root) and give (recursive) rw access to the group. (am I a bad person in any way for doing this last step?)"

YES. One hundred lashes with a wet noodle for your transgression! Seriously, though, I've borked things up in the past to the point that I had to do a chown -R to fix them. I'm not so sure that it's a good idea to give rw access to the group for everything. OTOH, what does it matter in the real world?

Glad you got it working!
 
Old 04-07-2007, 03:48 AM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Moved: This thread is more suitable in the Slackware forum and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-07-2007, 09:36 AM   #8
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
For the Slackware kernel packages, it's actually most kosher to do stuff as root in the /usr/src directory. When you snatch a kernel on your own, it's your choice, but Linus likes people unpacking the kernel into their home directory and building there.

There's already been a big long thread about this, but I personally dislike Linus' approach and prefer the Slackware way because I hate having the kernel linking into my home directory, I feel it should be in a more generic place. Once you've built, installed, and run the kernel, you can never delete the sources to clean things up, because out-of-tree kernel modules depend on the sources sticking around.
 
Old 08-23-2009, 11:26 PM   #9
sixerjman
Member
 
Registered: Sep 2004
Distribution: Debian Testing / Unstable
Posts: 180
Blog Entries: 1

Rep: Reputation: 32
The reason for this error is the process tries to determine the location

of 'ncurses.h' by compiling a short program inline. The Makefile for
menuconfig invokes '/usr/src/linux-source-2.6.26/scripts/kconfig/lxdialog/check-lxdialog.sh', which contains the following:

Code:
# Check if we can link to ncurses
check() {
        $cc -xc - -o $tmp 2>/dev/null <<'EOF'
#include CURSES_LOC
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
}
Because the normal permissions for every subdirectory under '/usr/src' are root owned and read only for non-root, the compile fails and the
error message is issued.
 
1 members found this post helpful.
Old 08-24-2009, 09:05 AM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
As already advised, that's a permissions error. That aside, YDIW. Don't alter the kernel sources provided with Slackware. Copy them to somewhere else, then do a "chown -R youruser:users" on that directory.
 
Old 08-12-2012, 06:30 AM   #11
marbangens
Member
 
Registered: Aug 2012
Location: sweden
Distribution: Slackware, Fedora
Posts: 118

Rep: Reputation: Disabled
my solution

Okej I know is an old thread but if someone read this now like me..
I wanna share what I found. This is also my first post on LQ.

I found that the ncurses-5.9-x86_64-1.txz package installed
libncursesw.so.5.9 and libncurses.so.5.9 in /lib64 .

the header /usr/include/ncurses/ncurses.h don't handle the path for the lib files I mentioned above. the make script did in isdn4k-utils.v3.1pre1 and linux
3.0.40 had it fix withe the fixdep script.

I did symlinks in /lib from /lib64's libncurses files and the make config i isdn4k-utils work so it can be good ide to look how the checking for the lib files is done in makefile or so to...

Now I don't know how to fix this properly. Because I'm writhing my first slackbuild script and don't want to mess up the system but keep it clean and simple.

the packages is recommended from Linus in his dependencies list. I will use the isdn on this machine.
 
Old 11-15-2017, 04:52 AM   #12
knb
LQ Newbie
 
Registered: Sep 2004
Location: Bangalore, India
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 1
A solution

(yes i know, it's 2017! :-) )

The real issue, as I see it, is within the kbuild/scripts/kconfig/lxdialog/check-lxdialog.sh shell script:

[...]
# Temp file, try to clean up after us
tmp=.lxdialog.tmp <--- HERE !!
trap "rm -f $tmp" 0 1 2 3 15

# Check if we can link to ncurses
check() {
$cc -xc - -o $tmp 2>/dev/null <<'EOF'
#include CURSES_LOC
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
}
[...]


The 'tmp' file location (for the temporary C source file), is possibly in a root-only writeable location (like /usr/src);
as GamerX has already pointed out in fact.
So, I just change the variable like so:

## KaiwanNB: make the 'tmp' C code in a world-writeable location; else, only
## when root does it show success (as the kbuild/ folder may be in a root-only
## writeable location (like /usr/...).
tmp=/tmp/.lxdialog.tmp


Now it works! -even / esp when you attempt to compile as non-root.
 
Old 11-15-2017, 01:10 PM   #13
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
GamerX - I think you would benefit greatly from reading Alien Bob's (Eric's) slackdoc on kernel building located --- H E R E --- .

I realize the hardcore GUI haters begrudgingly accede to make menuconfig but if one really wants to understand kernel options make xconfig offers lessons in the form of having a 3-boxed window so one can see the header, the option, and the specific help content in most cases. Not only does the help file inform you of safe decisions, it often explains what that option is for and if it needs other options activated or deactivated.

The above linked blog also notes performance boosters and simplifications that you will likely find interesting and useful.
 
Old 11-15-2017, 03:03 PM   #14
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by enorbet View Post
Not only does the help file inform you of safe decisions, it often explains what that option is for and if it needs other options activated or deactivated.
Not that I'm questioning the benefits of using xconfig, but under menuconfig, doesn't the help menu under the item provide the same explanation that xconfig does? It just requires going to another screen, which may not be as simple as viewing it in another panel.
 
Old 11-15-2017, 04:52 PM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
You are feeding a thread opened more than 10.5 years ago by GamerX who last posted on LQ more than 7 years ago...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
does "make menuconfig" affect whether kernel is 32 or 64 bit? humbletech99 Linux - General 3 05-19-2006 05:27 PM
Is it possible to use "make menuconfig" ONLY for new options after a Kernel upgrade ? nasty_daemon Linux - General 9 09-08-2005 11:21 AM
Errors Trying to "make menuconfig" kernel-source-2.6.10 Royle Debian 2 02-14-2005 06:53 AM
Slack 9.1 & "make menuconfig" options bawbag Slackware 3 10-08-2003 02:49 AM
debian woody: error at "make menuconfig" Lingo Linux - Newbie 3 11-29-2002 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration