LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   compiling via-rhine module problem (https://www.linuxquestions.org/questions/slackware-14/compiling-via-rhine-module-problem-260023/)

aherrys 11-27-2004 11:01 PM

compiling via-rhine module problem
 
Hi all,

I want to compile the latest via-rhine driver from the scyld site. I download the via-rhine.c, kern_compat.h, pci-scan.h, pci-scan.c as instructed here and put it all under /usr/src/linux/drivers/net directory (by saving my original via-rhine.c file first).

From inside the directory I do what the instruction suggested by running the following command:

gcc -DMOUDLE -D__KERNEL__ -O6 -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -c via-rhine.c

but I got the following error (I just copy paste a few first line, the whole thing is quite long):

Quote:

via-rhine.c:97: warning: `struct drv_id_info' declared inside parameter list
via-rhine.c:97: warning: its scope is only this definition or declaration, which is probably not what you want
via-rhine.c:98: warning: `struct drv_id_info' declared inside parameter list
via-rhine.c: In function `pci_drv_register':
via-rhine.c:158: error: dereferencing pointer to incomplete type
via-rhine.c:164: error: dereferencing pointer to incomplete type
via-rhine.c:168: error: dereferencing pointer to incomplete type
via-rhine.c:183: error: invalid use of undefined type `struct pci_id_info'
via-rhine.c:183: error: dereferencing pointer to incomplete type
via-rhine.c:184: error: invalid use of undefined type `struct pci_id_info'
via-rhine.c:184: error: dereferencing pointer to incomplete type
.
.
.
I then decide to let slackware compile the driver for me. I save my .config file, do make clean and make mrproper, put back my orginal .config file, then do make oldconfig; make dep; make modules. But What I got is this (first few lines only):

Quote:

make[2]: Entering directory `/usr/src/linux-2.4.27/drivers/net'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.27/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.27/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=via_rhine -c -o via-rhine.o via-rhine.c
via-rhine.c:97: warning: `struct drv_id_info' declared inside parameter list
via-rhine.c:97: warning: its scope is only this definition or declaration, which is probably not what you want
via-rhine.c:98: warning: `struct drv_id_info' declared inside parameter list
via-rhine.c:108: error: `pci_drv_register' undeclared here (not in a function)
via-rhine.c:108: error: initializer element is not constant
via-rhine.c:108: error: (near initialization for `__ksymtab_pci_drv_register.value')
via-rhine.c:109: error: `pci_drv_unregister' undeclared here (not in a function)
via-rhine.c:109: error: initializer element is not constant
via-rhine.c:109: error: (near initialization for `__ksymtab_pci_drv_unregister.value')
via-rhine.c:110: error: `acpi_wake' undeclared here (not in a function)
via-rhine.c:110: error: initializer element is not constant
via-rhine.c:110: error: (near initialization for `__ksymtab_acpi_wake.value')
via-rhine.c:111: error: `acpi_set_pwr_state' undeclared here (not in a function)
via-rhine.c:111: error: initializer element is not constant
via-rhine.c:111: error: (near initialization for `__ksymtab_acpi_set_pwr_state.value')
via-rhine.c: In function `pci_drv_register':
via-rhine.c:158: error: dereferencing pointer to incomplete type
via-rhine.c:164: error: dereferencing pointer to incomplete type
via-rhine.c:168: error: dereferencing pointer to incomplete type
via-rhine.c:183: error: invalid use of undefined type `struct pci_id_info'
via-rhine.c:183: error: dereferencing pointer to incomplete type
via-rhine.c:184: error: invalid use of undefined type `struct pci_id_info'
via-rhine.c:184: error: dereferencing pointer to incomplete type
.
.
.
I really don't know what is going on. I belive that the compile command I used to compile this module under RH9 work with no problem. Any C's guru out there can help me with this ?

Thanks a million in advance.


All times are GMT -5. The time now is 04:42 AM.