building pftop from source fails

Shaddi Hasan shasan at email.unc.edu
Fri Apr 10 18:57:55 PDT 2009


Thanks Max! I fixed the OS_LEVEL and was able to compile mostly
without problems. I ran into some conditionally compiled code in
pftop.c (near line 1453) that I removed, and I used OpenBSD's queue.h
instead of the default system queue.h, as pftop requires the CIRCLEQ
api (pftop is written for OpenBSD).

As to why I'm doing this, I'm making modifications to pftop to allow
for more finely grained updates. First step of course was getting a
non-modified pftop to compile. The machine is on 6.0 for reasons
specific to our lab setup.

Again, thanks for your help.

Shaddi


On Fri, Apr 10, 2009 at 6:15 PM, Max Laier <max at love2party.net> wrote:
> On Friday 10 April 2009 23:20:12 Shaddi Hasan wrote:
>> I'm trying to get pftop-0.6 to compile from source on a FreeBSD 6.0
>> machine. I downloaded pftop-0.6.tar.gz from the author's website,
>
> Okay ... I got a couple of questions about this:
> 1) Why? There is sysutils/pftop ready for the taking
> 2) Why 6.0?  It's EOL'ed (esp. in the pf department)
> 3) Why?!?
>
>> extracted the contents to the machine, and ran "make" as root.
>> However, the build fails. The output is as follows:
>> ----------------
>> # make
>> cc -O2 -fno-strict-aliasing -pipe  -Wall -DOS_LEVEL=  -c
>
> There's your problem right there.  You need to set the OS_LEVEL in the
> Makefile in order to compile successfully.  See the aforementioned port's
> Makefile for sensible values depending on __FreeBSD_version.
>
>> I got similar output trying to compile pftop-0.7 (the most recent
>> version), as well as both packages on a FreeBSD 7.0 machine. Any
>> thoughts on why the build fails?
>
> ^ ... simply use the port.  Be advised, however, that the port fails to build
> on recent CURRENT due to the libpcap 1.0 update - workaround patch for that
> problem is attached, a proper solution should hit the tree over the weekend.
>
> --
> /"\  Best regards,                      | mlaier at freebsd.org
> \ /  Max Laier                          | ICQ #67774661
>  X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
> / \  ASCII Ribbon Campaign              | Against HTML Mail and News
>


More information about the freebsd-pf mailing list