Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266301 - sys-kernel/openvz-sources-2.6.18.028.056.1: include/linux/time.h needs a simple patch to compile with gcc >4.3
Summary: sys-kernel/openvz-sources-2.6.18.028.056.1: include/linux/time.h needs a simp...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo VPS Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-15 20:05 UTC by Evan Borgstrom
Modified: 2009-04-16 20:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Borgstrom 2009-04-15 20:05:41 UTC
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
Comment 1 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-04-16 19:04:09 UTC
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...
Comment 2 Evan Borgstrom 2009-04-16 19:49:36 UTC
(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?
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2009-04-16 20:37:59 UTC
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.