Dear all
I am trying to install cisco vpn but unfortunately it fails
Directory containing linux kernel source code [/lib/modules/3.4.11-2.16-desktop/build]
* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/3.4.11-2.16-desktop/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/lib/modules/3.4.11-2.16-desktop/build" will be used to build the module.
Is the above correct [y]y
Making module
linuxcniapi.c:14:28: fatal error: linux/autoconf.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
interceptor.c:13:28: fatal error: linux/autoconf.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
IPSecDrvOS_linux.c:16:28: fatal error: linux/autoconf.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
frag.c:3:28: fatal error: linux/autoconf.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
linuxkernelapi.c:2:24: fatal error: linux/slab.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
ld: cannot find linuxkernelapi.o: No such file or directory
ld: cannot find frag.o: No such file or directory
ld: cannot find linuxcniapi.o: No such file or directory
ld: cannot find IPSecDrvOS_linux.o: No such file or directory
ld: cannot find interceptor.o: No such file or directory
Failed to make module "cisco_ipsec".
as you will see from the code above it looks for autoconf.h. Which packages is needed and how do I link for that file?
Thanks a lot it does not look like though that this path can be used for compiling the vpn package . It looks for the kernel libraries.
That was what the installation script was suggesting at the beginning
* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/3.4.11-2.16-desktop/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/lib/modules/3.4.11-2.16-desktop/build" will be used to build the module.
This is how I replied on the installation script and changed it
* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/3.4.11-2.16-desktop/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/usr/src/linux-3.4.11-2.16-obj/" will be used to build the module.
And that the error message I get now
In file included from IPSecDrvOS_linux.c:14:0:
/usr/include/linux/version.h:2:2: error: #error "======================================================="
/usr/include/linux/version.h:3:2: error: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: error: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: error: #error ""
/usr/include/linux/version.h:6:2: error: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: error: #error "working kernel version (as recommended by Linus Torvalds)"
Where are the source of the kernel? If I leave the default path of the script /lib/modules/3.4.11-2.16-desktop/build I get an error message for the linux/autoconf.h that is not found.
I do not know if someone has any idea. I have installed almost any dev package that has t do with kernels, kernels header trying to make that script happy. Where are the headers files that is looking (those should be the header files of my running kernel 3.4.11-2.16-desktop)
in /usr/src I have
lrwxrwxrwx 1 root root 17 9. Jan 14:26 linux -> linux-3.4.11-2.16
drwxr-xr-x 24 root root 4096 12. Jan 22:05 linux-3.4.11-2.16
drwxr-xr-x 3 root root 4096 12. Jan 21:46 linux-3.4.11-2.16-obj
drwxr-xr-x 3 root root 4096 12. Jan 21:46 linux-obj
drwxr-xr-x 8 root root 4096 24. Aug 19:32 packages
lrwxrwxrwx 1 root root 49 12. Jan 16:45 vboxguest-4.2.6 -> /opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6
lrwxrwxrwx 1 root root 32 9. Jan 12:03 vboxhost-4.2.6 -> ../share/virtualbox/src/vboxhost
I wouldn’t know for sure about your specific situation but in similar builds the “autoconfig”-whatever is generally a config file provided specially from the manufacturer (Cisco in this case) and usually part of the downloaded package. This does not appear to me a problem of locating files from OSS packages, you’re “missing” files that likely were part of a package you downloaded from Cisco.
If I were to hazard a guess, you’re not launching your build in the correct directory. There is further evidence of this because numerous files cannot be found by your build.
Recommend verifying this by looking for the file on your system.
For this reason, I have “locate-utils.rpm” on my system so that I can simply run “locate filename”
Kernel sources are split between multiple packages. Pure kernel sources are in kernel-source + kernel-devel; generated files, specific to each kernel flavor, are in kernel-flavor-devel, e.g. kernel-desktop-devel.
To build external module for which is compliant with kernel build architecture it should be enough to install kernel-devel + kernel-flavor-devel, e.g. kernel-devel + kernel-desktp-devel. kernel-source is really needed only to rebuild kernel from scratch. Here is what I have:
Error message you show indicates, that your module was not updated for current kernel. Location of autoconf.h was changed (probably, multiple times) and your module does not expect it in current location. Please ask module author whether it is supported under kernel 3.4 at all and whether there is newer version. If you can make sources available I could make a look at what it does.
Did you try vpnc? It is open source implementation compatible with Cisco VPN. I remember using it successfully with Cisco VPN servers.
Thanks a lot for all the nice answers. I “fixed” it in the sense that I installed, the plugin for the network manager and that worked pretty easily.
One more question regarding the
locate package you have been suggesting, do you know if it makes a big burden on the hard disk for building indexes where the files are. I am running on a very slow computer and I am wondering it this will eat up my laptop battery (by utilizing a lot the hard disk)
I can’t say about indexing, but you can uses file list of all RPM (ARCHIVE.gz) and pin program to search it. It will copy file from media if you have it:
bor@opensuse:~> pin
*** pin found no ARCHIVES_12.2.gz file in /var/lib/pin/
pin will copy the files, please enter root password :
Password:
no file ARCHIVES_12.2.gz found
please insert CD1/DVD in your CD-ROM/DVD drive / bitte CD1/DVD einlegen
please eject all medias from other drives / bitte entfernen Sie andere Medien aus den Laufwerken.
press enter to continue - Bitte enter druecken
please wait / bitte warten
no SUSE CD/DVD found, please copy ARCHIVES.gz manually to
/var/lib/pin/ARCHIVES_12.2.gz and execute
"ln -s /var/lib/pin/ARCHIVES_12.2.gz /var/lib/pin/ARCHIVES.gz"
keine SUSE CD/DVD gefunden, bitte ARCHIVES.gz manuell nach
/var/lib/pin/ARCHIVES_12.2.gz kopieren und
"ln -s /var/lib/pin/ARCHIVES_12.2.gz /var/lib/pin/ARCHIVES.gz" aufrufen
Unfortunately, it does not support search across multiple repos at the same time.
In case it was not clear. This allows you to search for files in packages that are not yet installed. Indexing files on disk will not help if file is not on disk
Otherwise something like
rpm -qa --qf '%{name}:%{filenames}
]'
will give you list of all packages and files they include. RPM database is already indexed.