unable to build kernel from source

Bug #237528 reported by Michael Sotnikov on 2008-06-05
2
Affects Status Importance Assigned to Milestone
linux-meta (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: linux-image

Following instructions in https://help.ubuntu.com/community/Kernel/Compile I've got source package for kernel 2.6.24:

sudo apt-get build-dep linux-image-2.6.24-18-generic
apt-get source linux-image-2.6.24-18-generic

Trying to build kernel with default configurations for i386-generic:

AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-i386

And got errors:

  LD init/built-in.o
  LD .tmp_vmlinux1
kernel/built-in.o: In function `timespec_add_ns':
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__umoddi3'
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__udivdi3'
kernel/built-in.o: In function `timespec_add_ns':
/home/astar/bldtmp/linux-2.6.24/kernel/time/timekeeping.c:127: undefined reference to `__udivdi3'
/home/astar/bldtmp/linux-2.6.24/kernel/time/timekeeping.c:127: undefined reference to `__umoddi3'
kernel/built-in.o: In function `timespec_add_ns':
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__umoddi3'
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__udivdi3'
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__umoddi3'
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__udivdi3'
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__umoddi3'
/home/astar/bldtmp/linux-2.6.24/include/linux/time.h:177: undefined reference to `__udivdi3'
make[2]: *** [.tmp_vmlinux1] Error 1
make[1]: *** [sub-make] Error 2

as i can see __umoddi3\__udivdi3 defined in some non-x86 arches.

Wrong guide or broken source package?

$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04

linux-image-2.6.24-18-generic
version: 2.6.24-18.32

$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure linux gnu
Thread model: posix
gcc version 4.3.0 (Ubuntu 4.3.0-1ubuntu1)

Michael Sotnikov (stari4ek) wrote :

I've tried to build kernel from linux-source package (with .config from currently running 2.6.24-18-generic kernel ) - same errors.

Guys, how do you do it? =)

Michael Sotnikov (stari4ek) wrote :

same behavior with 2.6.24-19-generic (tested with linux-source package)

Michael Sotnikov (stari4ek) wrote :

Hmm...
OK. It looks like "well-known" bug, introduced by gcc-4.3 for 2.4.24 kernels
After changing gcc symlinks directly from 4.3 to 4.2 (/usr/bin/gcc and stuff) build successfully finished (setting CC, HOSTCC, HOSTCXX doesn't help me).

Is it time to close this bug? (till ubuntu switch to 2.6.25+ kernel or apply appropriate fix)

Changed in linux-meta:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers