FreeBSD 4.1 compile problems with 2.0.0a
Peter Van Epp
vanepp at sfu.ca
Mon Sep 4 20:28:37 EDT 2000
>
>
> I have tried to compile the latest argus on Free BSD 4.1. First problem
> I struck was:
>
> gcc -pthread -O -I. -I../include -DHAVE_SYS_IOCCOM_H=1
> -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERR
> OR=1 -DHAVE_SOCKADDR_SA_LEN=1 -c ./argus_filter.c
> ./argus_filter.c:3385: conflicting types for `ether_ntohost'
> /usr/include/net/ethernet.h:114: previous declaration of `ether_ntohost'
> *** Error code 1
This ones my fault. You are obviously using my modified kernel without
the IPV6 support (which I thought I was too, but I am actually using a GENERIC
kernel, I had built a new one but didn't install it on my initial test box). I
tested your fix on the GENERIC kernel and luckily it is happy there too so we
can just patch this and be OK for both the generic kernel and my trimmed down
version. Interestingly (and against the config file) BPF appears to work in
the GENERIC kernel.
<snip>
>
> Next I got:
>
> gcc -pthread -O -I . -I../include -DHAVE_SYS_IOCCOM_H=1
> -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1
> -DHAVE_SOCKADDR_SA_LEN=1 -c ./argus.c
> In file included from ./argus.c:59:
> ArgusModeler.h:109: netinet/rtp.h: No such file or directory
> *** Error code 1
>
> I did a find in /usr for rtp.h but did not find anything and I have no
> idea what it is.
>
> In short I'm stuck ;-)
I can't reproduce this one. I thought that the -pthread might be the
problem, but compiling only argus.c (rather than everything) with -pthread
doesn't create this error on my 4.1 RELEASE system. Are you by chance running
on 4.1 STABLE rather than RELEASE? The patch to server.Makefile.in below will
add the -pthread only to the link step (rather than all compiles) which may
correct this. I expect Carter will move it in to ./configure where it belongs
in the proper version because this one is FreeBSD specific. And finally there
is a new patch for the common.argus_filter.c which looks to break when you
comment out the IPV6 stuff in the FreeBSD GENERIC kernel.
>
> Oh, yes! while poking around in ArgusModeler.h I found a
> defined(__FreeBSD) which I assume should be defined(__FreeBSD__)
>
> Russell.
>
>
The following three patches make the latest tar file work for me on
4.1 RELEASE (under both GENERIC and ARGUS configed kernels):
*** server/ArgusModeler.h.orig Sat Sep 2 18:39:05 2000
--- server/ArgusModeler.h Sat Sep 2 18:39:37 2000
***************
*** 93,99 ****
#include <sys/types.h>
#include <sys/time.h>
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD)
#include <sys/socket.h>
#endif
--- 93,99 ----
#include <sys/types.h>
#include <sys/time.h>
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__)
#include <sys/socket.h>
#endif
*** server/Makefile.in.orig Fri Sep 1 08:22:08 2000
--- server/Makefile.in Sat Sep 2 18:47:01 2000
***************
*** 103,109 ****
PCAPLIB = @PCAPLIBDIR@
WRAPLIB = @WRAPLIBDIR@
! COMPATLIB = @COMPAT_LIB@ ../lib/argus_common.a -lpthread -lm
LIB = $(PCAPLIB) $(WRAPLIB) $(COMPATLIB)
--- 103,109 ----
PCAPLIB = @PCAPLIBDIR@
WRAPLIB = @WRAPLIBDIR@
! COMPATLIB = @COMPAT_LIB@ ../lib/argus_common.a -lm
LIB = $(PCAPLIB) $(WRAPLIB) $(COMPATLIB)
***************
*** 121,127 ****
all: $(PROG)
@INSTALL_BIN@/argus_ at V_PCAP@: $(OBJ) ../lib/argus_common.a
! $(CC) -o $@ $(OBJ) $(LIB)
install: force
$(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a
--- 121,127 ----
all: $(PROG)
@INSTALL_BIN@/argus_ at V_PCAP@: $(OBJ) ../lib/argus_common.a
! $(CC) -pthread -o $@ $(OBJ) $(LIB)
install: force
$(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a
*** common/argus_filter.c.orig Mon Sep 4 16:58:02 2000
--- common/argus_filter.c Mon Sep 4 17:00:58 2000
***************
*** 3381,3387 ****
static SIGRET nohostname(int);
#ifdef ETHER_SERVICE
struct ether_addr;
! #ifndef linux
extern int ether_ntohost(char *, struct ether_addr *);
#endif
#endif
--- 3381,3387 ----
static SIGRET nohostname(int);
#ifdef ETHER_SERVICE
struct ether_addr;
! #if ! defined(linux) && ! defined(__FreeBSD__)
extern int ether_ntohost(char *, struct ether_addr *);
#endif
#endif
--- cut here ---
Peter Van Epp / Operations and Technical Support
Simon Fraser University, Burnaby, B.C. Canada
More information about the argus
mailing list