# [solved] Adaptec aacraid module v1.1.5-2465 won't build

## herring

Adaptec released 6/24/2009 new firmware (build 17380) and drivers (linux v1.1.5-2465) for the 5 Series hardware RAID controller.

Unsupported Linux driver source code is also available for download.

Problem: I'm not able to build it on my system...

```

uname -a

Linux ocean 2.6.24-gentoo-r7 #1 SMP Thu Jul 3 18:36:20 UTC 2008 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux

```

I get the following error in genkernel.log

```

CC [M]  drivers/scsi/aacraid/linit.o

drivers/scsi/aacraid/linit.c: In function 'aac_slave_configure':

drivers/scsi/aacraid/linit.c:887: error: 'struct scsi_device' has no member named 'timeout'

drivers/scsi/aacraid/linit.c:888: error: 'struct scsi_device' has no member named 'timeout'

drivers/scsi/aacraid/linit.c: In function 'aac_procinfo':

drivers/scsi/aacraid/linit.c:2931: warning: passing argument 2 of 'aac_store_uart_adapter' from incompatible pointer type

drivers/scsi/aacraid/linit.c:2931: warning: passing argument 3 of 'aac_store_uart_adapter' makes pointer from integer without a cast

drivers/scsi/aacraid/linit.c:2931: error: too few arguments to function 'aac_store_uart_adapter'

make[3]: *** [drivers/scsi/aacraid/linit.o] Error 1

make[2]: *** [drivers/scsi/aacraid] Error 2

make[1]: *** [drivers/scsi] Error 2

make: *** [drivers] Error 2

```

```

grep SCSI /usr/src/linux/.config

# SCSI device support

CONFIG_SCSI=y

CONFIG_SCSI_DMA=y

CONFIG_SCSI_TGT=m

CONFIG_SCSI_NETLINK=y

CONFIG_SCSI_PROC_FS=y

# SCSI support type (disk, tape, CD-ROM)

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

# CONFIG_SCSI_MULTI_LUN is not set

CONFIG_SCSI_CONSTANTS=y

CONFIG_SCSI_LOGGING=y

CONFIG_SCSI_SCAN_ASYNC=y

CONFIG_SCSI_WAIT_SCAN=m

# SCSI Transports

CONFIG_SCSI_SPI_ATTRS=m

CONFIG_SCSI_FC_ATTRS=m

CONFIG_SCSI_FC_TGT_ATTRS=y

CONFIG_SCSI_ISCSI_ATTRS=m

CONFIG_SCSI_SAS_ATTRS=m

CONFIG_SCSI_SAS_LIBSAS=m

CONFIG_SCSI_SAS_ATA=y

CONFIG_SCSI_SAS_HOST_SMP=y

# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set

CONFIG_SCSI_SRP_ATTRS=m

CONFIG_SCSI_SRP_TGT_ATTRS=y

CONFIG_SCSI_LOWLEVEL=y

# CONFIG_ISCSI_TCP is not set

# CONFIG_SCSI_CXGB3_ISCSI is not set

# CONFIG_SCSI_3W_9XXX is not set

# CONFIG_SCSI_ACARD is not set

CONFIG_SCSI_AACRAID=m

# CONFIG_SCSI_AIC7XXX is not set

# CONFIG_SCSI_AIC7XXX_OLD is not set

# CONFIG_SCSI_AIC79XX is not set

# CONFIG_SCSI_AIC94XX is not set

# CONFIG_SCSI_DPT_I2O is not set

# CONFIG_SCSI_ADVANSYS is not set

# CONFIG_SCSI_ARCMSR is not set

# CONFIG_SCSI_HPTIOP is not set

# CONFIG_SCSI_BUSLOGIC is not set

# CONFIG_SCSI_DMX3191D is not set

CONFIG_SCSI_EATA=m

CONFIG_SCSI_EATA_TAGGED_QUEUE=y

CONFIG_SCSI_EATA_LINKED_COMMANDS=y

CONFIG_SCSI_EATA_MAX_TAGS=16

# CONFIG_SCSI_FUTURE_DOMAIN is not set

# CONFIG_SCSI_GDTH is not set

# CONFIG_SCSI_IPS is not set

# CONFIG_SCSI_INITIO is not set

# CONFIG_SCSI_INIA100 is not set

# CONFIG_SCSI_PPA is not set

# CONFIG_SCSI_IMM is not set

# CONFIG_SCSI_MVSAS is not set

# CONFIG_SCSI_STEX is not set

# CONFIG_SCSI_SYM53C8XX_2 is not set

# CONFIG_SCSI_IPR is not set

# CONFIG_SCSI_QLOGIC_1280 is not set

# CONFIG_SCSI_QLA_FC is not set

# CONFIG_SCSI_QLA_ISCSI is not set

# CONFIG_SCSI_LPFC is not set

# CONFIG_SCSI_DC395x is not set

# CONFIG_SCSI_DC390T is not set

# CONFIG_SCSI_DEBUG is not set

# CONFIG_SCSI_SRP is not set

# CONFIG_SCSI_DH is not set

CONFIG_I2O_SCSI=m

# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;

# CONFIG_ISCSI_IBFT_FIND is not set

```

The source code aacraid_source.tgz is found inside the (58119930B) aacraid_linux_driverdisks_v1_1_5-2465.tgz at

http://www.adaptec.com/en-US/speed/raid/aac/linux/aacraid_linux_driverdisks_v1_1_5-2465_tgz.htm

(driver branch is defined as "custom" in aacraid.h)

I've injected these files into /usr/src/linux-2.6.29-gentoo-r5/drivers/scsi/aacraid

```
ocean aacraid # ls -lag

total 956

drwxr-xr-x  2 root    4096 Jun 30 02:41 .

drwxr-xr-x 21 root   12288 Jun 27 14:22 ..

-r--r-xr-x  1 users 142542 May 19 02:52 CHANGELOG

-r-xr-xr-x  1 users  10623 May 14 17:00 Makefile

-r-xr-xr-x  1 users   8069 May 14 17:00 README

-r--r--r--  1 users   4630 May 14 17:00 README.ServeRAID

-r-xr-xr-x  1 users    313 May 14 17:00 TODO

-r--r--r--  1 users  10820 May 14 17:00 VMware-3.0.1.c

-r--r--r--  1 users  10820 May 14 17:00 VMware-3.0.2.c

-r--r--r--  1 users  10820 May 14 17:00 VMware-3.0.c

-r--r--r--  1 users  11555 May 14 17:00 VMware-3.5.c

-r--r--r--  1 users  10820 May 14 17:00 VMware.c

-r--r-xr-x  1 users 181849 May 15 15:36 aachba.c

-rw-r--r--  1 users  68220 May 31 04:56 aacraid.h

-r--r-xr-x  1 users  38995 May 15 15:36 commctrl.c

-r--r-xr-x  1 users  18767 May 15 15:36 comminit.c

-r--r-xr-x  1 users  81753 May 15 15:36 commsup.c

-r-xr-xr-x  1 users  11618 May 14 17:00 compat.h

-r-xr-xr-x  1 users  53203 May 14 17:00 csmi.c

-r-xr-xr-x  1 users   9356 May 14 17:00 csmi.h

-r--r-xr-x  1 users  14400 May 15 15:36 dpcsup.c

-r-xr-xr-x  1 users  17895 May 14 17:00 fwdebug.c

-r-xr-xr-x  1 users   2993 May 14 17:00 fwdebug.h

-r--r-xr-x  1 users 125686 May 15 15:36 linit.c

-r-xr-xr-x  1 users   2951 May 14 17:00 nark.c

-r-xr-xr-x  1 users   3244 May 14 17:00 rkt.c

-r-xr-xr-x  1 users  34054 May 14 17:00 rx.c

-r-xr-xr-x  1 users  11012 May 14 17:00 sa.c

ocean aacraid #

```

Adaptec has also made the source files available as light (235477B) download aacraid-1.1.5.2465-dkms.noarch found targzipped, rpm'ed and targzipped (omg) inside file http://www.adaptec.com/en-US/speed/raid/aac/linux/aacraid_dkms_v1_1_5-2465_tgz.htm

aacraid.h differs slightly as driver branch is defined as "dkms" in line 2.

Additional info about my system:

```
gcc -v

Using built-in specs.

Target: x86_64-pc-linux-gnu

Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --enable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu

Thread model: posix

gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)

```

```
emerge --info

Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p2008

0602-r1, 2.6.24-gentoo-r7 x86_64)

=================================================================

System uname: Linux-2.6.24-gentoo-r7-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_

2.40GHz-with-glibc2.2.5

Timestamp of tree: Thu, 25 Jun 2009 14:00:01 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 2.1.7

dev-lang/python:     2.4.4-r13, 2.5.4-r2

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.5, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gcon

f /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms str

ict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://gentoo.osuosl.org/ "

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 

--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclu

de=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="7zip X acl acpi alsa amd64 berkdb branding bzip2 cairo cdr cli cracklib cry

pt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran 

gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde ldap libnotify mad mi

di mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl ope

nmp pam pcre pdf perl png ppds pppd qt3 qt3support qt4 quicktime readline reflec

tion sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff

 truetype unicode usb vorbis xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als

4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1

968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82x

x-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty 

extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw mult

i null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_ba

sic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_de

fault authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_

fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter head

ers include info log_config logio mem_cache mime mime_magic negotiation rewrite 

setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" I

NPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz63

3 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvi

dia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_A

LL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS,

 PORTDIR_OVERLAY

```

Has anybody sucessfully build this module ?Last edited by herring on Thu Jul 23, 2009 10:27 pm; edited 1 time in total

----------

## herring

Had to try this with unsupported dkms-ebuild installed from portage overlay, and a fresh 2.60.30 kernel tree, but I get the same error message.

I'm no C or C++ expert, but did they really forget to declare entities before using them ?  :Rolling Eyes: 

```
DKMS make.log for aacraid-1.1.5.2465 for kernel 2.6.30-gentoo-r1 (x86_64)

Mon Jul  6 04:18:00 CEST 2009

make: Entering directory `/usr/src/linux-2.6.30-gentoo-r1'

  CC [M]  /var/lib/dkms/aacraid/1.1.5.2465/build/linit.o

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c: In function 'aac_slave_configure':

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:887: error: 'struct scsi_device' has no member named 'timeout'

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:888: error: 'struct scsi_device' has no member named 'timeout'

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c: In function 'aac_procinfo':

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:2931: warning: passing argument 2 of 'aac_store_uart_adapter' from incompatible pointer type

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:2931: warning: passing argument 3 of 'aac_store_uart_adapter' makes pointer from integer without a cast

/var/lib/dkms/aacraid/1.1.5.2465/build/linit.c:2931: error: too few arguments to function 'aac_store_uart_adapter'

make[1]: *** [/var/lib/dkms/aacraid/1.1.5.2465/build/linit.o] Error 1

make: *** [_module_/var/lib/dkms/aacraid/1.1.5.2465/build] Error 2

make: Leaving directory `/usr/src/linux-2.6.30-gentoo-r1'

```

----------

## herring

According to Adaptec support this compile error is solved in build 2467.

http://linux.adaptec.com/2008/12/09/updating-the-aacraid-driver-in-ubuntu/#comment-206

I've tested it and it compiles fine.

----------

