-   Linux - Software (
-   -   PortBunny install issue related to Linux headers (

shayno90 02-20-2012 05:59 AM

PortBunny install issue related to Linux headers
Ran into an installation issue during the 'make' stage of the installation:

root@user:/home/user/PortBunny-1.1.1# make
make -C /lib/modules/2.6.32-35-generic/build M=/home/user/PortBunny-1.1.1 modules
make[1]: leaving directory `/usr/src/linux-headers-2.6.32-35-generic'
CC [M] /home/user/PortBunny-1.1.1/scanner_module.o
In file included from /home/user/PortBunny-1.1.1/scanner_module.c:76:
/home/user/PortBunny-1.1.1/scan_job_manager.h:5:27: error: asm/semaphore.h: No such file or directory
make[2]: *** [/home/user/PortBunny-1.1.1/scanner_module.o] Error 1
make[1]: *** [_module_/home/user/PortBunny-1.1.1] Error 2
make[1]: leaving directory `/usr/src/linux-headers-2.6.32-35-generic'
make: *** [all] Error 2

Applied the patch below but no change and the same result as above:

user@user:~$ patch -Np1 -d PortBunny-1.1.1 < portbunny-noui.diff
patching file UI/share/portbunny/
patching file UI/share/portbunny/
patching file UI/share/portbunny/

How can I correct the Linux headers or Portbunny package in order to compile and install it correctly?

liberalchrist 02-21-2012 06:48 PM

Look in /usr/src/linux-headers-2.6.32-35-generic/include and see if the directory "asm" exists. In later kernels "semaphore.h" was moved to .../include/linux instead of asm. You might get it to compile by creating the directory and adding a symlink, but I'm guessing that there is PortBunny patch somewhere for this problem.

liberalchrist 02-21-2012 07:05 PM

I checked the PortBunny website. Version 1.1.1 still has this problem with newer kernels. The development version has been updated to look in /include/linux instead of /include/asm.

shayno90 02-22-2012 03:36 AM

Yes, the file semaphore.h is not in the appropriate install directory as you said, it is located in /usr/src/linux-headers-2.6.32-35-generic/include/linux instead of /usr/src/linux-headers-2.6.32-35-generic/include/asm-generic.

I managed to compile and install this version of Portbunny050109:

I had to install 2 patches to properly compile and install it:

The patches that need to be added are:

1. installpath.patch
2. timespec.patch

I will try at some stage to compile and install Portbunny-1.1.1 by creating the directory and adding a symlink as you described.

How do you create the symlink?

liberalchrist 02-22-2012 06:26 PM

If you have a working, more up-to-date version of PortBunny, you really shouldn't want to build 1.1.1. There is considerable likelihood that it won't work anyway. As I was looking through the source code, I noticed that there were several things it was looking for that it wouldn't be able to find. The kernel headers are intended to be kept in pristine, unmodified condition. This is so everything that wants to compile against them won't have trouble finding them.

That said, the command would be "ln -s linux asm". You would run that in the include directory inside the source code where you were looking before. Again, probably a bad idea. This is why they make patches instead.

All times are GMT -5. The time now is 10:08 PM.