Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1287 - Error compiling Kernel
Summary: Error compiling Kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
: 1289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-03-21 16:21 UTC by Alcino Dall Igna Junior
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alcino Dall Igna Junior 2002-03-21 16:21:32 UTC
After reconfiguring the kernel (using KDE configurator), I made
  
  make dep
  make clean
  make bzImage

and then I got:

make -C block
make[2]: Entering directory `/usr/src/linux-2.4.17-r5/drivers/block'
make all_targets
make[3]: Entering directory `/usr/src/linux-2.4.17-r5/drivers/block'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.17-r5/include  -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
-mpreferred-stack-boundary=2 -march=i686 -malign-functions=4     -c -o nbd.o nbd.c
In file included from nbd.c:44:
/usr/src/linux-2.4.17-r5/include/net/sock.h:739: size of array `__pad' is too large
make[3]: *** [nbd.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.17-r5/drivers/block'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.17-r5/drivers/block'
make[1]: *** [_subdir_block] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.17-r5/drivers'
make: *** [_dir_drivers] Error 2

Alcino
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-03-21 16:46:32 UTC
disable network block device support for now.
Comment 2 Alcino Dall Igna Junior 2002-03-22 08:51:17 UTC
I have some comments about this bug and the 1289.

The problem seems to be related to the chain:
( xx -> yy means in xx there are #include yy)
     
many files -> net/sock.h, where
      
        struct {
                int inuse;
                u8  __pad[SMP_CACHE_BYTES - sizeof(int)];
        } stats[NR_CPUS];

net/sock.h -> linux/cache.h, where

   #ifndef SMP_CACHE_BYTES
   #define SMP_CACHE_BYTES L1_CACHE_BYTES
   #endif

I'm not sure, but I wasn't able to find a previous and
different definition of SMP_CACHE_BYTES

linux/cache.h -> asm/cache.h

   /* L1 cache line size */
   #define L1_CACHE_SHIFT       (CONFIG_X86_L1_CACHE_SHIFT)
   #define L1_CACHE_BYTES       (1 << L1_CACHE_SHIFT)

and  

asm/cache.h -> linux/config.h -> linux/autoconf.h, that is

   /*
    * Automatically generated by kcmlinuz: don't edit
    */

and

   #define CONFIG_X86_L1_CACHE_SHIFT 1

So, returning,

   L1_CACHE_SHIFT = 1
   L1_CACHE_BYTES = 1 << 1 = 2
   SMP_CACHE_BYTES = 2
   SMP_CACHE_BYTES - sizeof(int) = -2 = 0xFF FF FF FE

and so,

   u8  __pad[0xFFFFFFFE]

so the size of array `__pad' is too large. :)

Believing in the comment in asm/cache.h, that
L1_CACHE_BYTES ist the L1 cache line size (64 bytes in
Athlons and Durons (my machine)), the problem seems to be in
linux/autoconf.h (or in kcmlinuz), because
CONFIG_X86_L1_CACHE_SHIFT should be 6, so that

   L1_CACHE_BYTES = 1 << 6 = 64

and then

   u8  __pad[60]
   
(not so large :)
      
Hope this help.

Alcino
Comment 3 Alcino Dall Igna Junior 2002-04-03 10:20:54 UTC
The bug seem to be resolved by itself with a upgrade to 2.4.19
Comment 4 Alcino Dall Igna Junior 2002-04-03 10:21:31 UTC
*** Bug 1289 has been marked as a duplicate of this bug. ***