LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-14-2007, 09:56 PM   #1
ecbrow1
LQ Newbie
 
Registered: Nov 2005
Distribution: Fedora Six
Posts: 15

Rep: Reputation: 0
kernel compile problem


I'm trying to install a wireless card to my FC4 box.
So I have ndiswrapper 1.3.4. Can't install ndiswrapper until I have some sources files in /usr/kernel. So I grabbed a source online (kernel.org, 2.6.19).

I untarred everything, and went to the directory and tried

'make config'

but that died.

looks like the gcc-version.sh script is dying at lines 11 and 12 with an error message that says 'command not found'.

Another line says HOSTCC scripts/basic/fixdep

/bin/sh: gcc: command not found.

I did an RPM -q to make sure gcc is there (it is)

First thing I'm going to do is check my path and try again.

If that doesn't work, I'm going to edit that script and point it to where my gcc is.


Am I missing a step or totally off the mark here?

Thanks
 
Old 01-15-2007, 12:33 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
As far as I know, the kernel config and compilation steps are:

1. Unpack the kernel in /usr/src/linux
2. Make clean
3. Make mrproper
4. Make menuconfig or make xconfig
5. Make all
6. Make modules_install
7. Make install

Maybe you should do make menuconfig or make xconfig instead of thust make config?
 
Old 01-15-2007, 02:28 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Oops! mistake.

Last edited by Junior Hacker; 01-15-2007 at 03:02 AM.
 
Old 01-15-2007, 02:32 AM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Sorry people, I just realized you are using tar source, my opologies.

Please don't send any goons my way.

Last edited by Junior Hacker; 01-15-2007 at 02:37 AM.
 
Old 01-15-2007, 02:42 PM   #5
ecbrow1
LQ Newbie
 
Registered: Nov 2005
Distribution: Fedora Six
Posts: 15

Original Poster
Rep: Reputation: 0
make is failing right when I run it. Errors out at line 11 and 12. Here's the script:
Code:
#!/bin/sh
#
# gcc-version gcc-command
#
# Prints the gcc version of `gcc-command' in a canonical 4-digit form
# such as `0295' for gcc-2.95, `0303' for gcc-3.3, etc.
#

compiler="$*"

MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
printf "%02d%02d\\n" $MAJOR $MINOR

Last edited by ecbrow1; 01-15-2007 at 02:45 PM.
 
Old 01-16-2007, 03:29 AM   #6
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
What version of GCC are you using to attempt to do the compile?
 
Old 01-17-2007, 03:21 PM   #7
ecbrow1
LQ Newbie
 
Registered: Nov 2005
Distribution: Fedora Six
Posts: 15

Original Poster
Rep: Reputation: 0
I'm using gcc 4.0
 
Old 01-18-2007, 03:44 AM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Here is the instructions from linmodems.org on proper compiling kernel headers needed for compiling modem drivers, not sure but I believe the .config part may be a step you need also, as I said "not sure" but may be relevant. This example relates to my system and kernel as it was produced by a script called scanModem, many other .txt files were created.


Configuration of the kernel-source is where almost all the Mistakes occur!!!
Here is a way to do it correctly (but read through EXCEPTIONAL CASES below).
1)Within kernel-source/ folder, browse the README file for general guidance.
It will relate that the command:
# make mrproper
cleans up leftovers from any previous usage .dot-files and the include/linux/ folder.
Additionally you may need to do an edit within Makefile, but ONLY that 4th line.
2) If necessary to edit, FIRST make a backup:
cp Makefile Makefile.backup
then edit ONLY the 4th line of Makefile to match the EXTRAVERSION of 2.6.18-1.2869.fc6
EXTRAVERSION = -
NEVER change anything else within the Makefile.

3) Set the dependencies of the current kernel.
For SuSE 9.0 and later, there is a command which does the following steps
# make cloneconfig && make dep
Also browse the excellent README.SuSE in the kernel-source/ folder
For other Distros, the following steps are necessary, within the kernel-source/ folder
copy the kernel-config file to .config
and DO SPECIFY that " . "
But where is it? For many Distros, it will be the file like
/boot/config-2.6.18-1.2869.fc6
matching the output of:
uname -r
Or it may be the target of a symbolic link: /boot/config -->
So
cp /boot/config-2.6.18-1.2869.fc6 .config
For SuSE 8.0 and earlier versions it is:
cp /boot/vmlinuz.config .config
PLEASE do not omit that "." in .config as it is crucially necessary.
View .config with a text browser.
It is simply a listing of the code components used in the kernel and its modules:
#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
# CONFIG_SBUS is not set
CONFIG_UID16=y
etc.

4) The .config file will be read during
# make oldconfig
which feeds its specifications through a process specifying
the SAME inter-dependencies previously used in compiling your kernel,
and may generate additional .dot-config files . They can be displayed with:
# ls -al

5) Though it may be redundant after "make mrproper", it will do no harm to:
make clean
5a) For the SuSe Linux versions 8.0 and previous , there will exist files:
/boot/vmlinuz.autoconf.h
/boot/vmlinuz.version.h
They MUST be copied as:
cp /boot/vmlinuz.autoconf.h /usr/src/linux/include/linux/autoconf.h
cp /boot/vmlinuz.version.h /usr/src/linux/include/linux/version.h

6) Now build kernel-headers with:
make dep
for 2.4.n kernels or for 2.6.n kernels
make bzImage
during which you can walk your dog, take a shower, have tea, etc.
7) Check for resultant FileNames.h with:
ls include/linux/
and
cat include/linux/version.h
to verify the version.

COMPILING the MODEM DRIVERS can now finally be done.
Unpack the compiler kit for your modem drivers,
cd into its folder, read any README or INSTALL files,
make clean
FINALLY, your modem drivers will compiled by a command like
make OR make ModuleName
or perhaps
make all
During this process, some of the kernel-header code with be joined
with the supplied modem specific code, and ModemDrivers.o will be produced.
Follow and further instructions in the modem code resource
to install the drivers, often with:
make install

Last edited by Junior Hacker; 01-18-2007 at 03:48 AM.
 
Old 01-18-2007, 04:38 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Here is some more (easy and clear) reading -- but only if you read german :

http://de.gentoo-wiki.com/Kernel_manuell_kompilieren
http://www.thomashertweck.de/kernel26.html#umgang
 
  


Reply

Tags
compile error, kernel



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
kernel Compile problem kudos Fedora 1 09-30-2005 07:39 PM
kernel compile problem ^kossu Debian 1 03-01-2005 08:57 AM
2.6.6 kernel compile problem lamnk Linux - General 14 06-07-2004 01:13 PM
kernel compile problem masand Linux - General 2 08-23-2003 10:18 AM
Problem with compile kernel bush Linux - General 5 07-10-2003 05:30 AM

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

All times are GMT -5. The time now is 06:05 PM.

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