LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-07-2007, 11:00 AM   #1
dumbsheep
Member
 
Registered: Jan 2005
Location: USA
Distribution: Red Hat, CentOS, Fedora, Suse
Posts: 54

Rep: Reputation: 15
Question 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
 
Old 11-07-2007, 01:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 11-07-2007, 02:05 PM   #3
dumbsheep
Member
 
Registered: Jan 2005
Location: USA
Distribution: Red Hat, CentOS, Fedora, Suse
Posts: 54

Original Poster
Rep: Reputation: 15
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
 
Old 11-07-2007, 03:47 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
And which kernel version is the adaptec source chunk certified against?

2.6.23.1 is quite recent....
 
  


Reply

Tags
adaptec, kernel, module


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I compile this kernel module? (kernel: 2.6.8-powerpc Debian sarge) Lannix Linux - Hardware 5 05-01-2007 12:29 PM
Sound kernel module errors with FC4 since kernel 2.6.14 knutdc Linux - Software 2 12-23-2005 07:53 PM
SL10 kernel module compile errors jcart Suse/Novell 1 11-08-2005 09:22 AM
2.6.11 kernel compile - sound module insertion errors dibblethewrecke Linux - Hardware 3 03-17-2005 11:50 PM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM


All times are GMT -5. The time now is 01:34 PM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration