[hobbit] problem compiling HP-UX 11.11 using gcc
Have you tried 4.1.1 from this site?
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7...
-----Original Message----- From: lars ebeling [mailto:lars.ebeling at leopg9.no-ip.org] Sent: Monday, June 26, 2006 12:17 PM To: hobbit at hswn.dk 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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Camp.external at qimonda.com wrote:
Have you tried 4.1.1 from this site?
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7...
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.
-- -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
On Mon, Jun 26, 2006 at 11:23:13AM -0700, Mike Arnold wrote:
Camp.external at qimonda.com wrote:
Have you tried 4.1.1 from this site?
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7...
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):
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
participants (4)
-
Camp.external@qimonda.com
-
henrik@hswn.dk
-
hobbit@razorsedge.org
-
lars.ebeling@leopg9.no-ip.org