net/libnet/ doesn't build

Hello,

I'm trying to build this port which is needed by Snort, but I can't do it and I don't know how to handle this:

Code:
===>  Building for libnet11-1.1.6_1,1
Making all in include
make  all-recursive
Making all in libnet
Making all in win32
Making all in src
/bin/sh /usr/local/bin/libtool --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -I. -I../include -I../include     -O2 -pipe -fPIC -fno-strict-aliasing -std=gnu89 -c -o libnet_link_pf.lo libnet_link_pf.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../include -I../include -O2 -pipe -fPIC -fno-strict-aliasing -std=gnu89 -c libnet_link_pf.c  -fPIC -DPIC -o .libs/libnet_link_pf.o
libnet_link_pf.c:36:35: error: ../include/low_libnet.h: No such file or directory
libnet_link_pf.c:44: error: expected ')' before '*' token
libnet_link_pf.c:62:23: warning: unknown escape sequence '\y'
libnet_link_pf.c: In function 'libnet_close_link_interface':
libnet_link_pf.c:137: error: dereferencing pointer to incomplete type
libnet_link_pf.c: At top level:
libnet_link_pf.c:151: error: expected ';', ',' or ')' before '*' token
*** [libnet_link_pf.lo] Error code 1

Stop in /usr/ports/net/libnet/work/libnet-1.1.6/src.
*** [all-recursive] Error code 1

Stop in /usr/ports/net/libnet/work/libnet-1.1.6.
*** [do-build] Error code 1

Stop in /usr/ports/net/libnet.
*** [install] Error code 1

Stop in /usr/ports/net/libnet.

If someone can help me.

Thank you.
 
First thing to know is which FreeBSD version you're using?

Second, I noticed that this port has some specific options which you can set up, did you by any chance change something in the configuration of the port? Although I'm not sure, I could imagine that using either snoop or pf could change its behaviour.
 
I checked the sources, and like the error states, file low_libnet.h really is missing, even after the # make patch or # make post-patch phase. I tried copying work/libnet*/include/libnet.h.in to work/libnet*/include/low_libnet.h to it, but it didn't work.

I don't have pf installed in my base system, so this might be the reason. Check if you have pf installed, or don't check the PF with # make config.

It would be nice if someone else checked, who has pf installed, maybe @ShelLuser?
 
Last edited by a moderator:
I'm trying to install this with FreeBsd FreeBSD 9.1 and I have installed pf. But with pf or snoop it doesn't work. It only builds when no options are checked.
 
OK, in this case you should report this problem to the port maintainer (# make -C /usr/ports/net/libnet/ maintainer) and submit a PR.

I was looking for the sources, and I stumbled across this, which is also missing low_libnet.h. Closer inspection of the file libnet_link_pf.c would suggest that this problem has been rectified upstream, but wasn't included in the port.

I tried writing a simple patch for that file, but it seems other headers, *.c files and most notably, the ../include/libnet.h.in, have been modified considerably. Since this is the latest release version, I can see what the maintainer was reluctant to include further revisions.

What's perhaps even weirder, is that the older revisions of the source all want to include this low_libnet.h, which is missing in all of them (until the version 1.2, which doesn't rely on that file anymore).
 
Back
Top