LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 09-14-2005, 04:54 PM   #1
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Rep: Reputation: 0
Smile Ndiswrapper cant find "right" kernel source


Hi! I have problem compiling Ndiswrapper (current version) on Slack 10.1 with latest 2.6.13 kernel (installed from /testing dir on slack current). The Kernel was quite easy to install, I followed the instructions exactly in /testing dir and everything works like a charm. The problem now when im trying to install Ndiswrapper is that it can’t find the kernel source.

I first give the “make distclean” command as instructed for Ndiswrapper installation (don’t now why though :-) , something about the compiler?). Then I issue the “make KSRC=/usr/src/linux-2.6.13/” command and it can’t find the source (only make wont work). I have extracted the same source for 2.6.13 that I found In the /testing dir on /current to /usr/src/linux-xxx. I’ve tried everything and it won’t work. In /usr/src/ there is also the old 2.4 kernel and 2.6 headers from testing (and a link “of a kind” to the old 2.4 kernel called “Linux”). Ndiswrapper only detects the kernel when I add “KSRC=/usr/src/linux” or “KSRC=/usr/src/linux-2.4.xx” to make. I’m quite sure im supposed to use the kernel im using as default, 2.6.13.

The other thing is when make detects the old kernel and starts the next step it complains it can’t find the modules…

Any ideas?… any pre-compiled Slackware Ndiswrapper packages? (for kernels in testing dir)
 
Old 09-14-2005, 05:00 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Welcome to LQ.

Just change the linux symlink and then you don't need to export any variables first:
rm -f /usr/src/linux
ln -s /usr/src/linux-2.6.13 /usr/src/linux
 
Old 09-14-2005, 08:42 PM   #3
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks. The "symlink" (hafto read up on that) is working but i dont think its the real problem. Got the same error this time. The log is below:

bash-3.00# make
make -C driver
make[1]: Entering directory `/usr/src/ndiswrapper-1.3rc1/driver'
Can't find kernel sources in /lib/modules/2.6.13/build;
give the path to kernel sources with KSRC=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/usr/src/ndiswrapper-1.3rc1/driver'
make: *** [all] Error 2

bash-3.00# make KSRC=/usr/src/linux
make -C driver
make[1]: Entering directory `/usr/src/ndiswrapper-1.3rc1/driver'
Can't find kernel sources in /usr/src/linux;
give the path to kernel sources with KSRC=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/usr/src/ndiswrapper-1.3rc1/driver'
make: *** [all] Error 2

bash-3.00# make KSRC=/usr/src/linux-2.6.13
make -C driver
make[1]: Entering directory `/usr/src/ndiswrapper-1.3rc1/driver'
Can't find kernel sources in /usr/src/linux-2.6.13;
give the path to kernel sources with KSRC=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/usr/src/ndiswrapper-1.3rc1/driver'
make: *** [all] Error 2

bash-3.00# make KSRC=/usr/src/linux-2.4.29
make -C driver
make[1]: Entering directory `/usr/src/ndiswrapper-1.3rc1/driver'
make -C /usr/src/linux-2.4.29 SUBDIRS=/usr/src/ndiswrapper-1.3rc1/driver \
DRIVER_VERSION=1.3rc1 \
UTILS_VERSION=1.2 modules
make[2]: Entering directory `/usr/src/linux-2.4.29'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-include scripts/split-include.c
scripts/split-include include/linux/autoconf.h include/config
make -C /usr/src/ndiswrapper-1.3rc1/driver CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.29/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i486 -DMODULE" MAKING_MODULES=1 modules
make[3]: Entering directory `/usr/src/ndiswrapper-1.3rc1/driver'
make[3]: *** No rule to make target `modules'. Stop.
make[3]: Leaving directory `/usr/src/ndiswrapper-1.3rc1/driver'
make[2]: *** [_mod_/usr/src/ndiswrapper-1.3rc1/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.29'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/src/ndiswrapper-1.3rc1/driver'
make: *** [all] Error 2
bash-3.00#

As you can see it finds the kernel when i add the KSRC=/usr/src/linux-2.4.29 command. Im realy lost in the forest, probably doing something stupid (for some reason its always the easy problems that takes days to fix).
 
Old 09-15-2005, 02:19 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Did you "make clean" after changing the symlink?
 
Old 09-15-2005, 04:26 PM   #5
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
Yea. The same result. With "make clean" or "make distclean" results in the same error. I found similar error while trying to install Nvidia drivers, maybe it can shed some light on the issue. Pasted the important part of the error log below:

-> /proc/version is Linux version 2.6.13 (root@midas) (gcc version 3.3.6) #1
Sat Sep 3 21:11:20 PDT 2005
-> No precompiled kernel interface was found to match your kernel; this means
that the installer will need to compile a new kernel interface.
-> Kernel source path: '/lib/modules/2.6.13/source'
-> Kernel output path: '/lib/modules/2.6.13/build'
-> Performing cc_version_check with CC="cc".

Snip

If you are using a Linux 2.6 kernel, please make sure you have configured kernel sources matching your kernel installed on your system. If you specified a separate output directory using either the "KBUILD_OUTPUT" or the "O" KBUILD parameter, make sure to specify this directory with the SYSOUT environment variable or with the appropriate nvidia-installer command line option

Snip

-> No precompiled kernel interface was found to match your kernel; this means
that the installer will need to compile a new kernel interface.
-> Using the kernel source path '/lib/modules/2.6.13/source' as specified by
the '--kernel-source-path' commandline option.
-> Kernel source path: '/lib/modules/2.6.13/source'
-> Using the kernel output path '/lib/modules/2.6.13/build' as specified by the
'--kernel-output-path' commandline option.
-> Kernel output path: '/lib/modules/2.6.13/build'
-> Performing cc_version_check with CC="cc".

Thanks for the help..
 
Old 09-15-2005, 04:53 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Are the kernel sources definately there? Can you post the output from:
ls -la /usr/src/linux/
 
Old 09-16-2005, 08:33 AM   #7
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
bash-3.00# ls -la /usr/src/linux
lrwxrwxrwx 1 root root 21 2005-09-15 02:19 /usr/src/linux -> /usr/src/linux-2.6.13

bash-3.00# ls -la /usr/src/
total 2
drwxr-xr-x 7 root root 232 2005-09-15 02:20 .
drwxr-xr-x 18 root root 544 2004-10-14 05:19 ..
lrwxrwxrwx 1 root root 21 2005-09-15 02:19 linux -> /usr/src/linux-2.6.13
drwxr-xr-x 15 root root 584 2005-01-20 20:41 linux-2.4.29
drwxr-xr-x 18 root root 600 2005-08-29 01:41 linux-2.6.13
drwxr-xr-x 5 root root 336 2005-09-15 02:20 ndiswrapper-1.3rc1
drwxr-xr-x 7 root root 168 2003-10-29 07:08 rpm
drwxr-xr-x 2 root root 176 2005-01-20 23:31 speakup-2.4.29


I got the source and pakages from this location.
slackware.perespim.ru/pub/slackware-current/testing/

So hows the whether in Scotland... usually we get your whether a few days later (but somewhat milder)..
 
Old 09-17-2005, 10:04 AM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Sorry, but you missed the / on the end of the path. I was trying to see if the source directory is in tact.

It's a bit wet here today but if it keeps going like it is now there'll be nothing left by the time it reaches you.
 
Old 09-18-2005, 07:42 AM   #9
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
bash-3.00# ls -la /usr/src/linux-2.6.13
total 248
drwxr-xr-x 18 root root 600 2005-08-29 01:41 .
drwxr-xr-x 7 root root 232 2005-09-15 02:20 ..
-rw-r--r-- 1 root root 18691 2005-08-29 01:41 COPYING
-rw-r--r-- 1 root root 89317 2005-08-29 01:41 CREDITS
drwxr-xr-x 52 root root 5000 2005-08-29 01:41 Documentation
-rw-r--r-- 1 root root 58899 2005-08-29 01:41 MAINTAINERS
-rw-r--r-- 1 root root 44448 2005-08-29 01:41 Makefile
-rw-r--r-- 1 root root 14542 2005-08-29 01:41 README
-rw-r--r-- 1 root root 3072 2005-08-29 01:41 REPORTING-BUGS
drwxr-xr-x 26 root root 632 2005-08-29 01:41 arch
drwxr-xr-x 2 root root 968 2005-08-29 01:41 crypto
drwxr-xr-x 51 root root 1304 2005-08-29 01:41 drivers
drwxr-xr-x 56 root root 3016 2005-08-29 01:41 fs
drwxr-xr-x 38 root root 1000 2005-08-29 01:41 include
drwxr-xr-x 2 root root 424 2005-08-29 01:41 init
drwxr-xr-x 2 root root 304 2005-08-29 01:41 ipc
drwxr-xr-x 4 root root 1552 2005-08-29 01:41 kernel
drwxr-xr-x 5 root root 1376 2005-08-29 01:41 lib
drwxr-xr-x 2 root root 1232 2005-08-29 01:41 mm
drwxr-xr-x 32 root root 968 2005-08-29 01:41 net
drwxr-xr-x 9 root root 1256 2005-08-29 01:41 scripts
drwxr-xr-x 4 root root 320 2005-08-29 01:41 security
drwxr-xr-x 16 root root 520 2005-08-29 01:41 sound
drwxr-xr-x 2 root root 136 2005-08-29 01:41 usr

I have tested with both the source from kernel.org and the source from testing dir.

We love the effort you put in to keep us Swedes dry :-)
 
Old 09-18-2005, 08:20 AM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
This does seem odd. Is the build symlink definately correct?

Try:
rm -f /lib/modules/2.6.13/build
ln -s /usr/src/linux-2.6.13 /lib/modules/2.6.13/build
 
Old 09-18-2005, 09:03 AM   #11
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
Same problem. I ran the commands and it worked as far as changing the symlink but the problem is the same when trying to make Ndis.

I used ftp://slackware.perespim.ru/pub/slac.../README.initrd when updating the kernel. As far as know it worked perfectly. I used the testing kernel because i didn't want to go trough all the settings if i compiled the kernel source myself (really don't know half of the options when i tried first time). Ive seen some other threads about this and the ones compiling their kernel seem to solve the problem with Ndis... maybe a clue there?

Its a mess... Though its good to learn more about the system...
 
Old 09-18-2005, 09:07 AM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
I've never had a problem getting ndiswrapper to compile myself but I do compile my kernels myself. It might be worth a try but I can't see what it could be doing differently.
 
Old 09-18-2005, 09:15 AM   #13
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
Ill try it. Maybe you could give me some small advice. I used the oldconfig option last time to only mess with the new options for kernel 2.6 after the installation of the 2.4.29 kernel (from CD installation). Is there any way to get less options (even if understand many of the options its no guarantee ill make the right one). Maybe its easier to make an 2.6 installation CD (saw an thread somewhere)

And do i still need an initial ramdisk?
 
Old 09-18-2005, 09:26 AM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Assuming you don't have any extremely odd hardware then most of the default configuration options should be fine. Just make sure that any filesystems you use (at least for / and /boot) are compiled into your kernel and not as modules.

I'm not sure what you mean with regards to the installation CD.

You should not need a ramdisk unless you have modules that need to be loaded before the root filesystem or you have a special need such as using a bootsplash screen.
 
Old 09-19-2005, 03:59 PM   #15
Anders.H
LQ Newbie
 
Registered: Sep 2005
Location: SWE
Posts: 9

Original Poster
Rep: Reputation: 0
First of all thanks for all the help. I did an 10.2 installation. Of course a few new problems pop upp. But i must say more stuff is working. If you have the will i have a few more Ndis questions.

I got make to run with 2.6 but now it complaines about stuff i dont understand at all. By the way the usr/src/Linux symlink among others seems to be gone when doing install with 2.6 (dont mind if the kernel is somewhat bloated from the CD).

Its a really long log so here comes a few snipps, it started with only the make command:

/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:547: warning: data definition has no type or storage class
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:548: warning: type defaults to `int' in declaration of `Section'
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:548: warning: data definition has no type or storage class
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:549: error: syntax error before '}' token
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:549: warning: type defaults to `int' in declaration of `IMAGE_AUX_SYMBOL'
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:549: warning: data definition has no type or storage class
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:550: error: syntax error before '*' token
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:550: warning: type defaults to `int' in declaration of `PIMAGE_AUX_SYMBOL'
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:550: warning: data definition has no type or storage class
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:657: error: syntax error before "DWORD"
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:657: warning: no semicolon at end of struct or union
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:658: warning: type defaults to `int' in declaration of `TimeDateStamp'
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:658: warning: data definition has no type or storage class
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:659: error: syntax error before "MajorVersion"
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:659: warning: type defaults to `int' in declaration of `MajorVersion'
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:659: warning: data definition has no type or storage class
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:660: error: syntax error before "MinorVersion"
/root/Network/ndiswrapper-1.3rc1/driver/pe_linker.h:660: warning: type defaults to `int' in declaration of `MinorVersion'

Snip

include/linux/skbuff.h:141: error: storage size of `frags' isn't known
include/linux/pci.h:538: error: storage size of `dev' isn't known
include/linux/wireless.h:742: error: storage size of `channel_list' isn't known
include/linux/wireless.h:873: error: storage size of `qual' isn't known
include/linux/wireless.h:835: error: storage size of `discard' isn't known
include/linux/wireless.h:836: error: storage size of `miss' isn't known
include/linux/wireless.h:869: error: storage size of `retry' isn't known
include/linux/wireless.h:871: error: storage size of `encoding' isn't known
include/linux/wireless.h:878: error: storage size of `param' isn't known
include/linux/wireless.h:939: error: storage size of `max_qual' isn't known
include/linux/wireless.h:949: error: storage size of `avg_qual' isn't known
include/linux/wireless.h:1000: error: storage size of `freq' isn't known
include/linux/usb.h:291: error: storage size of `kref' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:399: error: storage size of `dev_queue' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:400: error: storage size of `dpc' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:443: error: storage size of `driver_name' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:457: error: storage size of `service_key_name' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:486: error: storage size of `file_name' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:619: error: storage size of `io_status' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:664: error: storage size of `apc' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:954: error: storage size of `interrupt_time' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:955: error: storage size of `system_time' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:956: error: storage size of `time_zone_bias' isn't known
/root/Network/ndiswrapper-1.3rc1/driver/winnt_types.h:969: error: storage size of `processor_features' isn't known
make[3]: *** [/root/Network/ndiswrapper-1.3rc1/driver/hal.o] Error 1
make[2]: *** [_module_/root/Network/ndiswrapper-1.3rc1/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.13'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/root/Network/ndiswrapper-1.3rc1/driver'
make: *** [all] Error 2
bash-3.00#

Lol, what can i say... (and you haven't yet seen the enormous Nvidia log)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 11:28 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 03:32 PM
Can you explain the difference between "Free Software (GNU)" and "Open Source"? vharishankar General 5 03-03-2005 10:40 AM
Kernel question: difference between Patch and "regular" kernel source kopikat Linux - Software 1 01-26-2005 06:24 PM
"Cannot find header source files" when trying to install Nvidia 6111 drivers naddad Linux - Newbie 3 08-31-2004 01:42 PM


All times are GMT -5. The time now is 11:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration