When building the openvz-sources for 2.6.18 you get an error similar to the following if using gcc >=4.3. LD .tmp_vmlinux1 kernel/built-in.o: In function `getnstimeofday': (.text+0x22bdc): undefined reference to `__umoddi3' kernel/built-in.o: In function `getnstimeofday': (.text+0x22bfc): undefined reference to `__udivdi3' kernel/built-in.o: In function `do_gettimeofday': (.text+0x22d0e): undefined reference to `__udivdi3' kernel/built-in.o: In function `do_gettimeofday': (.text+0x22d2c): undefined reference to `__umoddi3' kernel/built-in.o: In function `timekeeping_resume': timekeeping.c:(.text+0x22fd4): undefined reference to `__umoddi3' timekeeping.c:(.text+0x22ff4): undefined reference to `__udivdi3' kernel/built-in.o: In function `update_wall_time': (.text+0x23306): undefined reference to `__umoddi3' kernel/built-in.o: In function `update_wall_time': (.text+0x23326): undefined reference to `__udivdi3' kernel/built-in.o: In function `update_wall_time': (.text+0x23796): undefined reference to `__umoddi3' kernel/built-in.o: In function `update_wall_time': (.text+0x237b6): undefined reference to `__udivdi3' make: *** [.tmp_vmlinux1] Error 1 I can be easily fixed by applying the following patch: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=38332cb98772f5ea757e6486bed7ed0381cb5f98 Reproducible: Always Steps to Reproduce: 1. Build kernel 2.6.18 with gcc >=4.3 Actual Results: Error linking Expected Results: Kernel built properly
From the ebuild in question: <<<< This kernel is stable only when built with gcc-4.1.x and is known to oops in random places if built with newer compilers. >>>> i doubt that the patch you point out is the only thing that needs changing for a kernel that old to work with newer gcc's. this is a WONTFIX to me...
(In reply to comment #1) > From the ebuild in question: > <<<< > This kernel is stable only when built with gcc-4.1.x and is known > to oops in random places if built with newer compilers. > >>>> > > i doubt that the patch you point out is the only thing that needs changing for > a kernel that old to work with newer gcc's. this is a WONTFIX to me... > Fair enough. I didn't notice that in the ebuild. I found reference to the specific error on a forum that contained the link to the mentioned patch. Time to rebuild everything. Can we get the OpenVZ Howto (http://www.gentoo.org/proj/en/vps/openvz-howto.xml) update to mention that you should pin gcc to 4.1?
Thank you for report Evan. Too many things are known to break if kernel is built with newer gcc. So this patch and similar intensionally left out. Yes, this bug is WONTFIX. (In reply to comment #2) > Time to rebuild everything. You need to rebuild only kernel.