LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Error in compiling kernel 2.4.21 (https://www.linuxquestions.org/questions/linux-kernel-70/error-in-compiling-kernel-2-4-21-a-717603/)

giri_blr 04-07-2009 11:56 PM

Error in compiling kernel 2.4.21
 
Applied suspend2 patch for kernel 2.4.21 and tried to compile it. It's giving me the following Error when compiling.

Steps followed:

1. applied version specific patch : "software-suspend-linux-2.4.21-rev2-whole"
2. appplied core patch : "software-suspend-2.0-core-rc3A"
3.make modules
4.make dep
5.make clean
6.make bzImage

Getting problem during "make bzImage"

Please help how to proceed...
Thanks.

Error message:
Quote:

root@c00pe0 linux-2.4.21-4.EL]# make bzImage
make -r -f tmp_include_depends all
make[1]: Entering directory `/usr2/linux-2.4.21-4.EL'
make[1]: Circular /usr2/linux-2.4.21-4.EL/include/asm/smplock.h <- /usr2/linux-2.4.21-4.EL/include/linux/interrupt.h dependency dropped.
make[1]: Circular /usr2/linux-2.4.21-4.EL/include/linux/netfilter_ipv4/ip_conntrack_helper.h <- /usr2/linux-2.4.21-4.EL/include/linux/netfilter_ipv4/ip_conntrack.h dependency dropped.
make[1]: Leaving directory `/usr2/linux-2.4.21-4.EL'
gcc -D__KERNEL__ -I/usr2/linux-2.4.21-4.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr2/linux-2.4.21-4.EL/include/asm/system.h:8,
from /usr2/linux-2.4.21-4.EL/include/linux/tqueue.h:19,
from /usr2/linux-2.4.21-4.EL/include/linux/aio.h:4,
from /usr2/linux-2.4.21-4.EL/include/linux/net.h:88,
from /usr2/linux-2.4.21-4.EL/include/linux/fs.h:15,
from /usr2/linux-2.4.21-4.EL/include/linux/capability.h:17,
from /usr2/linux-2.4.21-4.EL/include/linux/binfmts.h:4,
from /usr2/linux-2.4.21-4.EL/include/linux/sched.h:10,
from /usr2/linux-2.4.21-4.EL/include/linux/mm.h:22,
from /usr2/linux-2.4.21-4.EL/include/linux/slab.h:14,
from /usr2/linux-2.4.21-4.EL/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr2/linux-2.4.21-4.EL/include/linux/bitops.h: In function `get_bitmask_order':
/usr2/linux-2.4.21-4.EL/include/linux/bitops.h:79: warning: implicit declaration of function `generic_fls'
. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr2/linux-2.4.21-4.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686 -DUTS_MACHINE='"i386"' -DKBUILD_BASENAME=version -c -o init/version.o init/version.c
gcc -D__KERNEL__ -I/usr2/linux-2.4.21-4.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=do_mounts -c -o init/do_mounts.o init/do_mounts.c
In file included from /usr2/linux-2.4.21-4.EL/include/asm/system.h:8,
from /usr2/linux-2.4.21-4.EL/include/linux/tqueue.h:19,
from /usr2/linux-2.4.21-4.EL/include/linux/aio.h:4,
from /usr2/linux-2.4.21-4.EL/include/linux/net.h:88,
from /usr2/linux-2.4.21-4.EL/include/linux/fs.h:15,
from /usr2/linux-2.4.21-4.EL/include/linux/capability.h:17,
from /usr2/linux-2.4.21-4.EL/include/linux/binfmts.h:4,
from /usr2/linux-2.4.21-4.EL/include/linux/sched.h:10,
from /usr2/linux-2.4.21-4.EL/include/linux/mm.h:22,
from /usr2/linux-2.4.21-4.EL/include/linux/slab.h:14,
from init/do_mounts.c:3:
/usr2/linux-2.4.21-4.EL/include/linux/bitops.h: In function `get_bitmask_order':
/usr2/linux-2.4.21-4.EL/include/linux/bitops.h:79: warning: implicit declaration of function `generic_fls'
make CFLAGS="-D__KERNEL__ -I/usr2/linux-2.4.21-4.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686 " -C kernel
make[1]: Entering directory `/usr2/linux-2.4.21-4.EL/kernel'
make -C power
make[2]: Entering directory `/usr2/linux-2.4.21-4.EL/kernel/power'
make all_targets
make[3]: Entering directory `/usr2/linux-2.4.21-4.EL/kernel/power'


*** It looks like you have not applied the core Software Suspend patch. ***


make[3]: *** [ui.c] Error 1
make[3]: Leaving directory `/usr2/linux-2.4.21-4.EL/kernel/power'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr2/linux-2.4.21-4.EL/kernel/power'
make[1]: *** [_subdir_power] Error 2
make[1]: Leaving directory `/usr2/linux-2.4.21-4.EL/kernel'
make: *** [_dir_kernel] Error 2
[root@c00pe0 linux-2.4.21-4.EL]#

rylan76 04-08-2009 02:04 AM

Quote:

Originally Posted by giri_blr (Post 3502014)
Applied suspend2 patch for kernel 2.4.21 and tried to compile it. It's giving me the following Error when compiling.

Steps followed:

1. applied version specific patch : "software-suspend-linux-2.4.21-rev2-whole"
2. appplied core patch : "software-suspend-2.0-core-rc3A"

Have you tried applying these two in reverse sequence and seeing if it helps?

The error message at the bottom seems to imply that the top patch first expects the bottom patch to be applied, before it is applied?

giri_blr 04-09-2009 12:08 AM

Quote:

Originally Posted by rylan76 (Post 3502072)
Have you tried applying these two in reverse sequence and seeing if it helps?

The error message at the bottom seems to imply that the top patch first expects the bottom patch to be applied, before it is applied?

Thanks for the reply. I've tried the inverse way. Now Im getting one another error...

Before "make bzImage" I did "make dep" to check dependencies and "make clean" to clear old .obj files...

Quote:

root@c00pe0 linux-2.4.21-4.EL]# make bzImage
make -r -f tmp_include_depends all
make[1]: Entering directory `/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL'
make[1]: Circular /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/asm/smplock.h <- /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/interrupt.h dependency dropped.
make[1]: Circular /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/netfilter_ipv4/ip_conntrack_helper.h <- /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/netfilter_ipv4/ip_conntrack.h dependency dropped.
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL'
gcc -D__KERNEL__ -I/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/asm/system.h:8,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/tqueue.h:19,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/aio.h:4,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/net.h:88,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/fs.h:15,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/capability.h:17,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/binfmts.h:4,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/sched.h:10,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/mm.h:22,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/slab.h:14,
from /usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/bitops.h:88: conflicting types for `generic_fls'
/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/bitops.h:47: previous declaration of `generic_fls'
/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/bitops.h:117: redefinition of `get_bitmask_order'
/usr2/linux-2.4.21-4.EL_2/linux-2.4.21-4.EL/include/linux/bitops.h:76: `get_bitmask_order' previously defined here
make: *** [init/main.o] Error 1
[root@c00pe0 linux-2.4.21-4.EL]#

rylan76 04-09-2009 05:43 AM

A ha!

Well, not sure what you will be able to do from here, but most of the time a step in the right direction is indicated if you start getting, at least, -different- errors - it means that whatever you fiddled with hopefully has some direct bearing on the error you are getting.

Can't you just get a complete, newer kernel, rather than trying to patch the one you have??

The error messages above seem to indicate double definitons are now present, and the kernel will definitely not compile. It almost looks as if changing the order of the patches now demands a third patch to be applied, -before- they are applied in the order you now tried them in?

Are you sure the BASE version of that kernel source tree is the correct one for the patches you have? You sometimes get these types of compile errors if you applied a patch that is the wrong one for the base version of the kernel / application you want to alter.


All times are GMT -5. The time now is 11:58 PM.