LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Adaptec Kernel Module - Kernel Compile Errors (https://www.linuxquestions.org/questions/linux-general-1/adaptec-kernel-module-kernel-compile-errors-597795/)

dumbsheep 11-07-2007 11:00 AM

Adaptec Kernel Module - Kernel Compile Errors
 
All,

So I was able to get the Adaptec kernel module uncompiled. I followed the instructions and now when I run 'make menuconfig' I see that I can make the ADPAHCI a module of the kernel under Device Drivers -> SCSI -> Low-level -> ADPAHCI. Everything to this point is nice and happy.....However, when I start to compile the kernel I get the following error once it gets to drivers/scsi/adphaci:

----------------------------------------------------------------
CC [M] drivers/scsi/adpahci/hr.o
In file included from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/hr.h:50:26: error: linux/config.h: No such file or directory
In file included from drivers/scsi/adpahci/cdacsmi.h:47,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/osmcda.h:228: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/osmcda.h:232: warning: function declaration isn’t a prototype
In file included from drivers/scsi/adpahci/sysdef.h:186,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/cdadef.h:301: warning: useless storage class specifier in empty declaration
drivers/scsi/adpahci/cdadef.h:314: warning: useless storage class specifier in empty declaration
drivers/scsi/adpahci/cdadef.h:325: warning: useless storage class specifier in empty declaration
drivers/scsi/adpahci/cdadef.h:338: warning: useless storage class specifier in empty declaration
In file included from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/sysdef.h:469:1: warning: "/*" within comment
drivers/scsi/adpahci/sysdef.h:489:1: warning: "/*" within comment
In file included from drivers/scsi/adpahci/chim.h:45,
from drivers/scsi/adpahci/sysdef.h:523,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/chimosm.h:99:5: warning: "SAS_DOWNSHIFT_SUPPORT" is not defined
drivers/scsi/adpahci/chimosm.h:142:7: warning: "SAS_PROGRAMABLE_ALIGN_RATE" is not defined
In file included from drivers/scsi/adpahci/chim.h:49,
from drivers/scsi/adpahci/sysdef.h:523,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/chimdef.h:2602:5: warning: "SATA_MESSAGE_SIGNALED_INTERRUPTS_SUPPORT" is not defined
drivers/scsi/adpahci/chimdef.h:2629:5: warning: "SAS_SAVE_RESTORE_STATE" is not defined
drivers/scsi/adpahci/chimdef.h:2754:5: warning: "SAS_OSM_DEBUG_MODE" is not defined
In file included from drivers/scsi/adpahci/raidtype.h:56,
from drivers/scsi/adpahci/sysdef.h:561,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/sysdef.h:469:1: warning: "/*" within comment
drivers/scsi/adpahci/sysdef.h:489:1: warning: "/*" within comment
In file included from drivers/scsi/adpahci/sysdef.h:574,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/sysdev.h:232:5: warning: "PROFILER" is not defined
In file included from drivers/scsi/adpahci/sysdef.h:577,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/osifprot.h:509: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/osifprot.h:512: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/osifprot.h:531: warning: parameter names (without types) in function declaration
drivers/scsi/adpahci/osifprot.h:540: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/osifprot.h:552: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/osifprot.h:571: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/osifprot.h:573: warning: function declaration isn’t a prototype
In file included from drivers/scsi/adpahci/sysdef.h:578,
from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/coreprot.h:274: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/coreprot.h:281: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/coreprot.h:487: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/coreprot.h:555: warning: function declaration isn’t a prototype
drivers/scsi/adpahci/coreprot.h:741: warning: function declaration isn’t a prototype
In file included from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/sysdef.h:604: warning: useless storage class specifier in empty declaration
In file included from drivers/scsi/adpahci/cdacsmi.h:60,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/sysdef.h:613:1: warning: "ABORT_TASK" redefined
In file included from drivers/scsi/adpahci/hr.h:71,
from drivers/scsi/adpahci/hr.c:35:
include/scsi/scsi.h:277:1: warning: this is the location of the previous definition
In file included from drivers/scsi/adpahci/cdacsmi.h:66,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/csmisasa.h:117:7: warning: "_WIN32" is not defined
In file included from drivers/scsi/adpahci/cdacsmi.h:66,
from drivers/scsi/adpahci/hr.h:96,
from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/csmisasa.h:184: warning: ignoring #pragma CSMI_SAS_BEGIN_PACK
drivers/scsi/adpahci/csmisasa.h:257: warning: ignoring #pragma CSMI_SAS_END_PACK
In file included from drivers/scsi/adpahci/hr.c:35:
drivers/scsi/adpahci/hr.h:134:5: warning: "HR_DEBUG" is not defined
drivers/scsi/adpahci/hr.h:392:1: warning: "roundup" redefined
In file included from include/linux/cache.h:4,
from include/asm/pda.h:7,
from include/asm/thread_info.h:14,
from include/linux/thread_info.h:21,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:49,
from include/linux/vmalloc.h:4,
from include/asm/io.h:105,
from drivers/scsi/adpahci/hr.h:40,
from drivers/scsi/adpahci/hr.c:35:
include/linux/kernel.h:43:1: warning: this is the location of the previous definition
drivers/scsi/adpahci/hr.c:1024:43: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
drivers/scsi/adpahci/hr.c: In function ‘hr_setup_dev_dpc_task’:
drivers/scsi/adpahci/hr.c:1024: error: ‘INIT_WORK’ undeclared (first use in this function)
drivers/scsi/adpahci/hr.c:1024: error: (Each undeclared identifier is reported only once
drivers/scsi/adpahci/hr.c:1024: error: for each function it appears in.)
drivers/scsi/adpahci/hr.c: In function ‘hr_pci_init’:
drivers/scsi/adpahci/hr.c:1186: error: implicit declaration of function ‘pci_module_init’
drivers/scsi/adpahci/hr.c: In function ‘hr_register_host’:
drivers/scsi/adpahci/hr.c:1560: error: implicit declaration of function ‘scsi_assign_lock’
drivers/scsi/adpahci/hr.c: In function ‘hr_ioctl’:
drivers/scsi/adpahci/hr.c:2444: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result
drivers/scsi/adpahci/hr.c:2540: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result
drivers/scsi/adpahci/hr.c:2838:5: warning: "_NOTYET_" is not defined
drivers/scsi/adpahci/hr.c: At top level:
drivers/scsi/adpahci/hr.c:2966: warning: initialization from incompatible pointer type
drivers/scsi/adpahci/hr.c: In function ‘hr_pci_dev_probe’:
drivers/scsi/adpahci/hr.c:3129: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:64)
drivers/scsi/adpahci/hr.c:3129: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
drivers/scsi/adpahci/hr.c: In function ‘hr_watchdog_thread’:
drivers/scsi/adpahci/hr.c:3704: error: ‘PF_FREEZE’ undeclared (first use in this function)
drivers/scsi/adpahci/hr.c: In function ‘hr_ehandler_thread’:
drivers/scsi/adpahci/hr.c:4830: error: ‘PF_FREEZE’ undeclared (first use in this function)
gmake[5]: *** [drivers/scsi/adpahci/hr.o] Error 1
gmake[4]: *** [drivers/scsi/adpahci] Error 2
gmake[3]: *** [drivers/scsi] Error 2
make[2]: *** [drivers] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.66191 (%build)
----------------------------------------------------------------

Sorry for the long output, but that is the entire error so I included the whole thing.

I guess the thing I am looking for is to ask if anyone else has successfully compiled Adaptec modules into the kernel before. I am also wondering why there are so many errors and undeclared functions. I did follow the instructions that came with the module and have even tried over and over again. Any ideas are also welcome. Thanks.

/dumbsheep

Tinkster 11-07-2007 01:58 PM

Which distro is this happening with, which kernel version is it, and how/where did
you get the source? Is that adaptec driver part of the stock kernel, or did you do
some patching from foreign sources?


Cheers,
Tink

dumbsheep 11-07-2007 02:05 PM

Quote:

Which distro is this happening with, which kernel version is it, and how/where did you get the source?
It's happening with the two distros I've tried it on. I've tried it on Ubuntu and Suse

The kernel version is 2.6.23.1

Kernel source? kernel.org. The adaptec module? From the server manufacturer.

Quote:

Is that adaptec driver part of the stock kernel, or did you do some patching from foreign sources?
No, I had to run this:

./Build ../driver-adpahci ../shipped-binary ../../linux-2.6.23.1 blist+=x86_64 merge_driver=Yes

which then merged it with my kernel source in the drivers/scsi directory. After that I ran make menuconfig and selected the available ADPAHCI Support module. After that I tried 'make rpm' on Suse and 'make-kpkg --initrd --revision=2.6.23-386 kernel_image kernel_headers modules_image' on Ubuntu. Both have failed

Tinkster 11-07-2007 03:47 PM

And which kernel version is the adaptec source chunk certified against?

2.6.23.1 is quite recent....


All times are GMT -5. The time now is 06:03 PM.