[driverloader] Driverloader won't build module because of bogus
error reported by kernelcompiler.sh
Linuxant support (Jonathan)
support at linuxant.com
Thu Dec 2 09:56:41 EST 2004
Hi,
as Stefan added, gcc 2.96 is probably on the CDs of Mandrakelinux. You
could try the 'urpmi gcc' command in a root shell to install it.
For compiling kernel modules, you need the exact same version of gcc
that was used to compile the kernel or else it will not work. Since your
kernel was compiled with gcc 2.96, you need to install 2.96 or else it
will not work, even if you have installed a newer version of gcc and you
modify our script. This is not a limitation of DriverLoader but a
limitation of the Linux kernel and/or gcc.
Regards,
Jonathan
Technical specialist / Linuxant
www.linuxant.com
support at linuxant.com
Stefan wrote:
> I think 8.2 also has gcc 2.96 on the cds, install it and then try again.
>
>
>
> Mark Starr wrote:
>
>> 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"...
>>
>>
>>
>> _______________________________________________
>> driverloader mailing list
>> driverloader at lists.linuxant.com
>> https://www.linuxant.com/mailman/listinfo/driverloader
>>
>>
>>
>
> _______________________________________________
> driverloader mailing list
> driverloader at lists.linuxant.com
> https://www.linuxant.com/mailman/listinfo/driverloader
More information about the driverloader
mailing list