public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Eyal Lebedinsky <eyal@eyal.emu.id.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.23pre6aa1: scsi/pcmcia qlogic does not build
Date: Fri, 3 Oct 2003 18:26:32 +0200	[thread overview]
Message-ID: <20031003162632.GD13360@velociraptor.random> (raw)
In-Reply-To: <3F7D8723.E1898A5@eyal.emu.id.au>

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/

  reply	other threads:[~2003-10-03 16:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02 15:26 2.4.23pre6aa1 Andrea Arcangeli
2003-10-03  0:09 ` 2.4.23pre6aa1 Mathias Kretschmer
2003-10-03  7:41   ` 2.4.23pre6aa1 Andrea Arcangeli
2003-10-03  0:51 ` 2.4.23pre6aa1 Mike Fedyk
2003-10-03  7:37   ` 2.4.23pre6aa1 Andrea Arcangeli
2003-10-03 10:15 ` 2.4.23pre6aa1: HZ not constant? Eyal Lebedinsky
2003-10-03 12:02   ` Andrea Arcangeli
2003-10-03 14:26 ` 2.4.23pre6aa1: scsi/pcmcia qlogic does not build Eyal Lebedinsky
2003-10-03 16:26   ` Andrea Arcangeli [this message]
2003-10-04  6:26 ` 2.4.23pre6aa1 Norberto Bensa
2003-10-05  2:50 ` 2.4.23pre6aa1 Marcelo Tosatti
2003-10-05  9:23   ` 2.4.23pre6aa1 Andrea Arcangeli
2003-10-09 20:40     ` 2.4.23pre6aa1 Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031003162632.GD13360@velociraptor.random \
    --to=andrea@suse.de \
    --cc=eyal@eyal.emu.id.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox