Compile Failure SH7203
Subsystems (2)
Hi,
I get an error while compiling the kernel for sh7203. I' am using the Linux/sh 3.3.0 Kernel.
Can anyone give me some hints?
The compile log is listed below:
====================== CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/machtypes.h' is up to date.
CC arch/sh/kernel/asm-offsets.s
In file included from include/asm-generic/getorder.h:7:0,
from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/page.h:187,
from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/mmu.h:38,
from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/system_32.h:5,
from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/system.h:179,
from include/asm-generic/bitops/atomic.h:5,
from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/bitops.h:21,
from include/linux/bitops.h:22,
from include/linux/thread_info.h:52,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from arch/sh/kernel/asm-offsets.c:13:include/linux/log2.h: In function '__ilog2_u32':include/linux/log2.h:34:2: error: implicit declaration of function 'fls'include/linux/log2.h: In function '__ilog2_u64':include/linux/log2.h:42:2: error: implicit declaration of function 'fls64'include/linux/log2.h: In function '__roundup_pow_of_two':include/linux/log2.h:63:2: error: implicit declaration of function 'fls_long'
In file included from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/bitops.h:98:0,
from include/linux/bitops.h:22,
from include/linux/thread_info.h:52,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from arch/sh/kernel/asm-offsets.c:13:include/asm-generic/bitops/fls.h: At top level:include/asm-generic/bitops/fls.h:12:28: error: static declaration of 'fls' follows non-static declaration include/linux/log2.h:34:9: note: previous implicit declaration of 'fls' was here
In file included from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/bitops.h:100:0,
from include/linux/bitops.h:22,
from include/linux/thread_info.h:52,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from arch/sh/kernel/asm-offsets.c:13:include/asm-generic/bitops/fls64.h:18:28: error: static declaration of 'fls64' follows non-static declaration include/linux/log2.h:42:9: note: previous implicit declaration of 'fls64' was here
In file included from include/linux/thread_info.h:52:0,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from arch/sh/kernel/asm-offsets.c:13:include/linux/bitops.h:160:24: error: conflicting types for 'fls_long'include/linux/log2.h:63:16: note: previous implicit declaration of 'fls_long' was here
make[1]: *** [arch/sh/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
======================Thanks.
Kind Regards.
Felix Born
Quoted 4 lines · Felix Born
Hi,
I get an error while compiling the kernel for sh7203. I' am using the Linux/sh 3.3.0 Kernel.
Can anyone give me some hints?
..
Quoted 15 lines
In file included from
include/asm-generic/getorder.h:7:0,from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/page.h:187, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/mmu.h:38, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/system_32.h:5, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/system.h:179, from include/asm-generic/bitops/atomic.h:5, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/bitops.h:21, from include/linux/bitops.h:22, from include/linux/thread_info.h:52, from include/linux/preempt.h:9, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:4, from include/linux/mm.h:8, from arch/sh/kernel/asm-offsets.c:13:
Quoted 6 lines
include/linux/log2.h: In function '__ilog2_u32':include/linux/log2.h:34:2: error: implicit declaration of function 'fls'include/linux/log2.h: In function '__ilog2_u64':include/linux/log2.h:42:2: error: implicit declaration of function 'fls64'include/linux/log2.h: In function '__roundup_pow_of_two':include/linux/log2.h:63:2: error: implicit declaration of function 'fls_long'
This looks familiar..
It's already fixed in mainline, but you can cherry-pick the comit. Perhaps we should queue this one up for a -stable backport.
Does this work for you?
---
commit 344dd2f4c2bf6d80b54f78012532debeb22c66fd
Author: Nobuhiro Iwamatsu <[email protected]> Date: Tue Mar 6 14:07:09 2012 +0900
sh/next: Fix build fail by asm/system.h in asm/bitops.h
Other files are not done include definitely by asm/system.h made include in asm/bitops.h.
This patch remove asm/system.h from asm/bitops.h.
-----
LANG=C make ARCH=sh CROSS_COMPILE=sh4-linux-gnu-
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/machtypes.h' is up to date.
CC arch/sh/kernel/asm-offsets.s
In file included from include/asm-generic/getorder.h:7,
from /home/iwamatsu/work/kernel/sh-2.6-devel/arch/sh/include/asm/page.h:187, from /home/iwamatsu/work/kernel/sh-2.6-devel/arch/sh/include/asm/mmu.h:38, from /home/iwamatsu/work/kernel/sh-2.6-devel/arch/sh/include/asm/system_32.h:5, from /home/iwamatsu/work/kernel/sh-2.6-devel/arch/sh/include/asm/system.h:179, from /home/iwamatsu/work/kernel/sh-2.6-devel/arch/sh/include/asm/bitops.h:10, from include/linux/bitops.h:22,
from include/linux/thread_info.h:52,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from arch/sh/kernel/asm-offsets.c:13:
include/linux/log2.h: In function '__ilog2_u32':
include/linux/log2.h:34: error: implicit declaration of function 'fls' include/linux/log2.h: In function '__ilog2_u64':
include/linux/log2.h:42: error: implicit declaration of function 'fls64' include/linux/log2.h: In function '__roundup_pow_of_two':
include/linux/log2.h:63: error: implicit declaration of function 'fls_long'
-----
arch/sh/include/asm/bitops.h +0 -1
@@ -7,7 +7,6 @@#error only <linux/bitops.h> can be included directly#endif -#include <asm/system.h> /* For __swab32 */ #include <asm/byteorder.h>
Am 20.05.2012 03:15, schrieb Paul Mundt:
Quoted 48 lines · Felix Born
Quoted 4 lines
Hi,
I get an error while compiling the kernel for sh7203. I' am using the Linux/sh 3.3.0 Kernel.
Can anyone give me some hints?..
Quoted 15 lines
In file included from
include/asm-generic/getorder.h:7:0,from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/page.h:187, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/mmu.h:38, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/system_32.h:5, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/system.h:179, from include/asm-generic/bitops/atomic.h:5, from /home/testo/SH2A/sh7203_gcc-3.4.6_kernel_mod/linux-3.3.0-sh7203/arch/sh/include/asm/bitops.h:21, from include/linux/bitops.h:22, from include/linux/thread_info.h:52, from include/linux/preempt.h:9, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:4, from include/linux/mm.h:8, from arch/sh/kernel/asm-offsets.c:13:Quoted 6 lines
include/linux/log2.h: In function '__ilog2_u32':include/linux/log2.h:34:2: error: implicit declaration of function 'fls'include/linux/log2.h: In function '__ilog2_u64':include/linux/log2.h:42:2: error: implicit declaration of function 'fls64'include/linux/log2.h: In function '__roundup_pow_of_two':include/linux/log2.h:63:2: error: implicit declaration of function 'fls_long'This looks familiar..
It's already fixed in mainline, but you can cherry-pick the comit. Perhaps we should queue this one up for a -stable backport.
Does this work for you?
---
commit
344dd2f4c2bf6d80b54f78012532debeb22c66fdAuthor: Nobuhiro Iwamatsu <[email protected]> Date: Tue Mar 6 14:07:09 2012 +0900..
arch/sh/include/asm/bitops.h +0
-0
arch/sh/include/asm/bitops.h line 11
Quoted 6 lines
arch/sh/include/asm/bitops.h +0
-1@@ -7,7 +7,6 @@#error only <linux/bitops.h> can be included directly#endif -#include <asm/system.h> /* For __swab32 */ #include <asm/byteorder.h>
My bitopts.h already was without the line:
#include <asm/system.h>
So the patch didn't work.
However I tried to compile the mainline kernel for sh7203. That worked without errors.