You are not logged in.

#1 2008-04-03 22:26:47

lang2
Member
Registered: 2006-02-10
Posts: 386

kernel compilation problem

Hi all,

I'm trying to compile my own kernel and having problem with it. Arch made me out of practice if you ask me. During Slack days I always compile my own. Anyways, I did 'make allnoconfig && make' and got the following error:


kernel/built-in.o: In function `getnstimeofday':
(.text+0x1a5d1): undefined reference to `__umoddi3'
kernel/built-in.o: In function `getnstimeofday':
(.text+0x1a5f1): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0x1a6ef): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0x1a70d): undefined reference to `__umoddi3'
kernel/built-in.o: In function `timekeeping_resume':
timekeeping.c:(.text+0x1a886): undefined reference to `__umoddi3'
timekeeping.c:(.text+0x1a8a6): undefined reference to `__udivdi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x1ac48): undefined reference to `__umoddi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x1ac68): undefined reference to `__udivdi3'
kernel/built-in.o: In function `update_wall_time':
(.text+0x1b077): undefined reference to `__umoddi3'
kernel/built-in.o: In function `update_wall_time':


I did a search for the symbol __umoddi3 and couldn't see it been used.

Any clue?

Offline

#2 2008-04-03 22:36:43

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: kernel compilation problem

See thread for compilation script.

You probably need "make clean".

Failing all this, start afresh by downloading kernel 2.6.24.4 from kernel.org, and applying the gcc 4.3 patch.

Last edited by brebs (2008-04-03 22:38:13)

Offline

#3 2008-04-03 23:03:55

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: kernel compilation problem

kernel 2.6.24 does not compile with gcc4.3 without patching.

I compiled my kernel with this patch.
It contains the fix-ggc43.patch from the Arch ABS Tree and the Makefile changes from this tread

--- linux-2.6.24.4/Makefile    
+++ linux-2.6.24.4/Makefile
@@ -332,7 +332,8 @@
 
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
            -fno-strict-aliasing -fno-common \
-           -Werror-implicit-function-declaration
+           -Werror-implicit-function-declaration \
+           -fno-tree-scev-cprop
 KBUILD_AFLAGS   := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)

--- linux-2.6.24.4/include/linux/time.h
+++ linux-2.6.24.4/include/linux/time.h
@@ -169,7 +169,7 @@ extern struct timeval ns_to_timeval(cons
  * @a:        pointer to timespec to be incremented
  * @ns:        unsigned nanoseconds value to be added
  */
-static inline void timespec_add_ns(struct timespec *a, u64 ns)
+static inline void timespec_add_ns(struct timespec *a, volatile u64 ns)
 {
     ns += a->tv_nsec;
     while(unlikely(ns >= NSEC_PER_SEC)) {

Offline

#4 2008-04-03 23:12:14

lang2
Member
Registered: 2006-02-10
Posts: 386

Re: kernel compilation problem

Thanks. That make sense.

Offline

#5 2008-04-05 09:12:09

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: kernel compilation problem

I keep hearing about this 'kernel won't compile with gcc4.3' stuff. I'm using unpatched vanilla 2.6.24.4 kernel and it compiled fine. Is this just a freak coincidence, or is it only true if a certain option is enabled?


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#6 2008-04-05 09:37:19

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: kernel compilation problem

You really should recompile with that gcc patch included wink

Offline

#7 2008-04-05 09:40:19

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: kernel compilation problem

Hmm, looks like I may need to recompile soon tongue


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

Board footer

Powered by FluxBB