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

Re: kernel compile problems with gcc 3.3



Actually, both errors are *not* the same


Dan's is due to something missing in the kernel sources; I've read the
thread in the kernel developpers' mailing list, I can't recall exactly
what is missing, but I know that a patch is available, either for 2.4.20
or the soon-to-come 2.4.21. An acceptable workaround for now is to
downgrade your compiler (3.2.x seems to be OK with it; I recompiled my
kernel using 2.95 and it worked fine).

As for Peter's, this kind of segfaulting has been around since gcc-3.x
AFAIK. I've came across quite a few times, everytime it involved
compilation of large projects (the kernel, QT3, etc). All you have to do
is simply to re-start make (make, make bzImage, make modules, whatever)
and all works fine.

For both of you, I'm not saying that the solutions I offer is *THE*
solutions, but at least these worked for me. Someone might come with a
better one, you decide :)


Jeff

On Mon, 2003-06-09 at 23:16, Peter S Galbraith wrote:
> 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: