[driverloader] Driverloader won't build module because of bogus error reported by kernelcompiler.sh

Mark Starr mrstarr at nyx.net
Wed Dec 1 21:51:56 EST 2004


I am trying to run driverloader on a Linux Mandrake 8.2 laptop, running
Kernel 2.4.18-6, with a Belkin Wireless G Notebook Network Card F5D7011
(cardbus card (gold edge), brand new, in pcmia slot)


I installed wireless-tools-23-2.i386.rpm, and the "generic"
driverloader-2.10-1.i386.rpm)
I have an old distro so I had to experiment with the older RPMS to find
ones that would install. (Are these the right rpms to use for this
disto? or did
I screw up from the get go?))

Driverloader is running...
I can access Driverloader web interface which is responding on
127.0.0.1:18020
and have configured it to use the appropriate Windows .inf & .sys
drivers for my cardbus
wifi card, the Belkin Wifi-G Card.


However, I can't get it to "compile the module". I installed the
kernel sources for my distro (ug).

When I run dldrconfig, it tries to comiple the module, it fails, and
tells me
to look at the but tells me I need look at the buildlog file for
answers...
which I do and it tells me gcc 2.96 or higher is needed.

I check (see the rpm -q gcc3.0) query below) and I have gcc 3.0
installed
(I also look with kpackage and find only gcc3.0 installed, no other gcc)





[root at mirrormirror mark]# dldrconfig
Linuxant DriverLoader for Wireless LAN devices, version 2.10

No pre-built modules for: Mandrake-8.2 linux-2.4.18-6mdk i586

Trying to automatically build the driver modules...
(this requires a C compiler and proper kernel sources to be installed)

Where is the linux source build directory that matches your running
kernel?
[/lib/modules/2.4.18-6mdk/build]

Building modules for kernel 2.4.18-6mdk, using source directory
/lib/modules/2.4.18-6mdk/build. Please wait...

ERROR: Module build failed!
Please examine the log file "/var/run/dldrconfig-buildlog.txt" to
determine why.
[root at mirrormirror mark]#cat /var/run/dldrconfig-buildlog.txt
../modules/kernelcompiler.sh: gcc version 2.96 or similar is required to
compile modules for your kernel
rm -rf *.o GPL/*.o *.ko GPL/*.ko *.mod.c GPL/*.mod.c .*.cmd GPL/.*.cmd

FALSE -DEXPORT_SYMTAB -o dldrmod.o dldrmod.c
make: *** [dldrmod.o] Error 1
[root at mirrormirror mark]# rpm -q gcc3.0
gcc3.0-3.0.4-2mdk
root at mirrormirror mark]# ls /lib/modules/2.4.18-6mdk/build
3rdparty/ Documentation/ include/ lib/ README
alsa-driver-0.5.12a/ drivers/ init/ MAINTAINERS REPORTING-BUGS
arch/ freeswan-1.95/ ipc/ Makefile Rules.make
COPYING fs/ kdb/ mm/ scripts/
CREDITS grsecurity/ kernel/ net/
[root at mirrormirror mark]#



The offending script kernelcompiler.sh (see below), which driverloader
is calling, apparently checks which gcc to use to compile the kernel,
and then
is telling me I need gcc 2.96 or higher, yet I have 3.0 installed


cat /usr/lib/driverloader/modules/kernelcompiler.sh
#!/bin/sh

# This small script tries to determine which compiler should
# be used to build kernel modules.
#
# Written by Marc Boucher <marc at linuxant.com>

KERNELVER="$1"
KERNELSRC="$2"

unset LANG

if [ -n "${RPM_BUILD_ROOT}" ]; then
if [ -f "${KERNELSRC}/kernelcompiler" ]; then
kstr="`cat \"${KERNELSRC}/kernelcompiler\"`"
else
kstr="gcc version 3.2"
fi
else
kstr="`cat /proc/version | sed -e 's/[^)]*) (//' -e 's/)[^)]*$//'`"
fi

case "$kstr" in
gcc?[vV]ersion\ *)
kstr="`echo \"$kstr\" | sed -e 's/^gcc.[vV]ersion //' -e 's/ .*//'`"
;;
*)
echo 1>&2 "$0: cannot determine version, using gcc"
echo gcc
exit 0
;;
esac

kgccver="${kstr}"
kgccvermin="`echo \"${kgccver}\" | sed -e
's/^\([^\.]*\.[^\.]*\)\..*/\1/'`"
kgccvermaj="`echo \"${kgccver}\" | sed -e 's/^\([^\.]*\)\..*/\1/'`"

for c in gcc /usr/bin/gcc[0-9]* /usr/bin/gcc-[0-9]* kgcc egcs gcc3
gcc296 gcc-2.96 gcc295 gcc-2.95; do
case "$c" in
/*)
c="`basename $c`"
;;
esac

if which $c >/dev/null 2>&1; then
v="`eval $c -v 2>&1 | tail -n 1`"
case "$v" in
gcc?[vV]ersion\ *)
;;
*)
continue
;;
esac

v="`echo $v | sed -e 's/^gcc.[vV]ersion //' -e 's/ .*//'`"
if [ "$v" = "$kgccver" ]; then
echo $c
exit 0
fi
if [ -z "${minmatch}" ]; then
v="`echo $v | sed -e 's/^\([^\.]*\.[^\.]*\)\..*/\1/'`"
if [ "$v" = "$kgccvermin" ]; then
minmatch="$c"
continue
fi
if [ -z "${majmatch}" ]; then
v="`echo $v | sed -e 's/^\([^\.]*\)\..*/\1/'`"
if [ "$v" = "$kgccvermaj" ]; then
majmatch="$c"
continue
fi
fi
fi
fi
done

if [ -n "${minmatch}" ]; then
echo "${minmatch}"
exit 0
fi

if [ -n "${majmatch}" ]; then
echo "${majmatch}"
exit 0
fi

echo 1>&2 "$0: gcc version $kstr or similar is required to compile
modules for your kernel"
echo false
exit 1


Been trying to get driverloader to work for 3 days now, not going to
give up and
not going to reformat to XP...      recommendations ... help...
anyone... ?

Should I hack this to bypass this check, or?  In which script would it
be...

I hate to do this, it would mean breaking a promise I made long ago to a
woman
to give up coding... ever since that tragic fateful night and
"THE ACCIDENT"...





More information about the driverloader mailing list