lkml.org 
[lkml]   [2003]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.23pre6aa1: scsi/pcmcia qlogic does not build
On Sat, Oct 04, 2003 at 12:26:43AM +1000, Eyal Lebedinsky wrote:
> gcc -D__KERNEL__ -I/data2/usr/local/src/linux-2.4-pre-aa/include -Wall
> -Wstrict-
> prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -fomit-frame-poi
> nter -pipe -msoft-float -mpreferred-stack-boundary=2 -march=i686
> -malign-functio
> ns=4 -DMODULE -DMODVERSIONS -include
> /data2/usr/local/src/linux-2.4-pre-aa/inclu
> de/linux/modversions.h -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=qlogicf
> as -DPCMCIA -D__NO_VERSION__ -c -o qlogicfas.o ../qlogicfas.c
> ../qlogicfas.c: In function `qlogicfas_detect':
> ../qlogicfas.c:650: warning: passing arg 1 of
> `scsi_unregister_R2c5e5a25' from incompatible pointer type
> ld -m elf_i386 -r -o qlogic_cs.o qlogic_stub.o qlogicfas.o
> qlogicfas.o: In function `init_module':
> qlogicfas.o(.text+0xe40): multiple definition of `init_module'
> qlogic_stub.o(.text+0x770): first defined here
> ld: Warning: size of symbol `init_module' changed from 77 to 58 in
> qlogicfas.o
> qlogicfas.o: In function `cleanup_module':
> qlogicfas.o(.text+0xe80): multiple definition of `cleanup_module'
> qlogic_stub.o(.text+0x7c0): first defined here
> ld: Warning: size of symbol `cleanup_module' changed from 40 to 16 in
> qlogicfas.o
> make[3]: *** [qlogic_cs.o] Error 1
> make[3]: Leaving directory
> `/data2/usr/local/src/linux-2.4-pre-aa/drivers/scsi/pcmcia'
>
> A broken build?

it's a real compilation bug (not a mistake of your toolchain). The
init_module function is defined both in qlogic_stub.c and in qlogicfas.c
that imports scsi_module.c. One of the two has to go away or it can't
link due a name clash across two objects.

after a first look I'm unsure what's the right fix. I guess the init
module of the _cs has to get priority over the scsi_module.c. so
basically you could hack something to disable the include of
scsi_module.c from the other file. This assumes the _cs init_module will
eventually register the scsi device too from the pcmcia callback.

However this should be a generic problem not introduced by my changes.
Is there any scsi or pcmcia person interested in fixing it?

Andrea - If you prefer relying on open source software, check these links:
rsync.kernel.org::pub/scm/linux/kernel/bkcvs/linux-2.[45]/
http://www.cobite.com/cvsps/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans