[edgy] linux-2.6.18 build fails with incorrect version in deprecated 'version.h'

Bug #63882 reported by Klaus Heinrich Kiwi
0
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: kernel-package

This bug is related to kernel-package 10.049ubuntu4

Steps to reproduce:
1) untar linux-2.6.18.tar.bz2
2) cd linux-2.6.18
3) make-kpkg --rootcmd fakeroot --initrd --revision 1 kernel_image modules_image

after a while, the build process fails with
------------------cut-here----------------------------------------------
====== making target install/linux-image-kdump [new prereqs: ]======
This is kernel package version 10.049ubuntu4.
echo "The UTS Release version in include/linux/version.h"; echo " \"\" "; echo "does not match current version:"; echo " \"2.6.18\" "; echo "Please correct this."; exit 2
The UTS Release version in include/linux/version.h
     ""
does not match current version:
     "2.6.18"
Please correct this.
make: ** [install/linux-image-kdump] Erro 2
-------------------cut-here----------------------------------------------
The problem seems similar to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355147
but with this new target 'linux-image-kdump'.

Problem did not happened before in Dapper release (same kernel, same dir, same command)

description: updated
Revision history for this message
xtknight (xt-knight) wrote :

I'm having the same problem.

--------------------------------------------------------------------------------------------------
====== making target install/linux-image-2.6.18-k8 [new prereqs: ]======
This is kernel package version 10.049ubuntu4.
echo "The UTS Release version in include/linux/version.h"; echo " \"\" "; echo "does not match current version:"; echo " \"2.6.18-k8\" "; echo "Please correct this."; exit 2
The UTS Release version in include/linux/version.h
     ""
does not match current version:
     "2.6.18-k8"
--------------------------------------------------------------------------------------------------

I fixed it by going into ./include/linux/version.h and adding this definition:

#define UTS_RELEASE "2.6.18-k8"

Save the file and re-run the whole make-kpkg command again (don't do make-kpkg clean, do the compiling one). It'll detect what it has already built and continue on.

Revision history for this message
xtknight (xt-knight) wrote :

Sorry, I spoke a little too soon. It keeps failing anyway and the define seems to get lost when you run make-kpkg again.

Revision history for this message
xtknight (xt-knight) wrote :

Here's a workaround that fixes it:

http://www.gossamer-threads.com/lists/linux/kernel/667513

Credits to "Joel.Becker at oracle"

 On Sun, Jul 16, 2006 at 10:34:06AM -0400, Michael Krufky wrote:
> I get this when building using debian's make-kpkg:
>
> The UTS Release version in include/linux/version.h
> ""
> does not match current version:
> "2.6.18-rc2"
> Please correct this.

make-kpkg uses version.h to get UTS_RELEASE. UTS_RELEASE has
moved to utsrelease.h.

Right after you get the error, modify
debian/ruleset/misc/version_vars.mk

-UTS_RELEASE_VERSION=$(shell if [ -f include/linux/version.h ]; then \
- grep 'define UTS_RELEASE' include/linux/version.h | \
+UTS_RELEASE_VERSION=$(shell if [ -f include/linux/utsrelease.h ]; then \
+ grep 'define UTS_RELEASE' include/linux/utsrelease.h | \

And rerun your make-kpkg. The above is not a valid patch, you'll have
to hand change it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.