LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   error building kernel 2.6.36 (https://www.linuxquestions.org/questions/linux-general-1/error-building-kernel-2-6-36-a-841855/)

vonbiber 11-02-2010 05:22 AM

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

GrapefruiTgirl 11-02-2010 05:41 AM

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.

bathory 11-02-2010 06:51 AM

Hi,

Check kernel's .config and make sure you have:
Code:

CONFIG_CROSS_COMPILE=""
Regards

vonbiber 11-02-2010 08:43 AM

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.

vonbiber 11-03-2010 08:34 AM

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)

bathory 11-03-2010 08:51 AM

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

vonbiber 11-03-2010 09:44 AM

Quote:

Originally Posted by bathory (Post 4148012)
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

slugman 01-05-2011 09:34 PM

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.

enouf 02-05-2011 07:07 AM

Quote:

Originally Posted by slugman (Post 4214700)
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


All times are GMT -5. The time now is 11:21 AM.