LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2014, 03:24 AM   #1
sargurus
LQ Newbie
 
Registered: Apr 2014
Posts: 13

Rep: Reputation: Disabled
Error : While building a ixgbe-3.19.1 driver in CentOS 6.5


I got error ,while building a e1000e-driver( ixgbe-3.19.1 )in src directory using make install command,however i installed kernel-devel and kernel headers packages.

[root@Linux ixgbe-3.19.1]# ls
COPYING ixgbe.7 ixgbe.spec pci.updates README scripts src SUMS
[root@Linux ixgbe-3.19.1]# cd src/
[root@Linux src]# make install
Makefile:84: *** Kernel header files not in any of the expected locations.
Makefile:85: *** Install the appropriate kernel development package, e.g.
Makefile:86: *** kernel-devel, for building kernel modules and try again. Stop.
[root@Linux src]#

My current verison of machine is :
**********************************
[root@Linux ixgbe-3.19.1]# !modinfo
modinfo ixgbe | grep versio
version: 3.15.1-k
srcversion: A333AC564E95CA461F3205A
vermagic: 2.6.32-431.5.1.el6.i686 SMP mod_unload modversions 686
[root@bara-4 ixgbe-3.19.1]#


I installed following kernel packages.
yum install kernel-devel
yum install kernel-headers
yum install kernel-PAE-devel
yum install kernel-syms
yum groupinstall "Development Tools"

I'm not able to build this source code in cent os 6.5 version.is this expected behaviour ?

Thanks
Saravanan
 
Old 04-02-2014, 09:32 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
.. installed kernel-devel and kernel headers packages.
.
.
is this expected behaviour ?
Yes. You forgot this : # yum install kernel kernel-devel

I.e. the kernel and kernel-devel must be the same versions.
** Do a reboot, and the new kernel / kernel-devel can be used.


-

Last edited by knudfl; 04-02-2014 at 09:34 AM.
 
Old 04-02-2014, 10:04 AM   #3
sargurus
LQ Newbie
 
Registered: Apr 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hi knudfl.,
I am new to the linux,kindly tell me where i'm doing wrong.However i installed kernel-devel

[root@Linuxe1000e-2.3.2]# yum install kernel-devel
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Setting up Install Process
Package kernel-devel-2.6.32-431.11.2.el6.i686 already installed and latest version
Nothing to do
[root@bara-4 src]# yum install kernel-headers
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: virror.hanoilug.org
* extras: centos.excellmedia.net
* updates: mirror.nhanhoa.com
Setting up Install Process
Package kernel-headers-2.6.32-431.11.2.el6.i686 already installed and latest version
Nothing to do
[root@bara-4 src]#
[root@bara-4 e1000e-2.3.2]# which kernel-devel-2.6.32-431.11.2.el6.i686
/usr/bin/which: no kernel-devel-2.6.32-431.11.2.el6.i686 in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

[root@bara-4 e1000e-2.3.2]# locate kernel-devel-2.6.32-431.11.2.el6.i686
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
[root@bara-4 e1000e-2.3.2]#

[root@bara-4 e1000e-2.3.2]# cd src
[root@bara-4 src]# make install
Makefile:76: *** Kernel header files not in any of the expected locations.
Makefile:77: *** Install the appropriate kernel development package, e.g.
Makefile:78: *** kernel-devel, for building kernel modules and try again. Stop.
[root@bara-4 src]#

I saw the makefile and find that Searching KSP but its this path can't able to find the kernel headers that's what i got error it seems.

KSP := /lib/modules/$(BUILD_KERNEL)/build \
/lib/modules/$(BUILD_KERNEL)/source \
/lib/modules/$(BUILD_KERNEL)-default/build \
/usr/src/linux-$(BUILD_KERNEL) \
/usr/src/linux-$($(BUILD_KERNEL) | sed 's/-.*//') \
/usr/src/kernel-headers-$(BUILD_KERNEL) \
/usr/src/kernel-source-$(BUILD_KERNEL) \
/usr/src/linux-$($(BUILD_KERNEL) | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/') \
/usr/src/linux

# prune the list down to only values that exist
# and have an include/linux sub-directory
test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
KSP := $(foreach dir, $(KSP), $(test_dir))

# we will use this first valid entry in the search path
ifeq (,$(KSRC))
KSRC := $(firstword $(KSP))
endif

ifeq (,$(KSRC))
$(warning *** Kernel header files not in any of the expected locations.)
$(warning *** Install the appropriate kernel development package, e.g.)
$(error kernel-devel, for building kernel modules and try again)

How to find kernel header file ?

Thanks
Saravanan

Thanks
Saravanan

Last edited by sargurus; 04-02-2014 at 10:09 AM.
 
Old 04-02-2014, 10:58 AM   #4
sargurus
LQ Newbie
 
Registered: Apr 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
I removed kernel-devel and headers and installed what was kernel version.
[root@Linux src]# rpm -qa | grep kernel-devel
kernel-devel-2.6.32-431.5.1.el6.centos.plus.i686
[root@Linux src]# uname -a
Linux Cent-os 2.6.32-431.5.1.el6.i686 #1 SMP Tue Feb 11 21:56:33 UTC 2014 i686 i686 i386 GNU/Linux
[root@Linux src]# locate kernel-devel-2.6.32-431.5.1.el6.centos.plus.i686
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
[root@Linux src]# rpm -qa | grep kernel-headers
kernel-headers-2.6.32-431.5.1.el6.centos.plus.i686
[root@Linux src]#
After patching kernel-devel and kernel-headers are installed,same error i got.
[root@bara-4 src]# make install
Makefile:76: *** Kernel header files not in any of the expected locations.
Makefile:77: *** Install the appropriate kernel development package, e.g.
Makefile:78: *** kernel-devel, for building kernel modules and try again. Stop.
[root@bara-4 src]#

Removed Log:
************
[root@Linux e1000e-2.3.2]# locate kernel-devel-2.6.32-431.11.2.el6.i686
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
[root@Linux e1000e-2.3.2]# whereis kernel-devel-2.6.32-431.11.2.el6.i686
kernel-devel-2.6.32-431.11.2.el6:
[root@Linux e1000e-2.3.2]# which kernel-devel-2.6.32-431.11.2.el6.i686
/usr/bin/which: no kernel-devel-2.6.32-431.11.2.el6.i686 in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@Linux e1000e-2.3.2]# locate -b '\kernel-devel-2.6.32-431.11.2.el6.i686'
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
[root@Linux e1000e-2.3.2]#
[root@Linux e1000e-2.3.2]# find . -name kernel-devel-2.6.32-431.11.2.el6.i686\*
[root@Linux e1000e-2.3.2]# which kernel-devel-2.6.32-431.11.2.el6.i686
/usr/bin/which: no kernel-devel-2.6.32-431.11.2.el6.i686 in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@Linux e1000e-2.3.2]# yum install kernel-devel
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Setting up Install Process
Package kernel-devel-2.6.32-431.11.2.el6.i686 already installed and latest version
Nothing to do
[root@Linux e1000e-2.3.2]# which kernel-devel-2.6.32-431.11.2.el6.i686
/usr/bin/which: no kernel-devel-2.6.32-431.11.2.el6.i686 in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@Linux e1000e-2.3.2]# locate kernel-devel-2.6.32-431.11.2.el6.i686
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
[root@Linux e1000e-2.3.2]# cd src
[root@Linux src]# make install
Makefile:76: *** Kernel header files not in any of the expected locations.
Makefile:77: *** Install the appropriate kernel development package, e.g.
Makefile:78: *** kernel-devel, for building kernel modules and try again. Stop.
[root@Linux src]# vi Makefile +76
[root@Linux src]# yum install kernelheaders
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: virror.hanoilug.org
* extras: mirror.nbrc.ac.in
* updates: mirror.nhanhoa.com
Setting up Install Process
No package kernelheaders available.
Error: Nothing to do
[root@Linux src]# yum install kernel-headers
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* base: virror.hanoilug.org
* extras: centos.excellmedia.net
* updates: mirror.nhanhoa.com
Setting up Install Process
Package kernel-headers-2.6.32-431.11.2.el6.i686 already installed and latest version
Nothing to do
[root@Linux src]# rpm -qa | grep kernel-headers
kernel-headers-2.6.32-431.11.2.el6.i686
[root@Linux src]# uname -a
Linux Linux 2.6.32-431.5.1.el6.i686 #1 SMP Tue Feb 11 21:56:33 UTC 2014 i686 i686 i386 GNU/Linux
[root@Linux src]# rpm -qa | grep kernel-devel
kernel-devel-2.6.32-431.11.2.el6.i686
[root@Linux src]# yum remove kernel-headers-2.6.32-431.11.2.el6.i686
Loaded plugins: fastestmirror, presto
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-headers.i686 0:2.6.32-431.11.2.el6 will be erased
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.132.el6.i686
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.132.el6.i686
--> Running transaction check
---> Package glibc-headers.i686 0:2.12-1.132.el6 will be erased
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.132.el6.i686
--> Processing Dependency: glibc-headers = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.i686
--> Running transaction check
---> Package glibc-devel.i686 0:2.12-1.132.el6 will be erased
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-4.el6.i686
--> Running transaction check
---> Package gcc.i686 0:4.4.7-4.el6 will be erased
--> Processing Dependency: gcc = 4.4.4 for package: libtool-2.2.6-15.5.el6.i686
--> Processing Dependency: gcc for package: systemtap-devel-2.3-4.el6_5.i686
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-c++-4.4.7-4.el6.i686
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-gfortran-4.4.7-4.el6.i686
--> Processing Dependency: gcc for package: systemtap-devel-2.3-4.el6_5.i686
--> Running transaction check
---> Package gcc-c++.i686 0:4.4.7-4.el6 will be erased
---> Package gcc-gfortran.i686 0:4.4.7-4.el6 will be erased
---> Package libtool.i686 0:2.2.6-15.5.el6 will be erased
---> Package systemtap-devel.i686 0:2.3-4.el6_5 will be erased
--> Processing Dependency: systemtap-devel = 2.3-4.el6_5 for package: systemtap-2.3-4.el6_5.i686
--> Running transaction check
---> Package systemtap.i686 0:2.3-4.el6_5 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================== ==================================================================================================== ====================================
Package Arch Version Repository Size
==================================================================================================== ==================================================================================================== ====================================
Removing:
kernel-headers i686 2.6.32-431.11.2.el6 @updates 2.5 M
Removing for dependencies:
gcc i686 4.4.7-4.el6 @base 15 M
gcc-c++ i686 4.4.7-4.el6 @base 10 M
gcc-gfortran i686 4.4.7-4.el6 @base 11 M
glibc-devel i686 2.12-1.132.el6 @base 953 k
glibc-headers i686 2.12-1.132.el6 @base 2.1 M
libtool i686 2.2.6-15.5.el6 @base 1.9 M
systemtap i686 2.3-4.el6_5 @updates 46 k
systemtap-devel i686 2.3-4.el6_5 @updates 5.0 M

Transaction Summary
==================================================================================================== ==================================================================================================== ====================================
Remove 9 Package(s)

Installed size: 49 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : gcc-gfortran-4.4.7-4.el6.i686 1/9
Erasing : systemtap-2.3-4.el6_5.i686 2/9
Erasing : systemtap-devel-2.3-4.el6_5.i686 3/9
Erasing : libtool-2.2.6-15.5.el6.i686 4/9
Erasing : gcc-c++-4.4.7-4.el6.i686 5/9
Erasing : gcc-4.4.7-4.el6.i686 6/9
Erasing : glibc-devel-2.12-1.132.el6.i686 7/9
Erasing : glibc-headers-2.12-1.132.el6.i686 8/9
Erasing : kernel-headers-2.6.32-431.11.2.el6.i686 9/9
Verifying : glibc-devel-2.12-1.132.el6.i686 1/9
Verifying : gcc-c++-4.4.7-4.el6.i686 2/9
Verifying : gcc-4.4.7-4.el6.i686 3/9
Verifying : glibc-headers-2.12-1.132.el6.i686 4/9
Verifying : libtool-2.2.6-15.5.el6.i686 5/9
Verifying : kernel-headers-2.6.32-431.11.2.el6.i686 6/9
Verifying : systemtap-2.3-4.el6_5.i686 7/9
Verifying : gcc-gfortran-4.4.7-4.el6.i686 8/9
Verifying : systemtap-devel-2.3-4.el6_5.i686 9/9

Removed:
kernel-headers.i686 0:2.6.32-431.11.2.el6

Dependency Removed:
gcc.i686 0:4.4.7-4.el6 gcc-c++.i686 0:4.4.7-4.el6 gcc-gfortran.i686 0:4.4.7-4.el6 glibc-devel.i686 0:2.12-1.132.el6 glibc-headers.i686 0:2.12-1.132.el6 libtool.i686 0:2.2.6-15.5.el6 systemtap.i686 0:2.3-4.el6_5
systemtap-devel.i686 0:2.3-4.el6_5

Complete!
[root@Linux src]# rpm -qa | grep kernel-devel
kernel-devel-2.6.32-431.11.2.el6.i686
[root@Linux src]# yum remove kernel-devel-2.6.32-431.11.2.el6.i686
Loaded plugins: fastestmirror, presto
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.i686 0:2.6.32-431.11.2.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================== ==================================================================================================== ====================================
Package Arch Version Repository Size
==================================================================================================== ==================================================================================================== ====================================
Removing:
kernel-devel i686 2.6.32-431.11.2.el6 @updates 24 M

Transaction Summary
==================================================================================================== ==================================================================================================== ====================================
Remove 1 Package(s)

Installed size: 24 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : kernel-devel-2.6.32-431.11.2.el6.i686 1/1
Verifying : kernel-devel-2.6.32-431.11.2.el6.i686 1/1

Removed:
kernel-devel.i686 0:2.6.32-431.11.2.el6

Complete!
[root@Linux src]#
 
Old 04-02-2014, 11:29 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Read post #2 : You were not supposed to remove anything !

Please do : # yum install kernel kernel-headers

"kernel" : To make sure you have the latest = same version as kernel-devel.
"kernel-headers" : Has nothing to do with "building a driver".
But "no kernel-headers" will prevent gcc from working.
* 'kernel-headers' are the headers that were used at the glibc build.
And glibc-devel depends on kernel-headers.

!!! You will have to reinstall the "tool chain" (9 packages) that you removed :
# yum install gcc-c++
! And you will have to install kernel-devel too.
That's the package with the headers for building a driver.

P.S. : Why are you buiding e1000e ? Should be present by default.

-

Last edited by knudfl; 04-02-2014 at 11:33 AM.
 
Old 04-03-2014, 08:01 AM   #6
sargurus
LQ Newbie
 
Registered: Apr 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hi knudfl,

Thank you,it really worked here.I builds e1000e Driver
I installed following packages.
1.yum install kernel kernel-headers
2.yum install gcc-c++
3.yum install kernel-devel

I reboot the box and I can able to Builds the e1000e-3.0.4 driver & didn't get any error.
P.S. : Why are you buiding e1000e ? Should be present by default.
Yes You are correct it's default e1000e driver its there.I am doing some workaround here vlan tagged packet is stripped,For Detail kindly see the below link
http://www.linuxquestions.org/questi...22#post5145122
so I downloaded e1000e drivers tried to build drivers cause above problem came(kernel devel and kernel headers).we got some clue from this link
https://www.mail-archive.com/e1000-d.../msg09044.html
Some changes in kcompat.h,it will allow vlan tagged packets,For that i am building a e1000e-3.0.4 driver and rebuild it.
However,not able to see the vlan tagged packets,i don't know why ?

Before building e1000e driver:
******************************
[root@bara-4 src]# modinfo e1000e | grep version
version: 2.3.2-k
srcversion: 563EA4FD2E6BC29211E792F
vermagic: 2.6.32-431.5.1.el6.i686 SMP mod_unload modversions 686

After Building e1000e-3.0.4 driver:
************************************

[root@bara-4 src]# modinfo e1000e | grep ver
filename: /lib/modules/2.6.32-431.11.2.el6.i686/kernel/drivers/net/e1000e/e1000e.ko
version: 3.0.4-NAPI
description: Intel(R) PRO/1000 Network Driver
srcversion: EDD1479A006BB2BE1D99FBF
vermagic: 2.6.32-431.11.2.el6.i686 SMP mod_unload modversions 686
[root@bara-4 src]#


and one more doubt is
Yesterday when i see e1000e driver i got 2.3.42 using modinfo but in ethtool i got below same output after update e1000e.(It Showing correctly in modinfo )

[root@bara-4 src]# ethtool -i eth1
driver: e1000e
version: 2.3.2-k
firmware-version: 2.1-2
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
[root@bara-4 src]#


Thanks
Saravanan
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Make Error (wireless realtek driver) (centos 6.3) humming777 Linux - Laptop and Netbook 1 10-08-2012 01:30 PM
CentOS --Makefile error installing Engenius EUB9706 driver vinylone Linux - Wireless Networking 8 10-13-2011 06:50 AM
RedHat: Created extra netdev in ixgbe driver; but cannot ping on its interface zman2245 Linux - Kernel 2 01-11-2010 01:57 PM
Problems with ixgbe and ioatdma intel drivers sergxm Linux - Networking 1 09-11-2009 02:42 PM
Strangeness (or pilot error) building network driver modules cacheout Fedora 0 07-27-2004 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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