Has anyone successfully compiled Argus on Mac OS X

Andy andy at quadrant.net
Fri May 10 17:32:05 EDT 2002


Thanks, that worked great.  You can now add mac os x to your list of 
supported platforms.

One quick question..how did you know to use (__APPLE_CC__) as the 
defined value?

Andy

Here are the diff files:



diff --context -r argus-2.0.5/common/gencode.c 
argus-2.0.5_macosx/common/gencode.c
*** argus-2.0.5/common/gencode.c	Tue May  7 08:02:28 2002
--- argus-2.0.5_macosx/common/gencode.c	Fri May 10 15:13:31 2002
***************
*** 40,46 ****
    */


! #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || (__OpenBSD__)
   #include <sys/types.h>
   #include <sys/socket.h>
   #endif
--- 40,46 ----
    */


! #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || 
(__OpenBSD__) || (__APPLE_CC__)
   #include <sys/types.h>
   #include <sys/socket.h>
   #endif
diff --context -r argus-2.0.5/include/argus_out.h 
argus-2.0.5_macosx/include/argus_out.h
*** argus-2.0.5/include/argus_out.h	Fri May  3 07:18:39 2002
--- argus-2.0.5_macosx/include/argus_out.h	Fri May 10 15:01:33 2002
***************
*** 43,49 ****
   #ifndef Argus_out_h
   #define Argus_out_h

! #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || (__OpenBSD__)
   #include <sys/types.h>
   #include <sys/socket.h>
   #if !defined(_NET_IF_H_)
--- 43,49 ----
   #ifndef Argus_out_h
   #define Argus_out_h

! #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || 
(__OpenBSD__) || (__APPLE_CC__)
   #include <sys/types.h>
   #include <sys/socket.h>
   #if !defined(_NET_IF_H_)
diff --context -r argus-2.0.5/include/compat.h 
argus-2.0.5_macosx/include/compat.h
*** argus-2.0.5/include/compat.h	Tue May  7 07:18:13 2002
--- argus-2.0.5_macosx/include/compat.h	Fri May 10 15:04:40 2002
***************
*** 78,85 ****
   #endif
   #endif

!
! #if defined(__sgi) || defined(HAVE_SOLARIS) || defined(ultrix) || 
defined(__osf__) || defined(linux) || defined(bsdi) || defined(AIX) 
|| defined(CYGWIN) || defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__)

   #define timelocal mktime

--- 78,84 ----
   #endif
   #endif

! #if defined(__sgi) || defined(HAVE_SOLARIS) || defined(ultrix) || 
defined(__osf__) || defined(linux) || defined(bsdi) || defined(AIX) 
|| defined(CYGWIN) || defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__) || (__APPLE_CC__)

   #define timelocal mktime

diff --context -r argus-2.0.5/server/ArgusModeler.h 
argus-2.0.5_macosx/server/ArgusModeler.h
*** argus-2.0.5/server/ArgusModeler.h	Fri May  3 07:55:12 2002
--- argus-2.0.5_macosx/server/ArgusModeler.h	Fri May 10 15:12:44 2002
***************
*** 103,109 ****
   #include <sys/time.h>
   #include <stdio.h>

! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__) || 
defined(__NetBSD__) || defined(__OpenBSD__)
   #include <sys/socket.h>

   #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NET_IF_H_))
--- 103,109 ----
   #include <sys/time.h>
   #include <stdio.h>

! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__) || 
defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE_CC__)
   #include <sys/socket.h>

   #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NET_IF_H_))






>	libpcap isn't present at all I don't think. Since the copy I downloaded
>for NetBSD was there I installed it and now I see much the same failure on
>the latest 2.0.5. As an example of what needs to happen here is a dif of the
>first include that needs help. I expect adding the define to various places
>that already have such for FreeBSD is all thats needed (the rest are currently
>left as an exersize for the student :-)).
>
>
>*** include/argus_out.h.orig	Fri May 10 13:29:19 2002
>--- include/argus_out.h	Fri May 10 13:31:26 2002
>***************
>*** 43,49 ****
>   #ifndef Argus_out_h
>   #define Argus_out_h
>
>! #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || (__OpenBSD__)
>   #include <sys/types.h>
>   #include <sys/socket.h>
>   #if !defined(_NET_IF_H_)
>--- 43,49 ----
>   #ifndef Argus_out_h
>   #define Argus_out_h
>
>! #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || 
>(__OpenBSD__) || (__APPLE_CC__)
>   #include <sys/types.h>
>   #include <sys/socket.h>
>   #if !defined(_NET_IF_H_)
>
>Peter Van Epp / Operations and Technical Support
>Simon Fraser University, Burnaby, B.C. Canada
>
>
>>
>>  Hey Peter,
>>     Use the freshest version of 2.0.5 from the server
>>  as I've changed how argus uses the libpcap libraries.
>>  The libpcap "powers that be" are not being cooperative,
>>  so I made some changes.
>>
>>  Carter
>>
>>  Carter Bullard
>>  QoSient, LLC
>>  300 E. 56th Street, Suite 18K
>>  New York, New York  10022
>>
>>  carter at qosient.com
>>  Phone +1 212 588-9133
>>  Fax   +1 212 588-9134
>>  http://qosient.com
>>
>>  > -----Original Message-----
>>  > From: owner-argus-info at lists.andrew.cmu.edu
>>  > [mailto:owner-argus-info at lists.andrew.cmu.edu] On Behalf Of
>>  > Peter Van Epp
>>  > Sent: Friday, May 10, 2002 4:14 PM
>>  > To: argus
>>  > Subject: Re: Has anyone successfully compiled Argus on Mac OS X
>>  >
>>  >
>>  >	Given that some version (2.0.4?) doesn't compile, I'd
>>  > guess the answer
>>  > is currently no. I just tried 2.0.5  on the non server
>>  > version of OS X but it
>>  > didn't find pcap and I'm not at this instant motivated enough
>>  > to add yet
>>  > another OS to my support list (although given OS X is FreeBSD
>>  > based I'm
>>  > probably the logical candidate). If you have time and
>>  > interest, it isn't
>>  > too hard. What you are seeing are include file lacks. You
>>  > need to figure out
>>  > what include file has what you need and insert conditional
>>  > code to install it
>>  > when your particular OS version is discovered and then feed
>>  > the diffs back
>>  > to Carter for inclusion in the main source tree (I'm
>>  > currently doing this
>>  > for Free/Open/Netbsd). If I get bored I may put libpcap and
>>  > bison (if its not
>>  > here) on my OS X box and poke at it.
>>  >
>>  > Peter Van Epp / Operations and Technical Support
>>  > Simon Fraser University, Burnaby, B.C. Canada
>>  >
>>  > >
>>  > > I am new to this list so please bear with me.
>>  > >
>>  > > Has anyone successfully compiled this package on Os X
>>  > >
>>  > > Os 10.1.2 server
>>  > >
>>  > > Here are the errors that I immediately recieve upon trying a make.
>>  > >
>>  > > making in ./common
>>  > > cc -O -I. -I../include -I../libpcap-0.7.1  -DHAVE_SYS_SOCKIO_H=1
>>  > > -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1
>>  > > -DHAVE_SYSLOG_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1
>>  > > -DSTDC_HEADERS=1  -DARGUS_SYSLOG=1 -c ./argus_parse.c
>>  > > In file included from /usr/include/netinet/if_ether.h:64,
>>  > >                   from ../include/argus_out.h:56,
>>  > >                   from ../include/argus_parse.h:52,
>>  > >                   from ./argus_parse.c:120:
>>  > > /usr/include/net/if_arp.h:100: field `arp_pa' has incomplete type
>>  > > /usr/include/net/if_arp.h:101: field `arp_ha' has incomplete type
>>  > > In file included from ../include/cons_out.h:44,
>>  > >                   from ../include/argus_util.h:62,
>>  > >                   from ../include/argus_parse.h:54,
>>  > >                   from ./argus_parse.c:120:
>>  > > /usr/include/net/if.h:174: field `ifru_addr' has incomplete type
>>  > > /usr/include/net/if.h:175: field `ifru_dstaddr' has incomplete type
>>  > > /usr/include/net/if.h:176: field `ifru_broadaddr' has
>>  > incomplete type
>>  > > /usr/include/net/if.h:202: field `ifra_addr' has incomplete type
>>  > > /usr/include/net/if.h:203: field `ifra_broadaddr' has
>>  > incomplete type
>>  > > /usr/include/net/if.h:204: field `ifra_mask' has incomplete type
>>  > > /usr/include/net/if.h:255: field `addr' has incomplete type
>>  > > /usr/include/net/if.h:256: field `dstaddr' has incomplete type
>>  > > ./argus_parse.c: In function `ArgusGetServerSocket':
>>  > > ./argus_parse.c:1800: `SOCK_STREAM' undeclared (first use
>>  > in this function)
>>  > > ./argus_parse.c:1800: (Each undeclared identifier is
>>  > reported only once
>>  > > ./argus_parse.c:1800: for each function it appears in.)
>>  > > ./argus_parse.c:1820: `SOCK_DGRAM' undeclared (first use in
>>  > this function)
>>  > > ./argus_parse.c:1856: `AF_INET' undeclared (first use in
>>  > this function)
>  > > > ./argus_parse.c:1868: `SOL_SOCKET' undeclared (first use in
>>  > this function)
>>  > > ./argus_parse.c:1868: `SO_KEEPALIVE' undeclared (first use
>>  > in this function)
>>  > > make[1]: *** [argus_parse.o] Error 1
>>  > > making in ./server
>>  > > cc -O -I . -I../include -I../libpcap-0.7.1  -DHAVE_SYS_SOCKIO_H=1
>>  > > -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1
>>  > > -DHAVE_SYSLOG_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1
>>  > > -DSTDC_HEADERS=1  -c ./argus.c
>>  > > In file included from /usr/include/netinet/if_ether.h:64,
>>  > >                   from ./ArgusModeler.h:122,
>>  > >                   from ./argus.c:56:
>>  > > /usr/include/net/if_arp.h:100: field `arp_pa' has incomplete type
>>  > > /usr/include/net/if_arp.h:101: field `arp_ha' has incomplete type
>>  > > make[1]: *** [argus.o] Error 1
>>  > > making in ./clients
>>  > > cc -O -I . -I../include -I../common -I../libpcap-0.7.1
>>  > > -DHAVE_SYS_SOCKIO_H=1 -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1
>>  > > -DHAVE_SYS_FILE_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_ETHER_HOSTTON=1
>>  > > -DHAVE_STRERROR=1 -DSTDC_HEADERS=1  -c ./ragator.c
>>  > > In file included from /usr/include/netinet/if_ether.h:64,
>>  > >                   from ../include/argus_out.h:56,
>>  > >                   from ../include/argus_client.h:42,
>>  > >                   from ./ragator.c:57:
>>  > > /usr/include/net/if_arp.h:100: field `arp_pa' has incomplete type
>>  > > /usr/include/net/if_arp.h:101: field `arp_ha' has incomplete type
>>  > > In file included from ../include/cons_out.h:44,
>>  > >                   from ../include/argus_util.h:62,
>>  > >                   from ../include/argus_parse.h:54,
>>  > >                   from ../include/argus_client.h:44,
>>  > >                   from ./ragator.c:57:
>>  > > /usr/include/net/if.h:174: field `ifru_addr' has incomplete type
>>  > > /usr/include/net/if.h:175: field `ifru_dstaddr' has incomplete type
>>  > > /usr/include/net/if.h:176: field `ifru_broadaddr' has
>>  > incomplete type
>>  > > /usr/include/net/if.h:202: field `ifra_addr' has incomplete type
>>  > > /usr/include/net/if.h:203: field `ifra_broadaddr' has
>>  > incomplete type
>>  > > /usr/include/net/if.h:204: field `ifra_mask' has incomplete type
>>  > > /usr/include/net/if.h:255: field `addr' has incomplete type
>>  > > /usr/include/net/if.h:256: field `dstaddr' has incomplete type
>>  > > make[1]: *** [ragator.o] Error 1
>>  > >
>>  > > Use "exit" to leave _tcsh.
>>  > >
>>  > > --
>>  > >
>>  >
>>  >
>>  >
>>
>>
>>


-- 



More information about the argus mailing list