Problem Installing Drivers for Sagem F@st USB Modem - "Error: kernel-sources cannot be found!"

Asked by carolinej

Hello All,

I am new to Ubuntu and my linux/unix skills are rusty so I'm hoping that someone here can help clear up my confusion.

I have been following the advice here:

As the previous driver installation advice I followed gave me no joy (, in fact I think I got stuck at a similar point and decided to start from scratch again.

To summarise, I follow the steps in the guide exactly (including installing the _exact_ linux header files for my kernel) and the problem occurs here after I use the "./configure" command:

blah blah blah
lots of clever impressive stuff I don't get yet
etc. etc.
configure: creating ./config.status
config.status: creating Makefile.common

distribution detected generic

dhcp support dhclient

pppd support yes
  pppoa support yes
  pppoe support no (runtime detection)

install eagleconnect (tcl/tk frontend) yes

generate documentation no

error: kernel-sources cannot be found!

Upon further reading the only advice I can find is to install the exact linux-header files, or, rather more frighteningly, there's advice on how to install/upgrade the kernel which seems rather drastic to me?

I am under the impression that installing the correct header files (linux-header-2.6.22-14-generic) should have put these kernel sources in place.

Can anyone help me out of this fix? I really want to ditch using Windows, but until I get the internet up and running on Ubuntu I'm kind of stuck with it.

Many thanks to anyone out there who can help!


Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Alan Pope 🍺🐧🐱 🦄
Last query:
Last reply:
Revision history for this message
Best Alan Pope 🍺🐧🐱 🦄 (popey) said :

Ok. after a bit of faffing around I think I have found the issue.

The kernel has changed since the configure script you are running was written. There is a test that the script does which will always fail.

(for those interested the configure script calls UTS_RELEASE and expects it to be in version.h - which it isn't - I discovered this via google and found - so we now know UTS_RELEASE is in utsrelease.h, not version.h)

Back to the question.

You need to edit in an editor of your choice (like gedit) and go to line 4813 and change the line from this:-

#include "$KERNELSRC/include/linux/version.h"

To this:-

#include "$KERNELSRC/include/linux/utsrelease.h"

Then run configure again.

Revision history for this message
carolinej (carolinej-is) said :

Hello Alan et al,

First off - Big Thank You Alan for looking into and solving that

I think that this was exactly the problem, and having made this change (to a file called configure rather than - is it just that the file type doesn't show?), everything looks healthy:

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for main in -lc... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for strftime... yes
checking for gettimeofday... yes
checking for select... yes
checking for socket... yes
checking for strcspn... yes
checking for strdup... yes
checking for strerror... yes
checking for strspn... yes
checking for strtol... yes
checking for ifconfig... yes
checking for route... yes
checking for pidof... yes
checking for dhclient... dhclient
checking for pppd... yes
checking for pppoe... no
checking for doc/man/eagleconfig.8... yes
checking for xsltproc... yes
   *** docbook stylesheets are missing, keeping prebuild version ***
checking for kernel version...
checking for hotplug... 0
checking for ifup... 1
checking for adictrl... no
checking for eaglectrl... no
checking for showstat... no
checking for eaglestat... no
checking for startadsl... no
checking for stopadsl... no
configure: creating ./config.status
config.status: creating Makefile.common
distribution detected Debian

dhcp support dhclient

pppd support yes
  pppoa support yes
  pppoe support no (runtime detection)

install eagleconnect (tcl/tk frontend) yes

generate documentation no
note: current gcc should be the same version as the one used to compile kernel.

However, when I then try the 'make' command, this happens:

caroline@caroline-ubuntu:~/Drivers/eagle-usb/eagle-usb-src$ make
make -C driver && \
        make -C pppoa && \
        make -C utils/scripts && \
        make -C utils/eagleconnect && \
        make -C doc
make[1]: Entering directory `/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver'
make -C /lib/modules/2.6.22-14-generic/build SUBDIRS=/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.22-14-generic'
  CC [M] /home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.o
In file included from /home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:34:
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/Adiutil.h:39:26: error: linux/config.h: No such file or directory
In file included from /home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eagle-usb.h:30,
                 from /home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:41:
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_types.h:718: warning: ‘kmem_cache_t’ is deprecated
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:174: error: unknown field ‘owner’ specified in initializer
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:174: warning: initialization from incompatible pointer type
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:246: error: expected ‘)’ before string constant
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:248: error: expected ‘)’ before string constant
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:762:51: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c: In function ‘eu_init_postfirm’:
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:762: error: ‘INIT_WORK’ undeclared (first use in this function)
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:762: error: (Each undeclared identifier is reported only once
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:762: error: for each function it appears in.)
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:769:46: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c: In function ‘eu_disconnect_postfirm’:
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:950: error: ‘URB_ASYNC_UNLINK’ undeclared (first use in this function)
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c: In function ‘eu_user’:
/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.c:1568: warning: passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
make[3]: *** [/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver/eu_main.o] Error 1
make[2]: *** [_module_/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.22-14-generic'
make[1]: *** [eagle-usb.ko] Error 2
make[1]: Leaving directory `/home/caroline/Drivers/eagle-usb/eagle-usb-src/driver'
make: *** [build] Error 2

Can anyone shed any light on this? I don't know if one little thing being solved will sort everything else or if this is a mass of problems?

Revision history for this message
carolinej (carolinej-is) said :

I'm marking this as solved as I have put the new errors as a new question

Revision history for this message
carolinej (carolinej-is) said :

Thanks Alan Pope, that solved my question.