Error when building bzImage:- Opensuse 11.3

Hello. I’m trying to recompile the kernel with the following command:

make bzImage

Only I’m getting this error message:

mm/slub.c: In function ‘__kmalloc_node_track_caller’:
mm/slub.c:3458:3: error: implicit declaration of function ‘kmalloc_large_node’
make[1]: *** [mm/slub.o] Error 1
make: *** [mm] Error 2

I’m trying to learn how the kernel works (Working my way through a book), and I’m adding some ‘printk’s’ within the init/main.c file. Because of this I need to recompile the kernel. I’ve done this in openSuse 11.2 the exact same way and it has worked.

Can somebody please help me?


Hi there,

What kernel source are you building and what steps did you take prior to compiling - specifically such as running make oldconfig, make prepare, make, etc.

It looks to me very much like something off in your build environment, the kernel source not being prepared, or some evil in your .config - you definitly should not be having any issue compiling slub.c

The error tends to indication that kmalloc is undefined, and while this could be perhaps handled by adding an include for stdlib.h in it, this is really not the root cause of the problem, I am almost certain.

Try making a new .config from scratch, make clean, and then try building again - also run make prepare before building.

I’m no kernel expert, but those are my best suggestions.

Lews Therin

Hi. Thanks for your reply. I’m compiling the stock kernel that came with opensuse 11.3, also the config file is from my /arch/x86 folder. The reason i’m recompiling is that i’m learning about kernel threads. The only file i touch within the source directory is init/main. I’m currently taking the following steps now:

> make clean.
> make oldconfig
Then it fails, I cannot see why the config file would matter, cause either way the kernel should compile. And i don’t get it though cause the slab deals with memory management (So it’s important), and so should fail as all.

It fails with the above commands, as well as the previous commands.


Yea, I’ve encountered weird stuff like that too and, although it might not seem obvious, I’ve typically found it to be related to a difference in the config that has sneaked in some how. What do you get if you copy over the config from /boot, make it your .config, modify it to have a new version name, and compile using it?
Also, have you tried a make prepare on the kernel source? (I don’t think this is the problem in your case, but I would do it anyway - the symlinks it sets up, if missing, can cause some weirdness too.)
Lews Therin

Hi. Even when i copy the .config from the arch/x86 and leave everything as it is i still have the same problem. I’m currently now using opensuse 11.2 using the same method’s, and that compile’s and links fine.

Dunno what the hell is happening.

I got the same problem on opensuse 11.3:(, after hard try i solved it. i find that kmalloc_large_node was define in #ifdef CONFIG_NUMA, so i try to search numa in make menuconfig, i got the things below

Symbol: NUMA [=y]
 Prompt: Numa Memory Allocation and Scheduler Support
   Defined at arch/x86/Kconfig:1266
   Depends on: SMP [=y] && !XEN [=n] && (X86_64 [=n] || X86_32 [=y] && HIGHMEM64G [=y] && (X86_NUMAQ [=y] || X86_BIGSMP [=n] || X86_SUMMIT [=n] && ACPI [=y]) && EXPERIMENTA
     -> Processor type and features
   Selected by: X86_NUMAQ [=y] && X86_32_NON_STANDARD [=y] && PCI [=y]

on my machine, X86_NUMAQ was ‘n’ when i got that error, so i try to make it ‘y’, i just select

Processor type and features  --->
    [li] Support non-standard 32-bit SMP architectures
[/li]    [li]   NUMAQ (IBM/Sequent)[/li]```

then that error disappeared.
i think you should make the expression of <Depends on:> or <Selected by:> to be true to get it through.