LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-14-2009, 09:11 PM   #1
pgb205
Member
 
Registered: Nov 2007
Posts: 108

Rep: Reputation: 15
Compiling module give weird errors...


Trying to compile a kernel for centos 5.3 64 bit machine and getting the following output. Not sure if some package is missing or if it's something else. Can anyone please help.

thanks

rpmbuild --rebuild sun-pci-e-gigabit-kernel-7.6.5.1-1.src.rpm
Installing sun-pci-e-gigabit-kernel-7.6.5.1-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.98785
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf sun-pci-e-gigabit-kernel-7.6.5.1
+ /bin/gzip -dc /usr/src/redhat/SOURCES/sun-pci-e-gigabit-kernel-7.6.5.1.tar.gz
+ tar -xvvf -
drwxr-xr-x root/root 0 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/
-rw-r--r-- root/root 33646 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/README
-rw-r--r-- root/root 12584 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/e1000.7
-rw-r--r-- root/root 6635 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/ldistrib.txt
-rw-r--r-- root/root 11510 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/e1000.spec
-rw-r--r-- root/root 7585 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/pci.updates
-rw-r--r-- root/root 1137 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/SUMS
-rw-r--r-- root/root 18671 2007-07
-rw-r--r-- root/root 7528 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_phy.h
-rw-r--r-- root/root 4068 2007-07-19 20:15:11 sun-pci-e-giga-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/COPYING
drwxr-xr-x root/root 0 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/
-rw-r--r-- root/root 5783 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/kcompat.c
-rw-r--r-- root/root 10393 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_manage.c
-rw-r--r-- root/root 65296 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_ethtool.c
-rw-r--r-- root/root 4115 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_ich8lan.h
-rw-r--r-- root/root 25609 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_param.c
-rw-r--r-- root/root 9889 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000.h
-rw-r--r-- root/root 32636 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_api.c
-rw-r--r-- root/root 38533 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_80003es2lan.c
-rw-r--r-- root/root 29498 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/kcompat_ethtool.cbit-kernel-7.6.5.1/src/e1000_mac.h
-rw-r--r-- root/root 48311 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82543.c
-rw-r--r-- root/root 7420 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_api.h
-rw-r--r-- root/root 189428 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_main.c
-rw-r--r-- root/root 1564 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82571.h
-rw-r--r-- root/root 22534 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_nvm.c
-rw-r--r-- root/root 57499 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_mac.c
-rw-r--r-- root/root 56641 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_phy.c
-rw-r--r-- root/root 10672 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/Makefile
-rw-r--r-- root/root 3367 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_manage.h
-rw-r--r-- root/root 3459 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82541.h
-rw-r--r-- root/root 38685 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82541.c
-rw-r--r-- root/root 39912 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82571.c
-rw-r--r-- root/root 66465 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_defines.h
-rw-r--r-- root/root 14982 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82542.c
-rw-r--r-- root/root 4040 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_80003es2lan.h
-rw-r--r-- root/root 72434 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_ich8lan.c
-rw-r--r-- root/root 1640 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82543.h
-rw-r--r-- root/root 15858 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_regs.h
-rw-r--r-- root/root 2563 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_nvm.h
-rw-r--r-- root/root 18163 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_hw.h
-rw-r--r-- root/root 4352 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_osdep.h
-rw-r--r-- root/root 19005 2007-07-19 20:15:10 sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_82540.c
-rw-r--r-- root/root 34683 2007-07-19 20:15:11 sun-pci-e-gigabit-kernel-7.6.5.1/src/kcompat.h
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd sun-pci-e-gigabit-kernel-7.6.5.1
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.98785
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd sun-pci-e-gigabit-kernel-7.6.5.1
+ mkdir -p /var/tmp/sun-pci-e-gigabit-kernel-7.6.5.1-root
++ uname -r
+ KV=2.6.18-128.el5
+ KA=x86_64
++ echo 2.6.18-128.el5
++ sed '{ s/hugemem//g; s/smp//g; s/enterprise//g; }'
+ KV_BASE=2.6.18-128.el5
+ '[' -e /usr/src/kernels ']'
++ echo 2.6.18-128.el5
++ grep '^2.6'
+ '[' 2.6.18-128.el5 ']'
+ '[' -e /etc/redhat-release ']'
++ ls /lib/modules
++ grep 2.6.18-128.el5
+ KSP=2.6.18-128.el5
+ for K in '$KSP'
+ '[' x86_64 == x86_64 ']'
++ echo 2.6.18-128.el5
++ grep hugemem
+ '[' ']'
+ make -C src clean
make: Entering directory `/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src'
rm -rf e1000.ko e1000.o e1000.mod.c e1000.mod.o e1000_main.o e1000_82540.o e1000_82542.o e1000_82571.o e1000_82541.o e1000_82543.o e1000_ich8lan.o e1000_80003es2lan.o e1000_mac.o e1000_nvm.o e1000_phy.o e1000_manage.o e1000_param.o e1000_ethtool.o kcompat.o e1000_api.o e1000.7.gz .*cmd .tmp_versions
make: Leaving directory `/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src'
+ make -C src KSP=/lib/modules/2.6.18-128.el5/build INSTALL_MOD_PATH=/var/tmp/sun-pci-e-gigabit-kernel-7.6.5.1-root KVERSION= MANDIR=/usr/share/man CFLAGS_EXTRA= install
make: Entering directory `/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src'
make -C /lib/modules/2.6.18-128.el5/build SUBDIRS=/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-128.el5-x86_64'
CC [M] /usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_main.o
In file included from /usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000.h:35,
from /usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_main.c:57:
/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src/kcompat.h:1120: error: redefinition of typedef ‘bool’
include/linux/types.h:36: error: previous declaration of ‘bool’ was here
/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src/kcompat.h:1127: error: redefinition of typedef ‘irq_handler_t’
include/linux/interrupt.h:67: error: previous declaration of ‘irq_handler_t’ was here
make[2]: *** [/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src/e1000_main.o] Error 1
make[1]: *** [_module_/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-128.el5-x86_64'
make: *** [default] Error 2
make: Leaving directory `/usr/src/redhat/BUILD/sun-pci-e-gigabit-kernel-7.6.5.1/src'
error: Bad exit status from /var/tmp/rpm-tmp.98785 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.98785 (%build
 
Old 04-14-2009, 10:34 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: Slackware64 13.37, Kubuntu 10.04
Posts: 2,944

Rep: Reputation: Disabled
What are your includes for e1000_main.c?
Kevin Barry
 
Old 04-14-2009, 11:02 PM   #3
pgb205
Member
 
Registered: Nov 2007
Posts: 108

Original Poster
Rep: Reputation: 15
just solved this. Looks like the module source code has some incompatibility with centos greater than 5.
After removing the few lines of code http://wahyupratama.blogspot.com/200...centos-52.html the problem went away and I have a working module.

thanks a bunch for replying.

Quote:
Originally Posted by ta0kira View Post
What are your includes for e1000_main.c?
Kevin Barry
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting errors while compiling kernel module in fedora 9-pls help chandanaraj Linux - Kernel 0 10-11-2008 10:44 PM
Very weird errors compiling freetype-2.1.10 on my BLFS system athenian200 Linux - Software 1 03-13-2007 01:21 AM
Errors when compiling vmware-server module hondo Linux - Software 5 02-02-2007 04:04 PM
errors while compiling a module sanddune008 Linux - Kernel 3 12-06-2006 10:28 PM
Weird kernel compiling errors moger Linux - General 11 02-17-2003 07:46 PM


All times are GMT -5. The time now is 08:43 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration