Compile problem on HP-UX 11.00

Peter Van Epp vanepp at sfu.ca
Wed Oct 22 12:33:55 EDT 2003


	Ah! a volunteer for maintaining the HP port :-). Assuming you are 
willing of course. I do this for the BSD and MacOS 10 stuff and its fairly
easy (and since Carter happily accepts the changes in to the current 
distribution, benefits the entire argus community). The first thing I'd 
recommend is getting the argus-2.0.6.beta.13.tar.gz  and 
argus-clients-2.0.6.beta.47.tar.gz release candidates from ftp.qosient.com in 
/dev/argus-2.0/ and see what they do (possibly much the same thing).
	Then you need to figure out what include files you need to complete
the structures and stop the complaint and then how to get them properly 
included in the standard build. Neither of these are all that hard to do. 
	In the first example you need to edit 

/usr/include/netinet/if_ether.h

and see whats at line 90 and 121 that is incomplete. In the FreeBSD case, that
would be:

#define arp_hrd ea_hdr.ar_hrd

which means that I need to grep for ar_hrd in /usr/include and 
/usr/include/*/*:

%grep ar_hrd /usr/include/* /usr/include/*/*
/usr/include/net/if_arp.h:      u_short ar_hrd;         /* format of hardware address */
   **** ^^^^ want this one which defines ar_hrd! ***

/usr/include/netatalk/aarp.h:#define aarp_hrd   eaa_hdr.ar_hrd
/usr/include/netinet/if_ether.h:#define arp_hrd ea_hdr.ar_hrd
%

which tells me that /usr/include/net/if_arp.h needs to be included before
/usr/include/netinet/if_ether.h in /include/argus_out.h or at least included
in something that is included before it (because if_arp.h doesn't appear in
the beta.13 copy of argus_out.h, but socket.h and if.h either of which may 
include if_arp.h do):

argus_out.h:

#if defined(HAVE_SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defi
ned(__OpenBSD__)
#include <sys/types.h> 
#include <sys/socket.h>
#if !defined(_NET_IF_H_)
#include <net/if.h>
#define _NET_IF_H_
#endif
#endif
 
#if !defined(__OpenBSD__) || !defined(_NETINET_IF_ETHER_H_)      
#include <netinet/if_ether.h>
#define _NETINET_IF_ETHER_H_
#endif

	Once you find out what needs to be included, then you need to figure
out how to get it included :-). Just insert the include as a test as in:

argus_out.h

#endif
#endif

/usr/include/net/if_arp.h
 
#if !defined(__OpenBSD__) || !defined(_NETINET_IF_ETHER_H_)      
#include <netinet/if_ether.h>
#define _NETINET_IF_ETHER_H_
#endif              

and recompile to see what more complaints you get, or if that fixes the problem.
Once you know everything that needs including, then you need to figure out 
how to include it. That may be as easy as adding the define for
HPUX (like the __FreeBSD__ defines above) to the appropriate line or if 
possible causing an appropiate define (__OpenBSD__ for Mac OS10 for instance)
to be defined when HPUX is detected that already does the right thing.
	Then assuming you are willing, you get to do this again when a new
release candidate gets released and HPUX is added to the list of supported
OSes :-). Of course if you only want to go as far as seeing if you like argus,
you can stop with the test include above (once it compiles) as well since it
should then work for you (although posting what you needed to change back to 
the list would be appreciated by anyone else wishing to run argus on HPUX as
well).

Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada


On Wed, Oct 22, 2003 at 12:07:37PM +0200, Mac Schwarz wrote:
> 
> Hi,
> 
> while trying to compile argus on HP-UX 11.00 I'm getting errors about
> incomplete types:
> 
> Platform: HP-UX 11.00
> Compiler: gcc 3.0.1
> 
> argus-2.0.5:
> 
> making in ./common
>         gcc -O2 -I. -I../include -I../../libpcap-2003.10.19
> -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLBL_ALIGN=1
> -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1
> -DHAVE_SYSLOG_H=1 -DHAVE_HPUX10_20=1  -DARGUS_SYSLOG=1 -c
> ./argus_parse.c
> In file included from ../include/argus_out.h:56,
>                  from ../include/argus_parse.h:52,
>                  from argus_parse.c:119:
> /usr/include/netinet/if_ether.h:90: field `ea_hdr' has incomplete type
> /usr/include/netinet/if_ether.h:121: field `ea_hdr' has incomplete
> type
> In file included from ../include/argus_util.h:62,
>                  from ../include/argus_parse.h:54,
>                  from argus_parse.c:119:
> ../include/cons_out.h:78: field `ethersrc' has incomplete type
> ../include/cons_out.h:79: field `etherdst' has incomplete type
> ../include/cons_out.h:113: field `ethersrc' has incomplete type
> ../include/cons_out.h:114: field `etherdst' has incomplete type
> argus_parse.c: In function `parseTime':
> argus_parse.c:3028: structure has no member named `tm_zone'
> argus_parse.c:3029: structure has no member named `tm_gmtoff'
> *** Error exit code 1
>                                                                                 
> Stop.
> *** Error exit code 1
>                                                                                 
> Stop.
> 
> 
> Same problems with argus-2.0.6.beta.14. Note the
> -DHAVE_HPUX10_20=1. In configure.in only HPUX9 and HPUX11_20 are
> defined.
> 
> 	mac



More information about the argus mailing list