2001-12-22 02:43:56

by sean

[permalink] [raw]
Subject: 2.4.17 build fails at network.o


I'm trying to build 2.4.17. It fails as follows:


make[1]: Leaving directory `/opt/kernel/linux-2.4.17/arch/i386/lib'
ld -m elf_i386 -T /opt/kernel/linux-2.4.17/arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_tas
k.o init/main.o init/version.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o
ipc/ipc.o \
drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/net/net.o drivers/media/media.o drivers/char
/agp/agp.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o
drivers/cdrom/driver.o drivers/sound/sounddrivers.o drivers/pci/d
river.o drivers/pnp/pnp.o drivers/video/video.o drivers/md/mddev.o \
net/network.o \
/opt/kernel/linux-2.4.17/arch/i386/lib/lib.a
/opt/kernel/linux-2.4.17/lib/lib.a /opt/kernel/linux-2.4.17/arch/i386/
lib/lib.a \
--end-group \
-o vmlinux
net/network.o: In function `__rpc_schedule':
net/network.o(.text+0x49a0d): undefined reference to `rpciod_tcp_dispatcher'
make: *** [vmlinux] Error 1


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


2001-12-22 02:50:07

by David Miller

[permalink] [raw]
Subject: Re: 2.4.17 build fails at network.o


This should fix it:

--- net/sunrpc/sched.c.~1~ Fri Oct 12 18:47:31 2001
+++ net/sunrpc/sched.c Fri Dec 21 18:48:09 2001
@@ -21,6 +21,7 @@
#include <linux/spinlock.h>

#include <linux/sunrpc/clnt.h>
+#include <linux/sunrpc/xprt.h>

#ifdef RPC_DEBUG
#define RPCDBG_FACILITY RPCDBG_SCHED

2001-12-22 03:19:54

by sean

[permalink] [raw]
Subject: Re: 2.4.17 build fails at network.o

Nope. Inserted the one line fix. Tried again. Same problem.

jay


>From: "David S. Miller" <[email protected]>
>To: [email protected]
>CC: [email protected]
>Subject: Re: 2.4.17 build fails at network.o
>Date: Fri, 21 Dec 2001 18:49:01 -0800 (PST)
>
>
>This should fix it:
>
>--- net/sunrpc/sched.c.~1~ Fri Oct 12 18:47:31 2001
>+++ net/sunrpc/sched.c Fri Dec 21 18:48:09 2001
>@@ -21,6 +21,7 @@
> #include <linux/spinlock.h>
>
> #include <linux/sunrpc/clnt.h>
>+#include <linux/sunrpc/xprt.h>
>
> #ifdef RPC_DEBUG
> #define RPCDBG_FACILITY RPCDBG_SCHED
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

2001-12-22 03:54:59

by Wayne Whitney

[permalink] [raw]
Subject: [PATCH] [gcc-3.10-0.1] Re: 2.4.17 build fails at network.o

In mailing-lists.linux-kernel, you wrote:

> I'm trying to build 2.4.17. It fails as follows:
>
> net/network.o: In function `__rpc_schedule':
> net/network.o(.text+0x49a0d): undefined reference to `rpciod_tcp_dispatcher'

I've seen this problem while trying to compile recent kernels with
RedHat Rawhide's gcc-3.10-0.1, are you using that?

I traced the problem to a conflict in include/linux/sunrpc/clnt.h. It
declares rpciod_tcp_dispatcher as extern, but it also includes
linux/sunrpc/xprt.h, which has a static inline definition of
rpciod_tcp_dispatcher. Previous versions of gcc seem to choose the
static inline definition, while gcc-3.10-0.1 chooses the extern
declaration. So I simply deleted the extern declaration from
linux/sunrpc/clnt.h.

With this change, the kernel compiles but oopses in do_signal()
shortly after booting. [email protected] logged a similar conflict in
RedHat Bugzilla 57413, which I paraphrase here: do_signal() is
delcared as asmlinkage int FASTCALL in arch/i386/kernel/signal.c, but
asmlinkage gives the attribute regparm(0), while FASTCALL gives the
attribute regparm(3). Again, prior versions of gcc chose regparm(3),
while gcc-3.1-0.10 chooses regparm(0). So I simply deleted the
asmlinkage declaration.

With these two small changes, kernel 2.4.17 compiles with gcc-3.1-0.10
and boots on my i386 machine OK. In fact, I'm writing this under it
now. However:

[whitney@pizza linux-2.4.17-gcc-3.1-0.10]$ grep -r "asmlinkage.*FASTCALL" .
./arch/i386/kernel/vm86.c:asmlinkage struct pt_regs * FASTCALL(save_v86_state(struct kernel_vm86_regs * regs));
./arch/s390/kernel/signal.c:asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
./arch/s390x/kernel/signal.c:asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
./arch/s390x/kernel/signal32.c:asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));

Maybe some of these need cleaning up? I'll have to leave that to the
experts, I'm more of a grease monkey.

Cheers,
Wayne

diff -rup linux-2.4.17/include/linux/sunrpc/clnt.h linux-2.4.17-gcc-3.1-0.10/include/linux/sunrpc/clnt.h
--- linux-2.4.17/include/linux/sunrpc/clnt.h Tue Dec 11 13:05:03 2001
+++ linux-2.4.17-gcc-3.1-0.10/include/linux/sunrpc/clnt.h Fri Dec 21 19:21:25 2001
@@ -136,7 +136,6 @@ rpc_set_timeout(struct rpc_clnt *clnt, u
xprt_set_timeout(&clnt->cl_timeout, retr, incr);
}

-extern void rpciod_tcp_dispatcher(void);
extern void rpciod_wake_up(void);

/*
diff -rup linux-2.4.17/arch/i386/kernel/signal.c linux-2.4.17-gcc-3.1-0.10/arch/i386/kernel/signal.c
--- linux-2.4.17/arch/i386/kernel/signal.c Sun Sep 23 13:50:09 2001
+++ linux-2.4.17-gcc-3.1-0.10/arch/i386/kernel/signal.c Fri Dec 21 17:28:51 2001
@@ -28,7 +28,7 @@

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

-asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
+int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));

int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
{

2001-12-22 04:53:28

by David Miller

[permalink] [raw]
Subject: Re: 2.4.17 build fails at network.o

From: "se d" <[email protected]>
Date: Fri, 21 Dec 2001 22:19:24 -0500

Nope. Inserted the one line fix. Tried again. Same problem.

Is it building net/sunrpc/xprt.o at all?

2001-12-22 13:52:09

by sean

[permalink] [raw]
Subject: Re: 2.4.17 build fails at network.o

gcc-3.1-0.10 from redhat. I'm going to try the fix from Wayne Whitney.


>From: Ed Tomlinson <[email protected]>
>Reply-To: [email protected]
>To: se d <[email protected]>
>Subject: Re: 2.4.17 build fails at network.o
>Date: Sat, 22 Dec 2001 08:41:32 -0500
>
>
>What compiler?
>
>Ed Tomlinson
>




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

2001-12-22 13:47:32

by sean

[permalink] [raw]
Subject: Re: 2.4.17 build fails at network.o

Yes it is. But note the "defined but not used" warning. FWIW, I'm using
gcc-3.1-0.10.


make[3]: Entering directory `/opt/kernel/linux-2.4.17/net/sunrpc'
gcc -D__KERNEL__ -I/opt/kernel/linux-2.4.17/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -c -o clnt.o clnt.c
/opt/kernel/linux-2.4.17/include/linux/sunrpc/xprt.h:205: warning:
`rpciod_tcp_dispatcher' defined but not used
gcc -D__KERNEL__ -I/opt/kernel/linux-2.4.17/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -c -o xprt.o xprt.c
In file included from /opt/kernel/linux-2.4.17/include/net/checksum.h:33,
from xprt.c:64:
/opt/kernel/linux-2.4.17/include/asm/checksum.h:72:30: warning: multi-line
string literals are deprecated
/opt/kernel/linux-2.4.17/include/asm/checksum.h:105:17: warning: multi-line
string literals are deprecated
/opt/kernel/linux-2.4.17/include/asm/checksum.h:121:13: warning: multi-line
string literals are deprecated
/opt/kernel/linux-2.4.17/include/asm/checksum.h:161:17: warning: multi-line
string literals are deprecated
/opt/kernel/linux-2.4.17/include/linux/sunrpc/xprt.h:205: warning:
`rpciod_tcp_dispatcher' defined but not used
................

>From: "David S. Miller" <[email protected]>
>To: [email protected]
>CC: [email protected]
>Subject: Re: 2.4.17 build fails at network.o
>Date: Fri, 21 Dec 2001 20:52:14 -0800 (PST)
....................................
>
>Is it building net/sunrpc/xprt.o at all?
>-





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com