FastNetMon

Friday 8 May 2015

pepsal 2.0.1 compilation on CentOS 6

Get code and build:
cd /usr/src/
wget 'http://downloads.sourceforge.net/project/pepsal/pepsal/pepsal-2.0.1/pepsal-2.0.1.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpepsal%2F&ts=1431072304&use_mirror=netcologne' -Opepsal-2.0.1.tar.gz
tar -xf pepsal-2.0.1.tar.gz
cd pepsal-2.0.1/
yum install -y libnetfilter_queue-devel
./configure --prefix=/opt/pepsal
But unfortunately something bad with code:
LANG=C make install
Making install in src
make[1]: Entering directory `/usr/src/pepsal-2.0.1/src'
gcc -DHAVE_CONFIG_H -I. -I../include    -I../include -g -O2 -MT pep.o -MD -MP -MF .deps/pep.Tpo -c -o pep.o pep.c
In file included from ../include/pepdefs.h:4,
                 from ../include/pepsal.h:16,
                 from pep.c:13:
/usr/include/sys/user.h:32: error: expected specifier-qualifier-list before '__uint16_t'
pep.c: In function 'nfqueue_get_syn':
pep.c:511: warning: passing argument 2 of 'nfq_get_payload' from incompatible pointer type
/usr/include/libnetfilter_queue/libnetfilter_queue.h:116: note: expected 'unsigned char **' but argument is of type 'char **'
make[1]: *** [pep.o] Error 1
make[1]: Leaving directory `/usr/src/pepsal-2.0.1/src'
make: *** [install-recursive] Error 1

And we need fix code. Please open include/pepdefs.h with editor and add this line before line #include <sys/user.h>:
#include <bits/types.h>

And compile again!

Well, everything works fins:
/opt/pepsal/bin/pepsal -V
PEPSal ver. 2.0.0
This bug related with broken code in sys/user.h: https://bugs.archlinux.org/task/20181

No comments :

Post a Comment

Note: only a member of this blog may post a comment.