2003-05-14 20:16:59

by Alex Davis

[permalink] [raw]
Subject: link error building kernel with gcc-3.3

I got the following linking 2.4.21rc1:

net/network.o(.text+0xdcb7): In function `rtnetlink_rcv':
: undefined reference to `rtnetlink_rcv_skb'
make: *** [vmlinux] Error 1

Removing '__inline__' from the definition of rtnetlink_rcv_skb
in net/core/rtnetlink.c fixed the problem.

Note: this error also occurs in 2.4.21rc2-ac2

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


2003-05-15 05:25:36

by James Morris

[permalink] [raw]
Subject: Re: link error building kernel with gcc-3.3

On Wed, 14 May 2003, Alex Davis wrote:

> I got the following linking 2.4.21rc1:
>
> net/network.o(.text+0xdcb7): In function `rtnetlink_rcv':
> : undefined reference to `rtnetlink_rcv_skb'
> make: *** [vmlinux] Error 1
>
> Removing '__inline__' from the definition of rtnetlink_rcv_skb
> in net/core/rtnetlink.c fixed the problem.
>
> Note: this error also occurs in 2.4.21rc2-ac2

I wonder, does this mean that the compiler failed to inline the function?

Removing __inline__ is not the correct solution.


- James
--
James Morris
<[email protected]>

2003-05-15 05:30:11

by David Miller

[permalink] [raw]
Subject: Re: link error building kernel with gcc-3.3

From: James Morris <[email protected]>
Date: Thu, 15 May 2003 15:38:15 +1000 (EST)

I wonder, does this mean that the compiler failed to inline the function?

Removing __inline__ is not the correct solution.

I already posted what the correct fix is :-) And this is already
pushed to 2.5.x

Inlining is not guarenteed, and:

extern inline ... foo(...)

means "inline if you can, I have a compiled-in implementation
in some object somewhere" whereas:

static inline ... foo(...)

means "inline if you can, if there is a case where you cannot
emit this as a function into the current module"

2003-05-15 14:43:49

by Alex Davis

[permalink] [raw]
Subject: Re: link error building kernel with gcc-3.3

Can you push it to 2.4.x as well?

-Alex

--- "David S. Miller" <[email protected]> wrote:
> From: James Morris <[email protected]>
> Date: Thu, 15 May 2003 15:38:15 +1000 (EST)
>
> I wonder, does this mean that the compiler failed to inline the function?
>
> Removing __inline__ is not the correct solution.
>
> I already posted what the correct fix is :-) And this is already
> pushed to 2.5.x

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

2003-05-15 20:00:34

by David Miller

[permalink] [raw]
Subject: Re: link error building kernel with gcc-3.3

From: Alex Davis <[email protected]>
Date: Thu, 15 May 2003 07:56:33 -0700 (PDT)

Can you push it to 2.4.x as well?

I did, but it won't go in until 2.4.22-pre1, this isn't
critical at all.