Skip to contentSkip to conversation

kvm userland: configure does not check for gawk

DISCUSSION Ben Bucksch 3 participants 4 messages Sep 10, 2008 – Sep 13, 2008 KVM

lore
Share & tools
lore
#0 lore raw

If gawk is not installed, the build reports "gawk not found", but then fails with strange errors about kvm.h having the wrong version, mismatch between kernel and userland, and even more resulting errors later on. This sent me off the wrong trail.

Please:

1. Check that all apps used in the build process are checked in configure and reported right there. Esp. gawk in this case.
2. Improve the version check to not say "version mismatch" when the kvm.h file does not exist at all or is entirely empty, i.e. KVM_API_VERSION is empty.

#1 lore raw

Maybe something like this is in order:

configure +5 -0
index 3bb10ce..efbfa24 100755
@@ -102,6 +102,11 @@ if [ "$arch" = "powerpc" ]; then
     qemu_ldflags="$qemu_ldflags -L $PWD/libfdt"
 fi
 
+# check for some utils we use
+if [ -d .git -a ! -x "`which gawk`" ] ; then
+    echo "gawk not installed and necessary for compiling from git"
+fi
+
 #configure user dir
 (cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \
           --arch="$arch" \
Quoted 18 lines · Ben Bucksch

If gawk is not installed, the build reports "gawk not found", but then fails with strange errors about kvm.h having the wrong version, mismatch between kernel and userland, and even more resulting errors later on. This sent me off the wrong trail.

Please:

1. Check that all apps used in the build process are checked in configure and reported right there. Esp. gawk in this case.
2. Improve the version check to not say "version mismatch" when the kvm.h file does not exist at all or is entirely empty, i.e. KVM_API_VERSION is empty.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Or we could try a correct version:

configure +6 -0
index 3bb10ce..5cac4c8 100755
@@ -102,6 +102,12 @@ if [ "$arch" = "powerpc" ]; then
     qemu_ldflags="$qemu_ldflags -L $PWD/libfdt"
 fi
 
+# check for some utils we use
+if [ -d .git -a ! -x "`which gawk`" ] ; then
+    echo "gawk not installed and necessary for compiling from git"
+    exit
+fi
+
 #configure user dir
 (cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \
           --arch="$arch" \
Quoted 43 lines · Brian Jackson

Maybe something like this is in order:

configure +5 -0
index 3bb10ce..efbfa24 100755
@@ -102,6 +102,11 @@ if [ "$arch" = "powerpc" ]; then
     qemu_ldflags="$qemu_ldflags -L $PWD/libfdt"
 fi
 
+# check for some utils we use
+if [ -d .git -a ! -x "`which gawk`" ] ; then
+    echo "gawk not installed and necessary for compiling from git"
+fi
+
 #configure user dir
 (cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \
           --arch="$arch" \
Quoted 14 lines · Ben Bucksch

If gawk is not installed, the build reports "gawk not found", but then fails with strange errors about kvm.h having the wrong version, mismatch between kernel and userland, and even more resulting errors later on. This sent me off the wrong trail.

Please:

1. Check that all apps used in the build process are checked in configure and reported right there. Esp. gawk in this case.
2. Improve the version check to not say "version mismatch" when the kvm.h file does not exist at all or is entirely empty, i.e. KVM_API_VERSION is empty.

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 7 lines · Brian Jackson

Or we could try a correct version:

configure +0 -0
index 3bb10ce..5cac4c8 100755

configure if [ "$arch" = "powerpc" ]; then · line 111

Quoted 10 lines
configure +6 -0
@@ -102,6 +102,12 @@ if [ "$arch" = "powerpc" ]; then
     qemu_ldflags="$qemu_ldflags -L $PWD/libfdt"
 fi
 
+# check for some utils we use
+if [ -d .git -a ! -x "`which gawk`" ] ; then
+    echo "gawk not installed and necessary for compiling from git"
+    exit
+fi
+
 

'exit 1', and a changelog+signoff.

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.