LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-29-2010, 10:35 PM   #1
jestinjoy
Member
 
Registered: May 2004
Location: India
Distribution: Ubuntu 9.04, Debian Lenny
Posts: 121

Rep: Reputation: 22
Angry Kernel(2.6.18) compilation error in Debian Lenny


When I compiled the kernel, I get the following error.
Code:
kernel/built-in.o: In function `getnstimeofday':
(.text+0xedf2): undefined reference to `__umoddi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0xee9d): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_gettimeofday':
(.text+0xeeba): undefined reference to `__umoddi3'
kernel/built-in.o: In function `do_timer':
(.text+0xfd44): undefined reference to `__udivdi3'
kernel/built-in.o: In function `do_timer':
(.text+0xfd61): undefined reference to `__umoddi3'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6-2.6.18.dfsg.1'
make: *** [debian/stamp/build/kernel] Error 2
Then I tried installing the patches by executing the following command

Code:
 gzip -cd linux-2.6_2.6.18.dfsg.1-26etch2.diff.gz  | patch
But still I get the same error. Please help
 
Old 04-30-2010, 04:07 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Try this for me and paste the output here:

Code:
gcc -v
I ~suspect~ your problem may be that you're attempting to compile a 2.6.18 kernel under gcc 4.3, if so you might need to modify your cflags to include -fno-tree-scev-cprop
 
Old 04-30-2010, 07:18 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
... A few comments about the patch(es)..
gunzip linux-2.6_2.6.18.dfsg.1-26etch2.diff.gz
patch -p1 < linux-2.6_2.6.18.dfsg.1-26etch2.diff

And you will see the directory ' debian/ ' appear.
Which contains patches to be applied with: patch -p<option> < <file>
It is your decision, which to use. Examples :

debian/patches : 48 patches
debian/patches/bugfix/ : 213 patches
debian/patches/bugfix/all/ : 55 patches
debian/patches/bugfix/all/CVE-2009-0029/ : 65 patches
debian/patches/bugfix/all/vserver/ 4 patches
debian/patches/debian/ : 7 patches
debian/patches/debian/dfsg/ : 6 patches
debian/patches/features/ : 18 patches
debian/patches/features/all/ : 8 patches
debian/patches/features/all/drivers/ : 25 patches
debian/patches/features/all/xen/ : 10 patches
debian/patches/features/arm/ : 7 patches

Last edited by knudfl; 04-30-2010 at 07:20 PM.
 
Old 05-01-2010, 11:20 PM   #4
jestinjoy
Member
 
Registered: May 2004
Location: India
Distribution: Ubuntu 9.04, Debian Lenny
Posts: 121

Original Poster
Rep: Reputation: 22
re

# gcc -v output

Code:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
 
Old 05-02-2010, 12:42 AM   #5
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
Why are you trying to compile such an old kernel? 2.6.18 was probably what came with Etch. I think lenny was 2.6.26 or better. Maybe the headers in your source tree are not correct? Anyway, the files it references must be from the headers math.h or something like that. Are you trying to reference a deprecated function?
 
Old 05-03-2010, 11:48 AM   #6
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by jestinjoy View Post
# gcc -v output

Code:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
As I suspected, add "-fno-tree-scev-cprop" to your CFLAGS.
 
  


Reply

Tags
kernel



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BRL-CAD-7.14.6 compilation fails on Debian Lenny (stable) Pentium 6 mike11 Linux - Software 4 08-02-2009 10:52 PM
Debian Lenny symlink gcc question for nVidia Driver(s) compilation and Installation bruceam Linux - Newbie 8 06-16-2009 05:47 PM
upgrade the kernel on the VM with debian lenny cccc Debian 6 02-18-2009 01:03 PM
64Studio realtime kernel and debian lenny realtime module buid error? stratotak Linux - Newbie 0 01-30-2009 10:57 PM
Kernel panic-on Debian lenny Vassos Linux - Kernel 1 08-10-2008 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration