Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
... 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 :
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.