Package: comedi-source Version: 0.7.76+20090411cvs-2 Severity: important Tags: patch
Attempting to build comedi with module-assistant command # m-a -t -v a-b comedi yields the following error: ----------------------------------------------------------- checking for Linux build in /lib/modules/2.6.29-1-amd64/build... yes checking for separate Linux source and build directory... yes checking for Linux source in /usr/src/linux-headers-2.6.29-1-common O=/usr/src/linux-headers-2.6.29-1-amd64... not found configure: error: Linux source directory not found make[1]: *** [binary-modules] Error 1 make[1]: Leaving directory `/usr/src/modules/comedi' make: *** [kdist_build] Error 2 BUILD FAILED! ----------------------------------------------------------- This is happens because the configure script tries to extract the Linux source directory with dir=`sed -n -e 's/^MAKEARGS *:= *-C *\(.*\)/\1/p' "$LINUX_DIR/Makefile"` from /usr/src/linux-headers-2.6.29-1-amd64/Makefile. The MAKEARGS line in this file is MAKEARGS := -C /usr/src/linux-headers-2.6.29-1-common O=/usr/src/linux-headers-2.6.29-1-amd64 so configure sets dir=/usr/src/linux-headers-2.6.29-1-common O=/usr/src/linux-headers-2.6.29-1-amd64 and fails. The attached patch fixes the build for me. Note that I'm no sed wizard so maybe there is a more correct/robust way to fix things. Probably something along these lines should also be applied upstream to m4/as-linux.m4 where this test comes from. Although I guess the upcoming integration of comedi into the kernel (at least staging as of 2.6.30) will soon make this obsolete. Thanks, Jan -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.29-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages comedi-source depends on: ii bzip2 1.0.5-1 high-quality block-sorting file co ii debhelper 7.2.8 helper programs for debian/rules ii librtai-dev 3.6.1-1 Real Time Application Interface (m ii module-assistant 0.11.1 tool to make module package creati ii module-init-tools 3.7-pre9-1 tools for managing Linux kernel mo comedi-source recommends no packages. Versions of packages comedi-source suggests: ii kernel-package 12.013 A utility for building Linux kerne ii libcomedi0 0.8.1-5 Library for Comedi -- no debconf information
--- comedi/configure 2009-04-11 08:21:17.000000000 +0200 +++ comedi-patched/configure 2009-05-02 19:19:59.000000000 +0200 @@ -4196,7 +4196,7 @@ dir=`sed -n -e 's/^KERNELSRC *:= *\(.*\)/\1/p' "$LINUX_DIR/Makefile"` if test -z "$dir"; then # 2.6.25 - dir=`sed -n -e 's/^MAKEARGS *:= *-C *\(.*\)/\1/p' "$LINUX_DIR/Makefile"` + dir=`sed -n -e 's/^MAKEARGS *:= *-C *\([^[:space:]]*\).*/\1/p' "$LINUX_DIR/Makefile"` fi if test -z "$dir"; then { $as_echo "$as_me:$LINENO: result: no" >&5