LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-02-2010, 05:22 AM   #1
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
error building kernel 2.6.36


I tried to build linux-2.6.36 but I got this
error message
Code:
/usr/src/linux-2.6.36/scripts/gcc-version.sh: line 25: ngcc: command not found
/usr/src/linux-2.6.36/scripts/gcc-version.sh: line 26: ngcc: command not found
make: ngcc: Command not found
/bin/sh: ngcc: command not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
Has anybody encountered the same problem?
I looked into gcc-version.sh but the problem is located
somewhere else
I thought at first one of the files might have been corrupted
and I downloaded the archive again.

I must also say that this happened in different versions
of slackware (the distro I use): 12.0, 12.1, 12.2, 13.0, 13.1
 
Old 11-02-2010, 05:41 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I have never seen nor heard of this problem before your thread. I have been running 2.6.36 for a couple weeks now, on Slackware64-current. I started with Slack 11.0.

Also I just grepped the kernel source tree for "ngcc" and came up empty, so not sure where that's coming from. Somewhere in your environment?

Not a solution, but: to eliminate the possibility of corrupted files in the kernel archive, you should be using the GPG and/or md5 checksum on your kernel archives when you download them.

Good luck with this - I'll be interested to learn where that's coming from.
 
Old 11-02-2010, 06:51 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Check kernel's .config and make sure you have:
Code:
CONFIG_CROSS_COMPILE=""
Regards
 
Old 11-02-2010, 08:43 AM   #4
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Original Poster
Rep: Reputation: 129Reputation: 129
bathory,

I started out by copying the current
Code:
cp /boot/config-$(uname -r) /usr/src/linux-2.6.36/.config
make oldconfig
...
Anyway,

Code:
grep CONFIG_CROSS_COMPILE config-2.6.36 
CONFIG_CROSS_COMPILE="n"
I'll try what you said ("", instead of no) and see
what happens

GrapefruiTgirl,

I did a grep too and I know that it doesn't come from
the first script shell (getversion-info.sh)

I always download the kernel via wget and if
Code:
echo $?
displays 0, it's usually reliable.
 
Old 11-03-2010, 08:34 AM   #5
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Original Poster
Rep: Reputation: 129Reputation: 129
thanks bathory,
Code:
CONFIG_CROSS_COMPILE=""
did the trick
although I still get the message '... ngcc: command not found'
(but instead of stopping right there, the building proceeds
normally)
 
Old 11-03-2010, 08:51 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Glad to see it worked.
I guess that you still get the error because you didn't clean your sources. Make a backup of .config and run "make mrpropper". After that put .config back and see if it compiles without the error.

Cheers
 
Old 11-03-2010, 09:44 AM   #7
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Original Poster
Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by bathory View Post
I guess that you still get the error because you didn't clean your sources. Make a backup of .config and run "make mrpropper".
That must be it.
Because I first started building on slax with a fresh source tree.
That's when I did the building on slackware that I noticed the
message.

Thanks again
 
1 members found this post helpful.
Old 01-05-2011, 09:34 PM   #8
slugman
Member
 
Registered: Jun 2010
Location: AZ
Distribution: Slackware
Posts: 106

Rep: Reputation: 1
thanks

I want to thank you guys for this discussion. I was at work trying to kick of 2.6.36.2 compilation when I encountered the exact same error:

Code:
 make: ngcc: Command not found
Bathory's solution allowed me to successfully compile w/o error.

Out of curiosity, isn't setting

Code:
CONFIG_CROSS_COMPILE="N"
technically the correct way to define this option? Setting this option to N is what triggered this error in the first place. What gives?

By the way, running mrproper did not fix the above error, it simply removes the .config file. Leaving the cross_compile option empty is the way to go.
 
Old 02-05-2011, 07:07 AM   #9
enouf
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by slugman View Post
I want to thank you guys for this discussion. I was at work trying to kick of 2.6.36.2 compilation when I encountered the exact same error:

Code:
 make: ngcc: Command not found
Bathory's solution allowed me to successfully compile w/o error.

Out of curiosity, isn't setting

Code:
CONFIG_CROSS_COMPILE="N"
technically the correct way to define this option? Setting this option to N is what triggered this error in the first place. What gives?

By the way, running mrproper did not fix the above error, it simply removes the .config file. Leaving the cross_compile option empty is the way to go.
Hi;
1st posting here;
Compiling 2.6.37 (vanilla kernel.org sources) i received same exact error as original poster[1] -- the 'n' comes from the "string" entry n that's at the CONFIG_CROSS_COMPILE= option, (General Setup >) in make menuconfig; hence the "ngcc" in the error message, so...

Clearing that string makes all go well -- it's not a Yes/No/Module option, it's a string entered value, should one want to enter one -- no idea why it defaulted to =n, as i ran make oldconfig from a 2.6.32 .config.

Make sure you copy your .config, once altered to /somewhere/safe/ (Backup) .. *then* run make mrproper, and re-copy back the .config into src/ build dir.

Hope this helps

[1]
Actually, exact errors were;$ make
Code:
Build/linux-2.6.37/linux-2.6.37/scripts/gcc-version.sh: line 25: ngcc: command not found
/Build/linux-2.6.37/linux-2.6.37/scripts/gcc-version.sh: line 26: ngcc: command not found
/Build/linux-2.6.37/linux-2.6.37/arch/x86/Makefile:81: stack protector enabled but no compiler support
make: ngcc: Command not found
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      kernel/bounds.s
/bin/sh: ngcc: command not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
That stack protector error doesn't seem to be an issue either now, however i haven't looked into the cause, and kernel is compiling ok for now

Last edited by enouf; 02-05-2011 at 07:12 AM. Reason: alteration, additional info
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while building the kernel module saurin Linux - Kernel 6 10-15-2010 02:28 PM
Error building Mandriva Kernel GlennsPref Linux - Kernel 5 04-26-2010 06:03 AM
error building nvidia kernel module beeblequix Debian 1 10-07-2005 05:21 PM
Error while building kernel linuxboy69 Linux - Software 10 08-26-2004 12:09 PM
VMware module building kernel error ^^ ZoNicONE Linux - Newbie 3 09-09-2003 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:31 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