LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel(2.6.18) compilation error in Debian Lenny (https://www.linuxquestions.org/questions/linux-general-1/kernel-2-6-18-compilation-error-in-debian-lenny-805080/)

jestinjoy 04-29-2010 10:35 PM

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

rweaver 04-30-2010 04:07 PM

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

knudfl 04-30-2010 07:18 PM

... 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

jestinjoy 05-01-2010 11:20 PM

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)


alan99 05-02-2010 12:42 AM

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?

rweaver 05-03-2010 11:48 AM

Quote:

Originally Posted by jestinjoy (Post 3954315)
# 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.


All times are GMT -5. The time now is 09:43 AM.