I’m not sure if this is the right place but… I’m currently trying to run OpenSUSE 11.0 within OS X using VMWare Fusion and having issues trying to install VMWare Tools.
The issue I’m having is that it can’t find C header files that match my running kernel – where would these be located?
Thanks,
J
**Your kernel was built with “gcc” version “4.3.1”, while you are trying to use
“/usr/bin/gcc” version “4.3”. This configuration is not recommended and VMware
Tools may crash if you’ll continue. Please try to use exactly same compiler as
one used for building your kernel. Do you want to go with compiler
“/usr/bin/gcc” version “4.3” anyway? [no] yes
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/linux-obj/x86_64/default/include/
The directory of kernel headers (version 2.6.25.11-0.1-default) does not match
your running kernel (version 2.6.25.5-1.1-default). Even if the module were to
compile successfully, it would not load into the running kernel.
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]
Could you please clarify what exactly the problem scenario is?
Specifically, are you trying to install the Vmware Tools in a Mac Os X host when you get those messages or they come from within the Open Suse system guest?
When you state "The issue I’m having is that it can’t find C header files that match my running kernel – where would these be located? " you mean the kernel headers of the Mac Os X system or the Open Suse 11 one?
What I told you before was related to Open Suse not to Mac Os.
Anyway, in a Open Suse system you can find out the releases of gcc and the specific version used to compile the kernel using, for example the commands:
gcc --version
rpm -q gcc
modinfo scsi_mod | grep vermagic
The output of the first two commands contains the release of gcc installed in your system, while the third gives you the one used to build one of the kernel modules that you will likely find in every linux system nowdays.
Unless you have upgraded/compiled manually the kernel and/or upgraded/installed the gcc package, they should match.
Thanks carboncore, Chrysantine. Okay, so more information…
I installed opensuse from a disk image file on a virtual hard disk using VMWare Fusion.
To attain good performance, VMWare asks that you install a set of ‘tools’ on the guest system. This amounts to VMWare putting a directory with an installer script in it onto virtual hard disk which you can then run from the terminal window within the guest OS.
On running this on the first boot of the virtual machine (after installation) it ran into problems: it couldn’t find make or gcc. So I installed these using yast, possibly leading the discrepant versions of gcc and the first error message – will this be an issue?
The second error message is related to the fact that I can’t answer the question:
“What is the location of the directory of C header files that match your running kernel?”
If I give it the default answer of /usr/src/linux/include it says that it can’t find headers in the directory.
If I give it a different, explicit directory as I posted before, I get the error that the versions don’t match.
carboncore: These should be the open suse files since I don’t think the installer script can ‘see’ the host hard disk straightforwardly. So… I’m trying to find the C header files that match my kernel build. – I’m at work right now but when I get back I can give you the other information.
Chrysantine: So I have the headers etc, but where are they? Even after a re-boot, the guest OS (open suse) says that it can’t find them in /usr/src/linux/include
The directory of kernel headers (version 2.6.25.11-0.1-default) does not match
your running kernel (version 2.6.25.5-1.1-default)
You are running kernel 2.6.25.5-1.1 but the kernel header files which you have installed are for version 2.6.25.11-0.1
Make sure that you have the exact same version of the headers as your running kernel !
So, downgrade the header file package or upgrade the kernel and reboot.
Chrysantine: this returns the error that I already have it installed. A re-boot doesn’t change the situation on the installer and the error message is:
The path “/usr/src/linux/include” is a kernel header file directory, but it
does not contain the file “linux/version.h” as expected. This can happen if
the kernel has never been built, or if you have invoked the “make mrproper”
command in your kernel directory. In any case, you may want to rebuild your
kernel.
LRE: how do I undertake either the upgrade or the downgrade?
Should I also upgrade gcc to match? I have the gcc from yast, so I guess I only need to upgrade?
carboncore: here’s the info you suggested I get. In particular modinfo doesn’t work.
> gcc --version
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> rpm -q gcc
gcc-4.3-39.1
> modinfo scsi_mod | grep vermagic
bash: modinfo: command not found
Ignore my latest post. In Open Suse 11 no information regarding the release of gcc is included in the vermagic tag of a given module, so that in this case there is no point in using modinfo.
I was at a SLES 1O system this morning when I suggested running that command to find out easily what release of gcc was used to build it, but in Open Suse 11 that does not apply.
Sorry for the confusion.
Now from the output of the first two commands, your system is running the right gcc release, so we can rule out gcc as the source of the problem.
Regarding the other packages involved in the issue, they should be:
linux-kernel-headers: 2.6.25-8.1
kernel-default: 2.6.25.5-1.1
And, if you have installed the kernel source, it should be
kernel-source: 2.6.25.5-1.1
So, proceed as suggested by LRE and Chrysantine to make them all match.
Thanks Chrysantine – that seemed to reinstall everything including the kernel headers but there’s still nothing appropriate in /usr/src/linux/include so it still fails to install. Might the headers have been installed elsewhere?
Do you think it might be worth going from scratch? I can remove the virtual HD and reinstall relatively trivially.
Same with OS11 VMPlayer 2.xx. The GCC version mismatch warning was not an issue, this has been explored in other threads. As usual the kernel headers didn’t work, had to install kernel-sources.
But I understand that when using OS11 as a guest it already has precompiled tools packages, at least for Virtualbox?
This was definitely a bit confusing for me as well, but I believe I found a solution.
Contrary to what I though, and contrary to many posts you see, the version of the kernel headers does NOT have to match your running kernel. I know, I know . . . just listen though.
The headers are intended for each major revision, so if you are trying to find them for say kernel 2.6.25.16-0.1 you will never find them, the latest you will find is 2.6.25-8.1. Also you can’t just down grade your kernel 25-8.1 as that version is not available in the repos.
A catch 22 right? I found the solution was to install kernel-syms - which also installs the full kernel sources, like this: