kernel build script error

Bug #586517 reported by B. Darryl DeGraff
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: kernel-package

Ubuntu 10.04 LTS (server, not desktop)
kernel-package: 12.032

This is an extract from building 2.6.33.3 kernel with RT patches applied

my command was:
   INSTALL_MOD_STRIP=1 CONCURRENCY_LEVEL=2 fakeroot make-kpkg --initrd --append-to-version=-bdd kernel_image kernel_headers modules_image

make[1]: Leaving directory `/usr/src/linux-2.6.33.3'
COLUMNS=150 dpkg -l 'gcc*' perl dpkg 'libc6*' binutils make dpkg-dev |\
         awk '$1 ~ /[hi]i/ { printf("%s-%s\n", $2, $3) }'> debian/stamp/build/info
uname -a >> debian/stamp/build/info
echo using the compiler: >> debian/stamp/build/info
if [ -f -f include/generated/compile.h ]; then \ <<<<==== this line is the error
           grep LINUX_COMPILER include/generated/compile.h | \
             sed -e 's/.*LINUX_COMPILER "//' -e 's/"$//' >> \
               debian/stamp/build/info; \
        elif [ -f include/linux/compile.h ]; then \
            grep LINUX_COMPILER include/linux/compile.h | \
              sed -e 's/.*LINUX_COMPILER "//' -e 's/"$//' >> \
                debian/stamp/build/info; \
         fi
[: 9: -f: unexpected operator
echo done > debian/stamp/build/kernel
/usr/bin/make -f ./debian/rules debian/stamp/binary/pre-linux-image-2.6.33.3-rt19-bdd
make[1]: Entering directory `/usr/src/linux-2.6.33.3'
====== making target debian/stamp/install/linux-image-2.6.33.3-rt19-bdd [new prereqs: ]======

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: kernel-package 12.032
Uname: Linux 2.6.33.3-rt19-bdd i686
Architecture: i386
Date: Thu May 27 14:22:29 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release i386 (20100427)
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
SourcePackage: kernel-package

Revision history for this message
B. Darryl DeGraff (darryl-degraff) wrote :
Revision history for this message
alien8 (fb-alien8) wrote :

Hi,

The simple fix is to delete this one "-f" in the referenced "if [ -f -f include/generated/compile.h ]; then \ <<<<==== this line is the error" line. So the line reads:
if [ -f include/generated/compile.h ]; then \

I also can confirm that this bug doesn't exist in the Desktop version. Strange. I run into it on Ubuntu Server amd64.

- a8

PS: To say it in diff:

--- common.mk 2010-09-01 23:33:31.000000000 +0200
+++ common.mk.new 2010-09-01 23:34:09.000000000 +0200
@@ -336,7 +336,7 @@
        @echo this was built on a machine with the kernel: >> debian/stamp/build/info
        uname -a >> debian/stamp/build/info
        echo using the compiler: >> debian/stamp/build/info
- if [ -f -f include/generated/compile.h ]; then \
+ if [ -f include/generated/compile.h ]; then \
           grep LINUX_COMPILER include/generated/compile.h | \
             sed -e 's/.*LINUX_COMPILER "//' -e 's/"$$//' >> \
                debian/stamp/build/info;

Revision history for this message
Giorgio Vazzana (mywing) wrote :

For me it exists in the Desktop version too:

holden@holden-desktop:~$ uname -a
Linux holden-desktop 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux

holden@holden-desktop:~$ dpkg -l | grep kernel-package
ii kernel-package 12.032 A utility for building Linux kernel related

holden@holden-desktop:~$ grep -r -e '-f *-f' /usr/share/kernel-package/
/usr/share/kernel-package/ruleset/targets/common.mk: if [ -f -f include/generated/compile.h ]; then \

Manoj, I see you're the mantainer of this package, could you please fix it? Thanks.

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.