[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kernel compile problems with gcc 3.3



Dan Jones <ddjones@riddlemaster.org> wrote:

> On Mon, 09 Jun 2003 18:26:46 GMT, Matthias Leopold wrote:
> >hi
> >
> >i tried to recompile my 2.4.20 kernel with make-kpkg (as i have
> >successfully done before) incorporating the xfs and ck patches. this
> >time the process stopped with the following error message:
> >
> >net/network.o(.text+0xe117): In function `rtnetlink_rcv': :
> >undefined reference to `rtnetlink_rcv_skb
> >
> >in google i found one reference to this problem (but no solution)
> >which linked the problem to the newly introduced gcc-3.3. how do i
> >avoid this?

I had the exact same error.
 
> Two ways.  One is to use gcc-3.2.3.  You can install the gcc-3.2.3 
> without uninstalling the gcc-3.3 package.  Just change the symbolic 
> link in /usr/bin to point to the older compiler after install.
> 
> Alternately, you can edit /usr/src/linux/net/core/rtnetlink.c and 
> change the function declaration from extern __inline__ int
> rtlink_rcv_skb(struct sk_buf *skb);  to static inline int 
> rtlink_rcv_skb(struct sk_buf *skb);  (The leading and trailing 
> underscores around inline are no longer needed.)  Changing the 
> declaration from extern inline to static inline causes gcc-3.3 to 
> actually inline the function and fix the problem.

I'm now compiling with gcc-3.2 (by editing the top-level Makefile
value for CC) but I'm getting erors all over the place.  Then I config
out the problematic file only to have it fail later.  :-(

Latest is:

gcc-3.2 -D__KERNEL__ -I/usr/src/kernel-source-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon  -DMODULE -DMODVERSIONS -include /usr/src/kernel-source-2.4.20/include/linux/modversions.h  -nostdinc -iwithprefix include -DKBUILD_BASENAME=cciss  -c -o cciss.o cciss.c
cciss.c: In function `cciss_ioctl':
cciss.c:422: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [cciss.o] Error 1
make[3]: Leaving directory `/usr/src/kernel-source-2.4.20/drivers/block'
make[2]: *** [_modsubdir_block] Error 2
make[2]: Leaving directory `/usr/src/kernel-source-2.4.20/drivers'
make[1]: *** [_mod_drivers] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.4.20'
make: *** [stamp-build] Error 2

Peter



Reply to: