Xymon Mailing List Archive search

problem compiling HP-UX 11.11 using gcc

18 messages in this thread

list Neil D. ManTech Ctr Camp · Tue, 7 Feb 2006 15:46:54 -0500 ·
Sorry, done.

Has anyone had luck with HP-UX. I have searched and searched and
searched. It seems like several people have had luck, but I keep getting
compilation errors. Here is my latest using gcc

gmake[1]: Entering directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gcc -static -DHPUX -D_REENTRANT -DHPUX -I.
-I/home/campnd/hobbit-4.1.2p1/include -I/usr/local/pcre-6.4/include
-DBBGEN_SSL  -I/usr/include   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1795: warning: assignment makes pointer from integer
without a cast
bbtest-net.c:1802: error: dereferencing pointer to incomplete type
bbtest-net.c:1814: error: dereferencing pointer to incomplete type
bbtest-net.c:1819: error: dereferencing pointer to incomplete type
bbtest-net.c: In function 'main':
bbtest-net.c:2262: warning: pointer targets in assignment differ in
signedness
gmake[1]: *** [bbtest-net.o] Error 1
gmake[1]: Leaving directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gmake: *** [bbnet-build] Error 2

--neil
 
ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid
 

-----Original Message-----
From: Thomas Krieger [mailto:user-c0f684cc576f@xymon.invalid] 
Sent: Tuesday, February 07, 2006 1:07 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] problem compiling HP-UX 11.11 using aCC

Can you please stop requesting reading confirmations for your emails.
It's 
anoying.

Bye
list Adam Scheblein · Tue, 7 Feb 2006 14:55:32 -0600 ·
I just re-compiled one of our system's client package today.  What type
of server do you have (EX rp84xx rx76xx)  I may be able to provide you
with some sort of a depot or at least a pre-compiled one that you can do
a "make install" with

Adam
quoted from Neil D. ManTech Ctr Camp
-----Original Message-----
From: Camp, Neil D. (ManTech) CTR [mailto:user-22a6a1b96d9d@xymon.invalid]
Sent: Tuesday, February 07, 2006 2:47 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] problem compiling HP-UX 11.11 using gcc

Sorry, done.

Has anyone had luck with HP-UX. I have searched and searched and
searched. It seems like several people have had luck, but I keep
getting
compilation errors. Here is my latest using gcc

gmake[1]: Entering directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gcc -static -DHPUX -D_REENTRANT -DHPUX -I.
-I/home/campnd/hobbit-4.1.2p1/include -I/usr/local/pcre-6.4/include
-DBBGEN_SSL  -I/usr/include   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1795: warning: assignment makes pointer from integer
without a cast
bbtest-net.c:1802: error: dereferencing pointer to incomplete type
bbtest-net.c:1814: error: dereferencing pointer to incomplete type
bbtest-net.c:1819: error: dereferencing pointer to incomplete type
bbtest-net.c: In function 'main':
bbtest-net.c:2262: warning: pointer targets in assignment differ in
signedness
gmake[1]: *** [bbtest-net.o] Error 1
gmake[1]: Leaving directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gmake: *** [bbnet-build] Error 2

--neil

ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid


-----Original Message-----
From: Thomas Krieger [mailto:user-c0f684cc576f@xymon.invalid]
Sent: Tuesday, February 07, 2006 1:07 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] problem compiling HP-UX 11.11 using aCC

Can you please stop requesting reading confirmations for your emails.
It's
anoying.

Bye

list Neil D. ManTech Ctr Camp · Tue, 7 Feb 2006 16:01:10 -0500 ·
I am compiling on an RP-3440.
A tarball would be great! I would like to know how you got yours to work
though for future reference when new releases come out. Sometimes I wish
I kept up programming skills.
quoted from Adam Scheblein

--neil
 
ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid
 

-----Original Message-----
From: Scheblein, Adam [mailto:user-de8d51f0c651@xymon.invalid] 
Sent: Tuesday, February 07, 2006 3:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] problem compiling HP-UX 11.11 using gcc

I just re-compiled one of our system's client package today.  What type
of server do you have (EX rp84xx rx76xx)  I may be able to provide you
with some sort of a depot or at least a pre-compiled one that you can do
a "make install" with

Adam
-----Original Message-----
From: Camp, Neil D. (ManTech) CTR [mailto:user-22a6a1b96d9d@xymon.invalid]
Sent: Tuesday, February 07, 2006 2:47 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] problem compiling HP-UX 11.11 using gcc

Sorry, done.

Has anyone had luck with HP-UX. I have searched and searched and
searched. It seems like several people have had luck, but I keep
getting
compilation errors. Here is my latest using gcc

gmake[1]: Entering directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gcc -static -DHPUX -D_REENTRANT -DHPUX -I.
-I/home/campnd/hobbit-4.1.2p1/include -I/usr/local/pcre-6.4/include
-DBBGEN_SSL  -I/usr/include   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1795: warning: assignment makes pointer from integer
without a cast
bbtest-net.c:1802: error: dereferencing pointer to incomplete type
bbtest-net.c:1814: error: dereferencing pointer to incomplete type
bbtest-net.c:1819: error: dereferencing pointer to incomplete type
bbtest-net.c: In function 'main':
bbtest-net.c:2262: warning: pointer targets in assignment differ in
signedness
gmake[1]: *** [bbtest-net.o] Error 1
gmake[1]: Leaving directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gmake: *** [bbnet-build] Error 2

--neil

ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid


-----Original Message-----
From: Thomas Krieger [mailto:user-c0f684cc576f@xymon.invalid]
Sent: Tuesday, February 07, 2006 1:07 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] problem compiling HP-UX 11.11 using aCC

Can you please stop requesting reading confirmations for your emails.
It's
anoying.

Bye

list Adam Scheblein · Tue, 7 Feb 2006 15:43:17 -0600 ·
I got the gcc depot from hp (goto http://www.hp.com/go/gcc )and the
gmake from the University of Utah Porting and Archive Center ( goto
http://hpux.cs.utah.edu/ )installed them on an RP-2480 and then as long
as I do the following it works:


Change Line 9 of build/Makefile.HP-UX to read (this way it uses gcc):
CC=/usr/local/bin/gcc

Change the file lib/osdefs.h to have the following (because my HP-UX
complained that socklen_t and snprintf were already defined):
Line 21:
typedef int hobbit_socklen_t;

Line 25:
extern int hobbit_snprintf(char *str, size_t size, const char *format,
...);

then everything worked for me.

Also -- reply directly to me (not to the list) with the info I need for
the ./configure (run the ./configure and just give me the output)
because the config files are generated by that input.  Then I will set
you up a ftp so that you can get the pre-compiled server/client pieces
you need.
quoted from Neil D. ManTech Ctr Camp

Adam
-----Original Message-----
From: Camp, Neil D. (ManTech) CTR [mailto:user-22a6a1b96d9d@xymon.invalid]
Sent: Tuesday, February 07, 2006 3:01 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] problem compiling HP-UX 11.11 using gcc

I am compiling on an RP-3440.
A tarball would be great! I would like to know how you got yours to
work
though for future reference when new releases come out. Sometimes I
wish
I kept up programming skills.

--neil

ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid


-----Original Message-----
From: Scheblein, Adam [mailto:user-de8d51f0c651@xymon.invalid]
Sent: Tuesday, February 07, 2006 3:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] problem compiling HP-UX 11.11 using gcc

I just re-compiled one of our system's client package today.  What
type
of server do you have (EX rp84xx rx76xx)  I may be able to provide you
with some sort of a depot or at least a pre-compiled one that you can
do
a "make install" with

Adam
-----Original Message-----
From: Camp, Neil D. (ManTech) CTR [mailto:user-22a6a1b96d9d@xymon.invalid]
Sent: Tuesday, February 07, 2006 2:47 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] problem compiling HP-UX 11.11 using gcc

Sorry, done.

Has anyone had luck with HP-UX. I have searched and searched and
searched. It seems like several people have had luck, but I keep
getting
compilation errors. Here is my latest using gcc

gmake[1]: Entering directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gcc -static -DHPUX -D_REENTRANT -DHPUX -I.
-I/home/campnd/hobbit-4.1.2p1/include -I/usr/local/pcre-6.4/include
-DBBGEN_SSL  -I/usr/include   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1795: warning: assignment makes pointer from integer
without a cast
bbtest-net.c:1802: error: dereferencing pointer to incomplete type
bbtest-net.c:1814: error: dereferencing pointer to incomplete type
bbtest-net.c:1819: error: dereferencing pointer to incomplete type
bbtest-net.c: In function 'main':
bbtest-net.c:2262: warning: pointer targets in assignment differ in
signedness
gmake[1]: *** [bbtest-net.o] Error 1
gmake[1]: Leaving directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gmake: *** [bbnet-build] Error 2

--neil

ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid


-----Original Message-----
From: Thomas Krieger [mailto:user-c0f684cc576f@xymon.invalid]
Sent: Tuesday, February 07, 2006 1:07 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] problem compiling HP-UX 11.11 using aCC

Can you please stop requesting reading confirmations for your
emails.
It's
anoying.

Bye

list Lars Ebeling · Wed, 8 Feb 2006 06:53:42 +0100 ·
I have no problem compiling hobbit on a D380 server running HP-UX 11.11
I am using gcc version 3.4.2 and GNU Make version 3.79.1

If you want you could gett the depot's from me

Lars
quoted from Adam Scheblein

----- Original Message ----- 
From: "Camp, Neil D. (ManTech) CTR" <user-22a6a1b96d9d@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Tuesday, February 07, 2006 9:46 PM
Subject: [hobbit] problem compiling HP-UX 11.11 using gcc


Sorry, done.

Has anyone had luck with HP-UX. I have searched and searched and
searched. It seems like several people have had luck, but I keep getting
compilation errors. Here is my latest using gcc

gmake[1]: Entering directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gcc -static -DHPUX -D_REENTRANT -DHPUX -I.
-I/home/campnd/hobbit-4.1.2p1/include -I/usr/local/pcre-6.4/include
-DBBGEN_SSL  -I/usr/include   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1795: warning: assignment makes pointer from integer
without a cast
bbtest-net.c:1802: error: dereferencing pointer to incomplete type
bbtest-net.c:1814: error: dereferencing pointer to incomplete type
bbtest-net.c:1819: error: dereferencing pointer to incomplete type
bbtest-net.c: In function 'main':
bbtest-net.c:2262: warning: pointer targets in assignment differ in
signedness
gmake[1]: *** [bbtest-net.o] Error 1
gmake[1]: Leaving directory `/home/campnd/hobbit-4.1.2p1/bbnet'
gmake: *** [bbnet-build] Error 2

--neil
 
ManTech
DeCA Operations Systems Administrator
(XXX) XXX-XXXX
user-22a6a1b96d9d@xymon.invalid
 

-----Original Message-----
From: Thomas Krieger [mailto:user-c0f684cc576f@xymon.invalid] 
Sent: Tuesday, February 07, 2006 1:07 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] problem compiling HP-UX 11.11 using aCC

Can you please stop requesting reading confirmations for your emails.
It's 
anoying.

Bye
list Mike Arnold · Thu, 22 Jun 2006 09:30:36 -0700 (MST) ·
It looks like this is still an issue, even with the allinone.patch of 14
June applied to the 4.2 beta.  Henrik, any ideas on what may be causing
this and how to fix?

[snip]
gmake[1]: Leaving directory
`/var/tmp/rpmbuild/hobbit-4.2-beta-20060605/bbdisplay'
CC="gcc" CFLAGS="-g -O -D_REENTRANT  -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DHPUX -I. -I`pwd`/include -I/usr/local/include"
LDFLAGS="" RPATHOPT="" SSLFLAGS="-DBBGEN_SSL" SSLINCDIR="-I/usr/include "
SSLLIBS="-L/usr/lib -lssl -lcrypto" LDAPFLAGS="-DBBGEN_LDAP
-DBBGEN_LDAP_USESTARTTLS" LDAPINCDIR="-I/usr/local/include"
LDAPLIBS="-L/usr/local/lib -lldap -llber" NETLIBS="-lnsl"
BBHOME="/usr/local/libexec/hobbit/server" ARESVER="1.2.1" RUNTIMEDEFS=""
PCREINCDIR="-I/usr/local/include" PCRELIBS="-L/usr/local/lib -lpcre"
/usr/local/bin/gmake -C bbnet all
gmake[1]: Entering directory
`/var/tmp/rpmbuild/hobbit-4.2-beta-20060605/bbnet'
gcc -g -O -D_REENTRANT  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHPUX
-I. -I/home/mike/rpmbuild/BUILD/hobbit-4.2-beta-20060605/include
-I/usr/local/include -DBBGEN_SSL -DBBGEN_LDAP -DBBGEN_LDAP_USESTARTTLS
-I/usr/include  -I/usr/local/include -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1794: warning: assignment makes pointer from integer without
a cast
bbtest-net.c:1801: error: dereferencing pointer to incomplete type
bbtest-net.c:1813: error: dereferencing pointer to incomplete type
bbtest-net.c:1818: error: dereferencing pointer to incomplete type
gmake[1]: *** [bbtest-net.o] Error 1
gmake[1]: Leaving directory
`/var/tmp/rpmbuild/hobbit-4.2-beta-20060605/bbnet'
gmake: *** [bbnet-build] Error 2


All third-party apps (gcc/make/patch/libpng/pcre/openldap/openssl/rrdtool)
are from http://hpux.cs.utah.edu/.

$ uname -a
HP-UX hpux11i B.11.11 U 9000/785 HP-UX
$ model
9000/785/C360
$ /usr/sbin/swlist|grep -i patch
  BUNDLE                        B.11.11        Patch Bundle
  BUNDLE11i                     B.11.11.0306.1 Required Patch Bundle for
HP-UX 11i, June 2003
  FEATURE11-11                  B.11.11.0209.5 Feature Enablement Patches
for HP-UX 11i, Sept 2002
  GOLDAPPS11i                   B.11.11.0509.429 Applications Patches for
HP-UX 11i v1, September 2005
  GOLDBASE11i                   B.11.11.0509.429 Base Patches for HP-UX
11i v1, September 2005
  HWEnable11i                   B.11.11.0306.4 Hardware Enablement Patches
for HP-UX 11i, June 2003
$ gcc --version
gcc (GCC) 4.1.0
$ patch --version
patch 2.5.4
$ gmake --version
GNU Make 3.80


-- 
-m

... so long as the people do not care to exercise their freedom, those
who wish to tyrranize will do so; for tyrants are active and ardent,
and will devote themselves in the name of any number of gods, religious
and otherwise, to put shackles upon sleeping men.
                -- Voltarine de Cleyre
list Henrik Størner · Mon, 26 Jun 2006 14:41:08 +0200 ·
quoted from Mike Arnold
On Thu, Jun 22, 2006 at 09:30:36AM -0700, Mike Arnold wrote:
It looks like this is still an issue, even with the allinone.patch of 14
June applied to the 4.2 beta.  Henrik, any ideas on what may be causing
this and how to fix?
-I/usr/include  -I/usr/local/include -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1794: warning: assignment makes pointer from integer without a cast
bbtest-net.c:1801: error: dereferencing pointer to incomplete type
bbtest-net.c:1813: error: dereferencing pointer to incomplete type
bbtest-net.c:1818: error: dereferencing pointer to incomplete type
gmake[1]: *** [bbtest-net.o] Error 1
Looks like your HP-UX compiler cannot find the definition of the
RPC service entry structure "rpcent". This is usually defined in either
the <netdb.h> or <rpc/netdb.h> file.

What's in your include/config.h file ? There should be a line with
either "#define HAVE_RPCENT_H" or "#undef HAVE_RPCENT_H".

Is there a file /usr/include/netdb.h on your system ? How about 
/usr/include/rpc/netdb.h ?

(Why must HP-UX have all the standard definitions in non-standard 
 places ? Sigh ...)


Regards,
Henrik
list Lars Ebeling · Mon, 26 Jun 2006 15:17:06 +0200 ·
From: "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid>
quoted from Henrik Størner
Is there a file /usr/include/netdb.h on your system ? How about
/usr/include/rpc/netdb.h ?

(Why must HP-UX have all the standard definitions in non-standard
places ? Sigh ...)

This is from my HP-UX 11.11


bash-3.00# grep rpcent /usr/include/netdb.h
struct rpcent ä
 * rpcent_data structure for calls to getrpcent_r(), getrpcbyname_r()
struct  rpcent_data ä


Regards
Lars
list Henrik Størner · Mon, 26 Jun 2006 15:33:45 +0200 ·
quoted from Lars Ebeling
On Mon, Jun 26, 2006 at 03:17:06PM +0200, lars ebeling wrote:
From: "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid>
Is there a file /usr/include/netdb.h on your system ? How about
/usr/include/rpc/netdb.h ?

(Why must HP-UX have all the standard definitions in non-standard
places ? Sigh ...)

This is from my HP-UX 11.11


bash-3.00# grep rpcent /usr/include/netdb.h
struct rpcent ä
* rpcent_data structure for calls to getrpcent_r(), getrpcbyname_r()
struct  rpcent_data ä
That is what I would expect from a normal <netdb.h> file. And that is
what Hobbit has for HP-UX compilation. So I just don't understand why
the compile fails.


Regards,
Henrik
list Lars Ebeling · Mon, 26 Jun 2006 16:09:05 +0200 ·
quoted from Henrik Størner
That is what I would expect from a normal <netdb.h> file. And that is
what Hobbit has for HP-UX compilation. So I just don't understand why
the compile fails.
This is include/config.h

$ pg config.h                       /* This file is auto-generated */   #ifndef __CONFIG_H__                #define __CONFIG_H__ 1              #define HAVE_SOCKLEN_T 1            #define HAVE_SNPRINTF 1             #define HAVE_VSNPRINTF 1            #undef HAVE_RPCENT_H                #undef HAVE_SYS_SELECT_H            #undef HAVE_UINT32_TYPEDEF          #endif
list Mike Arnold · Mon, 26 Jun 2006 07:10:57 -0700 (MST) ·
quoted from Henrik Størner
Henrik Stoerner wrote:
On Thu, Jun 22, 2006 at 09:30:36AM -0700, Mike Arnold wrote:
It looks like this is still an issue, even with the allinone.patch of 14
June applied to the 4.2 beta.  Henrik, any ideas on what may be causing
this and how to fix?
-I/usr/include  -I/usr/local/include -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1794: warning: assignment makes pointer from integer
without a cast
bbtest-net.c:1801: error: dereferencing pointer to incomplete type
bbtest-net.c:1813: error: dereferencing pointer to incomplete type
bbtest-net.c:1818: error: dereferencing pointer to incomplete type
gmake[1]: *** [bbtest-net.o] Error 1
Looks like your HP-UX compiler cannot find the definition of the
RPC service entry structure "rpcent". This is usually defined in either
the <netdb.h> or <rpc/netdb.h> file.
[mike at hpux11i-hppa ~]$ grep -A5 "struct rpcent" /usr/include/netdb.h
struct rpcent {
        char    *r_name;        /* name of server for this rpc program */
        char    **r_aliases;    /* alias list */
        int     r_number;       /* rpc program number */
quoted from Henrik Størner
};
[snip]
What's in your include/config.h file ? There should be a line with
either "#define HAVE_RPCENT_H" or "#undef HAVE_RPCENT_H".
[mike at hpux11i-hppa ~]$ cat hobbit-4.2-beta-20060605/include/config.h
quoted from Lars Ebeling
/* This file is auto-generated */
#ifndef __CONFIG_H__
#define __CONFIG_H__ 1
#define HAVE_SOCKLEN_T 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#undef HAVE_RPCENT_H
#undef HAVE_SYS_SELECT_H
#undef HAVE_UINT32_TYPEDEF
#endif
Is there a file /usr/include/netdb.h on your system ? How about
/usr/include/rpc/netdb.h ?
[mike at hpux11i-hppa ~]$ ls -l /usr/include/netdb.h /usr/include/rpc/rpcent.h
/usr/include/rpc/rpcent.h not found
-r--r--r--   1 bin        bin          20638 Oct 20  2004
/usr/include/netdb.h
quoted from Henrik Størner
(Why must HP-UX have all the standard definitions in non-standard
 places ? Sigh ...)
I spent all of yesterday chasing this one down.  My C skills are horrible,
but if I add this to bbtest-net.c at line 101, the line 1794 warning goes
away:
extern struct rpcent *getrpcbyname (const char *);
The other three lines appear to have "rpcinfo->r_number" in common, but I
have yet to decipher the error messages' meaning.

I can arrange for access to the machine, if you would like.
quoted from Mike Arnold

-- 
-m

... so long as the people do not care to exercise their freedom, those
who wish to tyrranize will do so; for tyrants are active and ardent,
and will devote themselves in the name of any number of gods, religious
and otherwise, to put shackles upon sleeping men.
                -- Voltarine de Cleyre
list Henrik Størner · Mon, 26 Jun 2006 16:54:33 +0200 ·
quoted from Mike Arnold
On Mon, Jun 26, 2006 at 07:10:57AM -0700, Mike Arnold wrote:
Looks like your HP-UX compiler cannot find the definition of the
RPC service entry structure "rpcent". This is usually defined in either
the <netdb.h> or <rpc/netdb.h> file.
[mike at hpux11i-hppa ~]$ grep -A5 "struct rpcent" /usr/include/netdb.h
struct rpcent {
        char    *r_name;        /* name of server for this rpc program */
        char    **r_aliases;    /* alias list */
        int     r_number;       /* rpc program number */
};
[snip]

[mike at hpux11i-hppa ~]$ ls -l /usr/include/netdb.h /usr/include/rpc/rpcent.h
/usr/include/rpc/rpcent.h not found
-r--r--r--   1 bin        bin          20638 Oct 20  2004 /usr/include/netdb.h
This looks perfectly OK. So why won't the Hobbit compile pick it up ?
No idea, really.
I can arrange for access to the machine, if you would like.
Contact me off-list at user-ce4a2c883f75@xymon.invalid - ssh access is the easiest for
me.


Regards,
Henrik
list Lars Ebeling · Mon, 26 Jun 2006 18:17:00 +0200 ·
I thought I had some problems earlier with some version of gcc 4.x.x

I installed gcc 4.1.0 and got

gcc -g -O -D_REENTRANT  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHPUX -I. 
 -I
/home/hobbit/snapshot/include -I/usr/local/include -DBBGEN_SSL  -I/usr/local/inc
lude   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1788: warning: assignment makes pointer from integer without a 
cast
bbtest-net.c:1795: error: dereferencing pointer to incomplete type
bbtest-net.c:1807: error: dereferencing pointer to incomplete type
bbtest-net.c:1812: error: dereferencing pointer to incomplete type
makeÄ1Å: *** Äbbtest-net.oÅ Error 1
makeÄ1Å: Leaving directory é/home/hobbit/snapshot/bbnet'
make: *** Äbbnet-buildÅ Error 2
$

Regards
Lars
list Lars Ebeling · Mon, 26 Jun 2006 18:18:35 +0200 ·
I thought I had some problems earlier with some version of gcc 4.x.x
Should have mentioned that I now use 3.4.2
Lars
list Camp · Mon, 26 Jun 2006 12:20:37 -0400 ·
Have you tried 4.1.1 from this site?

http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7663,00.html
quoted from Lars Ebeling
 

-----Original Message-----
From: lars ebeling [mailto:user-1fecd3eafd52@xymon.invalid] 
Sent: Monday, June 26, 2006 12:17 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] problem compiling HP-UX 11.11 using gcc

I thought I had some problems earlier with some version of gcc 4.x.x

I installed gcc 4.1.0 and got

gcc -g -O -D_REENTRANT  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHPUX -I. 
 -I
/home/hobbit/snapshot/include -I/usr/local/include -DBBGEN_SSL  -I/usr/local/inc
lude   -c -o bbtest-net.o bbtest-net.c
bbtest-net.c: In function 'send_rpcinfo_results':
bbtest-net.c:1788: warning: assignment makes pointer from integer without a cast
bbtest-net.c:1795: error: dereferencing pointer to incomplete type
bbtest-net.c:1807: error: dereferencing pointer to incomplete type
bbtest-net.c:1812: error: dereferencing pointer to incomplete type
makeÄ1Å: *** Äbbtest-net.oÅ Error 1
makeÄ1Å: Leaving directory é/home/hobbit/snapshot/bbnet'
make: *** Äbbnet-buildÅ Error 2
$

Regards
Lars
list Lars Ebeling · Mon, 26 Jun 2006 18:26:51 +0200 ·
Have you tried 4.1.1 from this site?
I am just reinstalling the old 3.4.2

Lars
list Mike Arnold · Mon, 26 Jun 2006 11:23:13 -0700 (MST) ·
user-ec8e46bcfbb3@xymon.invalid wrote:
Have you tried 4.1.1 from this site?

http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7663,00.html

I have gcc 4.0.3 32-bit, 4.1.1 32 and 64-bit from HP, and 4.1.0 from PaAC.
 All give the same errors.

I'm thinking that there must be something different about our build
environments, as other people have indicated that they are able to compile
just fine.
quoted from Mike Arnold

-- 
-m

... so long as the people do not care to exercise their freedom, those
who wish to tyrranize will do so; for tyrants are active and ardent,
and will devote themselves in the name of any number of gods, religious
and otherwise, to put shackles upon sleeping men.
                -- Voltarine de Cleyre
list Henrik Størner · Mon, 26 Jun 2006 22:49:36 +0200 ·
quoted from Mike Arnold
On Mon, Jun 26, 2006 at 11:23:13AM -0700, Mike Arnold wrote:
user-ec8e46bcfbb3@xymon.invalid wrote:
Have you tried 4.1.1 from this site?

http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7663,00.html
I have gcc 4.0.3 32-bit, 4.1.1 32 and 64-bit from HP, and 4.1.0 from PaAC.
 All give the same errors.

I'm thinking that there must be something different about our build
environments, as other people have indicated that they are able to compile
just fine.
I've managed to find out that this breakage is because the HP-UX
include-files do not define the RPC functions and structures if
the pre-processer symbol _XOPEN_SOURCE_EXTENDED is defined. 

This despite the on-line documentation in "man getrpcent" stating
that this function *is* available, if you just include the <netdb.h>
file in your program. Which Hobbit does ...

Now ... why that is so, you'll have to ask HP. I'm prone to consider it
a bug in their include-files, and looking at the contortions they go
through with defining/undefining various things it seems that this may
not be what they intended to do. Just #undef'ing this at the top of
bbtest-net.c causes some other breakage with sys/socket.h disagreeing
with itself about how to define the "sendfile" and "sendpath" functions:

/usr/include/sys/socket.h:504: error: static declaration of 'sendfile' follows non-static declaration
/usr/include/sys/socket.h:484: error: previous declaration of 'sendfile' was here
/usr/include/sys/socket.h:505: error: static declaration of 'sendpath' follows non-static declaration
/usr/include/sys/socket.h:486: error: previous declaration of 'sendpath' was here


For now, the fastest work-around is probably to add this to bbtest-net.c
around line 32 (after the HAVE_RPCENT_H part):
quoted from Henrik Størner

struct rpcent {
	char    *r_name;        /* name of server for this rpc program */
	char    **r_aliases;    /* alias list */
	int     r_number;       /* rpc program number */
};

extern struct rpcent *getrpcbyname(char *);

With that added, Hobbit builds just fine.


Regards,
Henrik