LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-30-2011, 01:43 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
"kernel includes do not match the current kernel" - please help to fix this (12.2)


Hi,
I tried to install the proprietary an ATI gpu driver for radeon 9600 on 12.2 v. The installer failed to compile a kernel module. Here is a syslog
Code:
[Message] Kernel Module : Trying to install a precompiled kernel module.
[Message] Kernel Module : Precompiled kernel module version mismatched.
[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
Error:
kernel includes at /lib/modules/2.6.27.7/build/include do not match current kernel.
they are versioned as ""
instead of "2.6.27.7".
you might need to adjust your symlinks:
- /usr/include
- /usr/src/linux
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
Look at the lines
Code:
kernel includes at /lib/modules/2.6.27.7/build/include do not match current kernel.
they are versioned as ""
instead of "2.6.27.7".
(see that empty '""' string?)
The path '/lib/modules/2.6.27.7/build' is a link to the kernel source
Code:
build -> /usr/src/linux-2.6.27.7
And here are the 'includes'
Code:
bash-3.1$ ls -Ll /lib/modules/2.6.27.7/build
total 920
-rw-r--r--  1 root root  18693 2008-11-21 00:02 COPYING
-rw-r--r--  1 root root  92899 2008-11-21 00:02 CREDITS
drwxr-xr-x 78 root root   4096 2008-11-21 00:02 Documentation
-rw-r--r--  1 root root   2430 2008-11-21 00:02 Kbuild
-rw-r--r--  1 root root 101926 2008-11-21 00:02 MAINTAINERS
-rw-r--r--  1 root root  56768 2008-11-21 00:02 Makefile
-rw-r--r--  1 root root 477472 2008-11-21 05:10 Module.symvers
-rw-r--r--  1 root root  16930 2008-11-21 00:02 README
-rw-r--r--  1 root root   3172 2008-11-21 00:02 REPORTING-BUGS
drwxr-xr-x 24 root root   4096 2008-11-21 05:12 arch
drwxr-xr-x  2 root root   4096 2008-11-21 05:12 block
drwxr-xr-x  3 root root   4096 2008-11-21 05:12 crypto
drwxr-xr-x 80 root root   4096 2008-11-21 05:12 drivers
drwxr-xr-x 17 root root   4096 2008-11-21 05:12 firmware
drwxr-xr-x 64 root root   4096 2008-11-21 05:12 fs
drwxr-xr-x 31 root root   4096 2009-01-17 16:42 include
drwxr-xr-x  2 root root     96 2008-11-21 05:12 init
drwxr-xr-x  2 root root   4096 2008-11-21 05:12 ipc
drwxr-xr-x  6 root root   4096 2008-11-21 05:12 kernel
drwxr-xr-x  6 root root   4096 2008-11-21 05:12 lib
drwxr-xr-x  2 root root   4096 2008-11-21 05:12 mm
drwxr-xr-x 43 root root   4096 2008-11-21 05:12 net
drwxr-xr-x  6 root root     48 2008-11-21 00:02 samples
drwxr-xr-x  9 root root   4096 2008-11-21 05:12 scripts
drwxr-xr-x  5 root root     88 2008-11-21 05:12 security
drwxr-xr-x 20 root root   4096 2008-11-21 05:12 sound
drwxr-xr-x  2 root root     40 2008-11-21 05:12 usr
drwxr-xr-x  3 root root      8 2008-11-21 00:02 virt
One of my explanation is that for an unknown reason the installer expects something like 'include-2.6.27.7' - but I don't think its true.

Im running Slackware 12.2 with generic 2.6.27.7 kernel. The system installation is out of stock - no customizations made.

The last thing
Code:
bash-3.1$ uname -r 
2.6.27.7

Last edited by igadoter; 10-30-2011 at 01:49 AM.
 
Old 10-30-2011, 06:03 AM   #2
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
That's ATI for you. Anyway, you could try "strace" to gain some insight what files the installer is trying to open. Good luck.
 
Old 10-30-2011, 10:37 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Thanks. Good to know about 'strace'
 
Old 10-30-2011, 11:32 AM   #4
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by Martinus2u View Post
That's ATI for you. Anyway, you could try "strace" to gain some insight what files the installer is trying to open. Good luck.
This has nothing to do with ATI. It sounds like a very simple case of the kernel headers not matching the running kernel.

igadoter, what kernel are you running? Did you copy the config file for your kernel from /boot /usr/src/linux-2.6.27.7 and run 'make prepare' in that directory?
 
Old 10-30-2011, 01:32 PM   #5
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Quote:
Originally Posted by adamk75 View Post
igadoter, what kernel are you running?
2.6.27.7-generic. I've posted 'uname -r' command output. The kernel's source is the kernel commonly shipped with Slackware.
Quote:
Did you copy the config file for your kernel from /boot /usr/src/linux-2.6.27.7 and run 'make prepare' in that directory?
No I didn't. But I'm surprised that such actions are necessary. Recently I installed the same Ati driver but under the recent Slackware version - simply by running the ati installer. I've just realized that then I was running the huge kernel - not the generic one. Maybe this is a solution - temporarily to switch to the huge kernel.
What is this command 'make prepare' for?
 
Old 10-30-2011, 01:48 PM   #6
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
'make prepare' sets up the kernel sources (including the headers necessary to build external modules) to build with the options in the config file.
 
Old 10-31-2011, 04:11 AM   #7
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Thanks adamk75. I'll give a try.

A one step ahead
Code:
[Message] Kernel Module : Trying to install a precompiled kernel module.
[Message] Kernel Module : Precompiled kernel module version mismatched.
[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.GCC* .??* *.symvers
make -C /lib/modules/2.6.27.7/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.27.7'

  WARNING: Symbol version dump /usr/src/linux-2.6.27.7/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
In file included from /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:169:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.h:164:1: warning: "PM_EVENT_SUSPEND" redefined
In file included from include/linux/device.h:23,
                 from include/linux/pci.h:53,
                 from /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:98:
include/linux/pm.h:267:1: warning: this is the location of the previous definition
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_MEM_VM_GetRegionPhysAddrStr':
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3223: warning: return makes pointer from integer without a cast
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3224: warning: return makes pointer from integer without a cast
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3225: warning: return makes pointer from integer without a cast
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3227: warning: return makes pointer from integer without a cast
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_io.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_str.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o
  LD [M]  /lib/modules/fglrx/build_mod/2.6.x/fglrx.o
  Building modules, stage 2.
  MODPOST 1 modules
/bin/sh: scripts/mod/modpost: No such file or directory
make[2]: *** [__modpost] Error 127
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27.7'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
Look at
Code:
/bin/sh: scripts/mod/modpost: No such file or directory
Inevitable true. But there are files 'modpost.h' and 'modpost.c'.

Last edited by igadoter; 10-31-2011 at 08:03 AM.
 
Old 10-31-2011, 03:17 PM   #8
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by adamk75 View Post
This has nothing to do with ATI. It sounds like a very simple case of the kernel headers not matching the running kernel.
Obviously not quite so simple, as they DO match. However, you may be on to something.

igadoter, I assumed you had built the new kernel in the directory /usr/src/linux-2.6.27.7 prior to installing the video driver. If not, please repeat the kernel build process before installing the video driver (cp <whatever> .config ; make oldconfig ; make ; make modules). That should also build the modpost binary.
 
Old 11-01-2011, 01:51 AM   #9
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I almost succeeded. The kernel module was built. Thanks @martinus2u. I followed your direction. But...
Code:
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "pci_enable_msi" [/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko] undefined!
WARNING: "pci_disable_msi" [/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko] undefined!
  CC      /lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o
  LD [M]  /lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
make[1]: Leaving directory `/usr/src/linux-2.6.27.7'
build succeeded with return value 0
duplicating results into driver repository...
done.
You must change your working directory to /lib/modules/fglrx
and then call ./make_install.sh in order to install the built module.
- recreating module dependency list
- trying a sample load of the kernel modules
failed.
[Error] Kernel Module : Failed to install compiled kernel module - please consult readme.
When I was trying
Code:
modprobe fglrx
root@enzo:# modprobe fglrx
FATAL: Error inserting fglrx (/lib/modules/2.6.27.7/kernel/drivers/char/drm/fglrx.ko): Unknown symbol in module, or unknown parameter (see dmesg)
[/code]
and 'dmesg' tells
Code:
root@enzo:~# dmesg | tail
fglrx: Unknown symbol pci_enable_msi
[drm] Module unloaded
fglrx: Unknown symbol pci_disable_msi
fglrx: Unknown symbol pci_enable_msi
fglrx: Unknown symbol pci_disable_msi
fglrx: Unknown symbol pci_enable_msi
fglrx: Unknown symbol pci_disable_msi
fglrx: Unknown symbol pci_enable_msi
OK. But nevertheless the thread is solved. I have to open a new thread about the ati driver.
 
  


Reply



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
kernel includes do not match current kernel rafc Linux - Newbie 5 04-23-2010 12:28 AM
LXer: Amarok 2.0.1.1 "Magellan" Released, Includes Security Fix LXer Syndicated Linux News 0 01-11-2009 05:50 PM
kernel update and "iptables: No chain/target/match by that name" thewtex Linux - Networking 4 04-03-2007 06:10 AM
sjw01748 Error "No Match for argument kernel" sjw01748 Linux - Newbie 0 01-20-2007 09:16 AM
kernel includes at /usr/src/linux/include do not match current kernel. blanny Red Hat 1 03-09-2006 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:59 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
Open Source Consulting | Domain Registration