PDA

View Full Version : Problem compiling driver



wexmaster
28th June 2006, 02:12 PM
Hi, a question from a total Linux newbie.
I have some problems compiling a driver for an eternet card:

[root@dhcp-4518-778 Linux]# make all
make -C /lib/modules/2.6.15-1.2054_FC5/build SUBDIRS=/home/charli/temp/ENL832-TX-ICNT_Driver/Linux modules
make: *** /lib/modules/2.6.15-1.2054_FC5/build: No such file or directory. Stop.
make: *** [all] Error 2

I've searched the forumsand in similar situations the suggestion is to install the kernel-devel package, which I did:

yum install kernel-devel

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
updates [2/3]
extras [3/3]
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do


But the same problem is still there.

Thanks in advance,

Carlos

ibbo
28th June 2006, 03:16 PM
"yum install kernel-devel"

Which Kernel is that then? 2.6.14?, 2.6.15?, 2.6.21? .....

yum install kernel-devel-2.6.15-1.2054_FC5 (or similar) would then get the correct kernel-devel for you and install it. As Linux Kernels come our regularly you will never be able to just yum install Kernel. Would be nice but also bad as I need an old Kernel to keep my machine stable.

Once you got them you can then try remake your driver.

~ibbo

wexmaster
28th June 2006, 03:36 PM
Hi, Thanks for the answer.
Unfortunately problem seems to persist:

[root@dhcp-4518-778 Linux]# uname -a
Linux dhcp-4518-778 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux
[root@dhcp-4518-778 Linux]# yum install kernel-devel-2.6.15-1.2054_FC5 Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
updates [2/3]
extras [3/3]
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@dhcp-4518-778 Linux]# make all
make -C /lib/modules/2.6.15-1.2054_FC5/build SUBDIRS=/home/charli/temp/ENL832-TX-ICNT_Driver/Linux modules
make: *** /lib/modules/2.6.15-1.2054_FC5/build: No such file or directory. Stop.
make: *** [all] Error 2
[root@dhcp-4518-778 Linux]#


:confused:

wexmaster
28th June 2006, 06:02 PM
I've updated the kernel to the latest release and tried to compile the driver again:

root@dhcp-4518-778 Linux]# make all
make -C /lib/modules/2.6.17-1.2139_FC5/build SUBDIRS=/home/charli/temp/ENL832-TX-ICNT_Driver/Linux modules
make[1]: Entering directory `/usr/src/kernels/2.6.17-1.2139_FC5-i686'
CC [M] /home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.o
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:221: error: expected ‘)’ before string constant
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:222: error: expected ‘)’ before string constant
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:223: error: expected ‘)’ before string constant
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:224: error: expected ‘)’ before string constant
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c: In function ‘rx_poll’:
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:1400: error: implicit declaration of function ‘pci_dma_sync_single’
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c: In function ‘netdev_ethtool_ioctl’:
/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:1653: error: ‘struct pci_dev’ has no member named ‘slot_name’
make[2]: *** [/home/charli/temp/ENL832-TX-ICNT_Driver/Linux/sundance_main.o] Error 1
make[1]: *** [_module_/home/charli/temp/ENL832-TX-ICNT_Driver/Linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.17-1.2139_FC5-i686'
make: *** [all] Error 2

I have no clue what may be causing this..

jbannon
28th June 2006, 07:51 PM
Try finding out exactly which version of the kernel the Sundance driver is supposed to be compiled against. At a guess, and it's only a guess because I don't have the source, the driver source code isn't compatible with the current kernel headers.