Results 1 to 6 of 6
How to install kernel-source and gcc?
Because if i want to compile module for installing Linux* Base Driver i've to
install them first.
And then this is what happen when ...
- 10-21-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
[ASK] Install kernel-source and gcc for driver installation
How to install kernel-source and gcc?

Because if i want to compile module for installing Linux* Base Driver i've to
install them first.
And then this is what happen when i tried to compile:
[root@localhost src]# make
make -C /lib/modules/2.6.18-194.el5/build SUBDIRS=/root/AR1FAmily-linux-v1.0.1.13/src modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-194.el5-x86_64'
CC [M] /root/AR1FAmily-linux-v1.0.1.13/src/at_common_main.o
In file included from /root/AR1FAmily-linux-v1.0.1.13/src/at_common.h:4,
from /root/AR1FAmily-linux-v1.0.1.13/src/at_common_main.c:1:
/root/AR1FAmily-linux-v1.0.1.13/src/kcompat.h:1575: error: redefinition of ‘struct napi_struct’
make[2]: *** [/root/AR1FAmily-linux-v1.0.1.13/src/at_common_main.o] Error 1
make[1]: *** [_module_/root/AR1FAmily-linux-v1.0.1.13/src] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-194.el5-x86_64'
make: *** [default] Error 2
You have new mail in /var/spool/mail/root
I don't get what's going on,so maybe it's happened because i haven't install
the kernel-source and gcc.
I hope that there's anyone who can help meLast edited by froggyugly; 10-21-2010 at 04:30 PM.
- 10-21-2010 #2
I would guess that it is a problem with the code, seeing as how it ran make, got to a line with CC, and tried to compile but threw an error /root/AR1FAmily-linux-v1.0.1.13/src/kcompat.h:1575: error: redefinition of ‘struct napi_struct’
can you show source code of what you are trying to compile?
in any case, you need to tell us your distro and version so we can tell you how to install GCC and kernel headers if necessary
- 10-21-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
Actually, to build drivers you should not need the full kernel sources unless you have some specific dependencies on the physical code implementation. Normally, all you need is the kernel development package (headers) to build your kernel module(s). Also, gcc is probably already installed on your system, and unless you want to use a non-supported gcc version (like the latest 4.5.1) you should be good to go. Just try to execute the command gcc --version and see what you get.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-26-2010 #4Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
I would guess that it is a problem with the code, seeing as how it ran make, got to a line with CC, and tried to compile but threw an error /root/AR1FAmily-linux-v1.0.1.13/src/kcompat.h:1575: error: redefinition of ‘struct napi_struct’
can you show source code of what you are trying to compile?
in any case, you need to tell us your distro and version so we can tell you how to install GCC and kernel headers if necessaryActually, to build drivers you should not need the full kernel sources unless you have some specific dependencies on the physical code implementation. Normally, all you need is the kernel development package (headers) to build your kernel module(s). Also, gcc is probably already installed on your system, and unless you want to use a non-supported gcc version (like the latest 4.5.1) you should be good to go. Just try to execute the command gcc --version and see what you get.
i'm using centos 5.5..
the source code is source code for the Atheros ethernet driver.
now i've changed the Atheros ethernet card with Intel ethernet card.
and i still got the problem with installing the driver, because after i read the README, it can be installed if the centos has already the kernel-source and kgcc..
but this case is different when i got few days ago..
when i still use the Atheros ethernet card, in network configuration adepter column, it didn't show the Atheros, but with Intel it did.
the next problem is
how do i install the kernel-source and kgcc?
while the centos cannot connect to the internet.Last edited by froggyugly; 10-26-2010 at 12:26 PM.
- 10-26-2010 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
For help building a kernel on CentOS, read this: HowTos/Custom Kernel - CentOS Wiki
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-26-2010 #6Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
thank you to both of you so much for helping me.
now i'll try next solution.


Reply With Quote
