Created attachment 343393 [details] /usr/src/linux/.config 'make' fails in kernel tree with: root@lynx:/usr/src/linux(13)# make make[1]: Nothing to be done for `all'. make[1]: Nothing to be done for `relocs'. CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h LDS arch/x86/kernel/vmlinux.lds CC [M] arch/x86/kernel/msr.o CC [M] arch/x86/kernel/cpuid.o CC [M] arch/x86/kernel/microcode_core.o CC [M] arch/x86/kernel/microcode_intel.o LD [M] arch/x86/kernel/microcode.o LDS arch/x86/realmode/rm/realmode.lds LD arch/x86/realmode/rm/realmode.elf RELOCS arch/x86/realmode/rm/realmode.relocs OBJCOPY arch/x86/realmode/rm/realmode.bin AS arch/x86/realmode/rmpiggy.o LD arch/x86/realmode/built-in.o LDS arch/x86/vdso/vdso.lds VDSO arch/x86/vdso/vdso.so.dbg OBJCOPY arch/x86/vdso/vdso.so AS arch/x86/vdso/vdso.o LDS arch/x86/vdso/vdsox32.lds VDSO arch/x86/vdso/vdsox32.so.dbg OBJCOPY arch/x86/vdso/vdsox32.so AS arch/x86/vdso/vdsox32.o LDS arch/x86/vdso/vdso32/vdso32.lds VDSO arch/x86/vdso/vdso32-int80.so.dbg OBJCOPY arch/x86/vdso/vdso32-int80.so VDSO arch/x86/vdso/vdso32-syscall.so.dbg OBJCOPY arch/x86/vdso/vdso32-syscall.so VDSO arch/x86/vdso/vdso32-sysenter.so.dbg OBJCOPY arch/x86/vdso/vdso32-sysenter.so AS arch/x86/vdso/vdso32.o VDSOSYM arch/x86/vdso/vdso-syms.lds VDSOSYM arch/x86/vdso/vdsox32-syms.lds VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds VDSOSYM arch/x86/vdso/vdso32-syscall-syms.lds VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds VDSOSYM arch/x86/vdso/vdso32-syms.lds LD arch/x86/vdso/built-in.o LD arch/x86/built-in.o CC kernel/time.o CC kernel/softirq.o kernel/softirq.c: In function ‘run_ksoftirqd’: kernel/softirq.c:210:2: error: implicit declaration of function ‘ksoftirqd_softirq_pending’ [-Werror=implicit-function-declaration] kernel/softirq.c: At top level: kernel/softirq.c:443:19: error: static declaration of ‘ksoftirqd_softirq_pending’ follows non-static declaration kernel/softirq.c:210:6: note: previous implicit declaration of ‘ksoftirqd_softirq_pending’ was here cc1: some warnings being treated as errors make[1]: *** [kernel/softirq.o] Error 1 make: *** [kernel] Error 2 Any idea?
(In reply to comment #0) > kernel/softirq.c: In function ‘run_ksoftirqd’: > kernel/softirq.c:210:2: error: implicit declaration of function > ‘ksoftirqd_softirq_pending’ [-Werror=implicit-function-declaration] > kernel/softirq.c: At top level: > kernel/softirq.c:443:19: error: static declaration of > ‘ksoftirqd_softirq_pending’ follows non-static declaration > cc1: some warnings being treated as errors > Any idea? Could be ! A/ There is actually a discrepancy between the way ksoftirqd_softirq_pending is declared and the way it is used as part of a given section of code in softirq.c B/ The resulting code would compile &, I think, run troublefree but the kernel Makefile instructs the system to consider that sort of problem as a fatal error. C/ The problematic part of the softirq.c code is only compiled in case CONFIG_PREEMPT_RT_FULL is not set. Which is the case on your system as I can see in your attachement. And this explain why I did not experienced the problem when testing this version as, the vast makority of the users of the CONFIG_RT_PREEMPT patchset are using it CONFIG_PREEMPT_RT_FULL ! As a consequence of this, the following workarounds can be considered : D/ Enable CONFIG_PREEMPT_RT_FULL : My preferred recommendation. Or, in case you absolutely do not want CONFIG_PREEMPT_RT_FULL (Please tell us the reason why you would)... E/ fiddle the kernel's /usr/src/linux/Makefile and delete the -Werror-implicit-function-declaration line at :369 in the KBUILD_CFLAGS. (I of course do not recommend E/)
Thanks Eric, because I am using realtime kernels very rarely, I don't know the consequences of the different CONFIG_PREEMPT options and I don't have any problem to select CONFIG_PREEMPT_RT_FULL. After setting CONFIG_PREEMPT_RT_FULL 'make' came further than before, but it still fails making the modules: root@lynx:/usr/src/linux(5)# grep CONFIG_PREEMPT .config CONFIG_PREEMPT_RCU=y CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PREEMPT=y CONFIG_PREEMPT_RT_BASE=y CONFIG_PREEMPT_LAZY=y # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT__LL is not set # CONFIG_PREEMPT_RTB is not set CONFIG_PREEMPT_RT_FULL=y CONFIG_PREEMPT_COUNT=y # CONFIG_PREEMPT_TRACER is not set root@lynx:/usr/src/linux(6)# make oldconfig scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config # root@lynx:/usr/src/linux(7)# time genkernel --oldconfig all * Gentoo Linux Genkernel; Version 3.4.45 * Running with options: --oldconfig all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load .. * Linux Kernel 3.8.4-rt-rt1 for x86_64... * .. with config file /usr/share/genkernel/arch/x86_64/kernel-config * kernel: --mrproper is disabled; not running 'make mrproper'. * >> Running oldconfig... * kernel: --clean is disabled; not running 'make clean'. * >> Compiling 3.8.4-rt-rt1 bzImage... * >> Installing firmware ('make firmware_install') due to CONFIG_FIRMWARE_IN_KERNEL != y... * >> Compiling 3.8.4-rt-rt1 modules... * ERROR: Failed to compile the "modules" target... * * -- Grepping log... -- * * CC kernel/trace/trace_stat.o * CC kernel/trace/trace_printk.o * CC kernel/trace/trace_sched_switch.o * CC mm/memcontrol.o * CC kernel/trace/latency_hist.o *mm/memcontrol.c:4974:12: warning: ‘memcg_propagate_kmem’ defined but not used [-Wunused-function] *-- * CC drivers/video/console/vgacon.o * CC net/sunrpc/auth_generic.o * CC drivers/video/console/fbcon.o * CC net/sunrpc/svc.o *net/sunrpc/svc.c: In function ‘svc_printk’: *net/sunrpc/svc.c:1041:8: warning: unused variable ‘buf’ [-Wunused-variable] *-- * CC [M] fs/fscache/operation.o * CC [M] drivers/net/irda/mcp2120-sir.o * CC [M] fs/fscache/page.o * CC [M] drivers/net/irda/act200l-sir.o *fs/fscache/page.c: In function ‘fscache_invalidate_writes’: *fs/fscache/page.c:799:9: error: expected expression before ‘do’ *make[2]: *** [fs/fscache/page.o] Error 1 *make[1]: *** [fs/fscache] Error 2 Can you give me an additional hint?
Created attachment 343433 [details] the new /usr/src/linux/.config
(In reply to comment #2) ...After setting > CONFIG_PREEMPT_RT_FULL 'make' came further than before, but it still fails > making the modules: > *fs/fscache/page.c: In function ‘fscache_invalidate_writes’: > *fs/fscache/page.c:799:9: error: expected expression before ‘do’ > *make[2]: *** [fs/fscache/page.o] Error 1 > *make[1]: *** [fs/fscache] Error 2 > > > Can you give me an additional hint? I think so ! Yet another syntax error... you are not lucky. The culprit is compiled because of CONFIG_FSCACHE=m you selected in your config. (Filesystems/Caches/General filesystem caching manager) Because this cache used to particularly concern NFS, it is rarely used in RT environments. => Unless you use and absolutely want NFS to be cached, I recommend you de-select CONFIG_FSCACHE BTW, when making a RT kernel, I recommend to configure it via make menuconfig and select ONLY what precisely concerns the hardware you are running and nothing more than the features you actually need.
After removing some file system options I was able to deselect CONFIG_FSCACHE. The subsequent "genkernel --oldconfig all" worked. Thanks, once more.
(In reply to comment #5) > After removing some file system options I was able to deselect > CONFIG_FSCACHE. > The subsequent "genkernel --oldconfig all" worked. OK then, to whoever gets the rights to change the status of this bug, please change from UNCONFIRMED to CONFIRMED. If I find some time, I'll try to make appropriated patches find their way to upstream.
Created attachment 343496 [details, diff] Patch fixing declaration conflict in softirq.c This is the patch I submit in order to fix the declaration conflict of the ksoftirqd_softirq_pending function, conflict which breaks the build of an rt-sources-3.8.4_p1 kernel configured with CONFIG_PREEMPT_RT_FULL not set. It applies -p0 in /usr/src/linux/kernel directory. If anyone else could test it (I mean a bit above only compiling...) I would be grateful.
(In reply to comment #7) > Created attachment 343496 [details, diff] [details, diff] > Patch fixing declaration conflict in softirq.c > > This is the patch I submit in order to fix the declaration conflict of the > ksoftirqd_softirq_pending function, conflict which breaks the build of an > rt-sources-3.8.4_p1 kernel configured with CONFIG_PREEMPT_RT_FULL not set. > > It applies -p0 in /usr/src/linux/kernel directory. > > If anyone else could test it (I mean a bit above only compiling...) I would > be grateful. It's unlikely for this patch to hit gentoo portage unless it is accepted upstream. Did you submit it? If so, post a link here
(In reply to comment #8) > It's unlikely for this patch to hit gentoo portage unless it is accepted > upstream. Did you submit it? If so, post a link here A/ If I had wished this patch to hit gentoo portage, I think I would have submitted it together with an ebuild. B/ I have no other pretension than to be helpful to users who experience problems on packages about which I might have a little more knowledge than the average user. => I contribute posting ebuilds, patches, whatever tool, info I can think helpful to the OP on the media used by the OP. C/ You are a Gentoo Dev and that is indeed your job to decide what should and what should not hit gentoo portage. I am certainly neither going to question your decisions nor to argue with you about what Gentoo package maintenance should consist in. And even less than, at the end of the day, I do not really care. (I do not really care if the result of my job hits or does not hit gentoo portage, remain IN_P for ages, or is closed WONTFIX, I mean.) You help Gentoo, I try to help real users, each to his own.
(In reply to comment #9) > (In reply to comment #8) > > > It's unlikely for this patch to hit gentoo portage unless it is accepted > > upstream. Did you submit it? If so, post a link here > > A/ If I had wished this patch to hit gentoo portage, I think I would have > submitted it together with an ebuild. > > B/ I have no other pretension than to be helpful to users who experience > problems on packages about which I might have a little more knowledge than > the average user. => I contribute posting ebuilds, patches, whatever tool, > info I can think helpful to the OP on the media used by the OP. > > C/ You are a Gentoo Dev and that is indeed your job to decide what should > and what should not hit gentoo portage. I am certainly neither going to > question your decisions nor to argue with you about what Gentoo package > maintenance should consist in. And even less than, at the end of the day, I > do not really care. > (I do not really care if the result of my job hits or does not hit gentoo > portage, remain IN_P for ages, or is closed WONTFIX, I mean.) > > You help Gentoo, I try to help real users, each to his own. I don't quite like your tone so you are on your own
Stratos I believe this patch should be closed as UPSTREAM as I don't think we apply custom patches apart from those released by upstream.
(In reply to comment #11) > Stratos I believe this patch should be closed as UPSTREAM as I don't think > we apply custom patches apart from those released by upstream. Yeap. Any bugs for kernel sources other than gentoo- should be filed upstream. Thanks.