You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brian Hechinger <wo...@4amlunch.net> on 2006/03/28 17:07:12 UTC

Building on HP-UX problems

I'm trying to build 1.3.0 on an HP-UX box, but I'm running into these
issues:

Making all in network_io/unix
make[2]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
make[3]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
/bin/sh /tmp/monitor/subversion-1.3.0/apr/libtool --silent --mode=compile aCC -Ae -mt  -I/tmp/monitor/subversion-1.3.0/apr/include/arch/unix -DHAVE_CONFIG_H -DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED   -I../../include -I../../include/arch/unix -I../../include/arch/unix  -c sendrecv.c && touch sendrecv.lo
Error 298: "/usr/include/netinet/tcp.h", line 63 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
            u_char  th_off:4,               /* data offset */
                    ^^^^^^
Error 298: "/usr/include/netinet/tcp.h", line 64 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
                    th_x2:4;                /* (unused) */
                    ^^^^^
make[3]: *** [sendrecv.lo] Error 1
make[3]: Leaving directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/monitor/subversion-1.3.0/apr'
make: *** [external-all] Error 1

How do I fix this so that it build right?

I don't want to install gcc if I can help it.

-brian
-- 
"Some people say that if you play a Windows XP install CD backwards
you will hear demon voices commanding you to worship Satan.  But
that's nothing! If you play it forward it will install Windows XP."
    -- Anonymous

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Building on HP-UX problems

Posted by Brian Hechinger <wo...@4amlunch.net>.
On Wed, Mar 29, 2006 at 11:17:51AM +1000, Matthew Sanderson wrote:
> 
> Hi again Brian,

Hi there Matt!

> I think when compiling ANSI C on HPPA, one should use /opt/ansic/bin/cc
> instead of /opt/aCC/bin/aCC. What happens if you perform the configure
> step again, but this time with the additional argument 'CC=cc'? Obviously
> 'cc' or a symlink to it will have to be in your PATH.

Well, here's the problem.  There is no /opt/ansic directory.  The only two
compilers available are the bundled k&r compiler and aCC, so my options are
limited here.  I spent over a month trying to find an HP-UX box in this place
that even *had* compilers (other than the bundled ones) installed, and this
is the best that I've found.  Sorry, not best, ONLY.  You'd think for as large
as this company is they'd have more development boxes floating around. :)

> Sidenote: I wasn't able to test with aCC - it is suddenly complaining
> about missing 'flexlm' license files and I have no idea when it broke or
> why... <sigh>. But I've never seen aCC sing and dance in the way that GCC
> can; the most I've managed was a croak and an ungainly shuffle ;-)
> FWIW I find it best to just turn HP-UX into a GNU/HP-UX system - mostly
> GNU userland, but HP-supplied kernel, libc and init. Works much better.

GCC doesn't dance and sing, it just plows over everything.  "Oh, that's an
error?  Oh, that's not even valid code?  Who cares?  I'll compile it ANYWAY!"

:)

The other option is either I need to bug my friend to get his C160 running and
since I think he has the ANSI C compilers for it.  Better yet would to be to
get my other friend to fire up one of his N class boxes, but that's not very
likely to happen anytime soon, he's swamped these days.

-brian
-- 
"Some people say that if you play a Windows XP install CD backwards
you will hear demon voices commanding you to worship Satan.  But
that's nothing! If you play it forward it will install Windows XP."
    -- Anonymous

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Building on HP-UX problems

Posted by Matthew Sanderson <ma...@formtrap.com>.
On Tue, 28 Mar 2006, Brian Hechinger wrote:

> On Tue, Mar 28, 2006 at 10:12:53AM -0800, Garrett Rooney wrote:
> > On 3/28/06, Brian Hechinger <wo...@4amlunch.net> wrote:
> > > I'm trying to build 1.3.0 on an HP-UX box, but I'm running into these
> > > issues:
> > >
> > > Making all in network_io/unix
> > > make[2]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> > > make[3]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> > > /bin/sh /tmp/monitor/subversion-1.3.0/apr/libtool --silent --mode=compile aCC -Ae -mt  -I/tmp/monitor/subversion-1.3.0/apr/include/arch/unix -DHAVE_CONFIG_H -DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED   -I../../include -I../../include/arch/unix -I../../include/arch/unix  -c sendrecv.c && touch sendrecv.lo
> > > Error 298: "/usr/include/netinet/tcp.h", line 63 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
> > >             u_char  th_off:4,               /* data offset */
> > >                     ^^^^^^
> > > Error 298: "/usr/include/netinet/tcp.h", line 64 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
> > >                     th_x2:4;                /* (unused) */
> >
> > It looks like APR is failing to compile due to some interaction
> > between the C compiler, the set of flags passed to the C compiler, and
> > your system's header files (/usr/include/netinet/tcp.h is part of the
> > Operating System).  Perhaps there's some flag that can be added to
> > CFLAGS to make the compiler more permissive?
>
> That's what I was thinking, but as to how to do that?  I had no idea.  I've
> never used aCC before this.  I can make Sun Studio and MIPSpro sing and dance,
> but I've a long way to go until I will be able to make aCC do that. ;)
>
> Any recommendations as to what that flag could be?  So far I've come up short
> with google and the man pages.
>
> No offense to any HP-UX fanatics out there, but I have to say that the HP-UX
> man pages are some of the worst I've seen.  ;)
>
> -brian
> --
> "Some people say that if you play a Windows XP install CD backwards
> you will hear demon voices commanding you to worship Satan.  But
> that's nothing! If you play it forward it will install Windows XP."
>     -- Anonymous
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Hi again Brian,

I think when compiling ANSI C on HPPA, one should use /opt/ansic/bin/cc
instead of /opt/aCC/bin/aCC. What happens if you perform the configure
step again, but this time with the additional argument 'CC=cc'? Obviously
'cc' or a symlink to it will have to be in your PATH.

If that fixes it then I suppose 'configure' should be taught to prefer
'cc' over 'aCC' on HPUX somehow. If that doesn't fix it, then read on...

I too had a look through 'man cc' and I too didn't see any options that
would make the compiler be more tolerant of this specific header bug
(well, 'header non-ANSI-ness', at any rate). 'cc -Ae' seems to be as
permissive as it gets with respect to bitfields.

Our copy of /usr/include/netinet/tcp.h has the same bug as yours, but it
seems that at least on our box, 'cc' can compile such code regardless.
I made a test program whose source is below, which compiles and runs on
our HPPA with all of the following compiler command lines:

# LP64, ANSI + HPUX
cc -Ae +DA2.0W -o test test.c
# ILP32, ANSI + HPUX
cc -Ae -o test test.c
# LP64, ANSI only
cc -Aa +DA2.0W -o test test.c
# ILP32, ANSI only
cc -Aa -o test test.c
# LP64, default
cc +DA2.0W -o test test.c
# ILP32, default
cc -o test test.c

Does it compile on your machine using 'cc', too? What about with your aCC?
What versions of these tools do you have, especially /opt/ansic/lbin/ccom
which is the real C compiler (cc is just the driver, same setup as GCC).
On our box, the command '/opt/ansic/lbin/ccom -V' outputs:
ccom: HP92453-01 B.11.11.29484.GP HP C Compiler

Sidenote: I wasn't able to test with aCC - it is suddenly complaining
about missing 'flexlm' license files and I have no idea when it broke or
why... <sigh>. But I've never seen aCC sing and dance in the way that GCC
can; the most I've managed was a croak and an ungainly shuffle ;-)
FWIW I find it best to just turn HP-UX into a GNU/HP-UX system - mostly
GNU userland, but HP-supplied kernel, libc and init. Works much better.

Hope this helps,

--matt

Matthew Sanderson
Senior Programmer (UNIX)
TCG Information Systems Pty Ltd
Sydney, Australia
matthew@formtrap.com
http://www.formtrap.com/
+61 (02) 8303 2407

/* netinet/tcp.h needs the u_long etc types that this header can define */
#include <sys/types.h>

#ifndef _INCLUDE_HPUX_SOURCE
/**
 * If this symbol wasn't defined (for example, because you compiled with -Aa)
 * then sys/types.h will not have defined the necessary types after all.
 * In that case we define them here to be able to test compile even with -Aa.
 */
typedef unsigned char u_char;
typedef unsigned int u_int;
typedef unsigned short u_short;
typedef unsigned long u_long;
#endif /* ndef _INCLUDE_HPUX_SOURCE */

#include <netinet/tcp.h>
#include <stdio.h>

int
main(int argc, char ** argv)
{
    struct tcphdr hdr;
    puts("Hello, world!");
    return 0;
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Building on HP-UX problems

Posted by Brian Hechinger <wo...@4amlunch.net>.
On Tue, Mar 28, 2006 at 10:12:53AM -0800, Garrett Rooney wrote:
> On 3/28/06, Brian Hechinger <wo...@4amlunch.net> wrote:
> > I'm trying to build 1.3.0 on an HP-UX box, but I'm running into these
> > issues:
> >
> > Making all in network_io/unix
> > make[2]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> > make[3]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> > /bin/sh /tmp/monitor/subversion-1.3.0/apr/libtool --silent --mode=compile aCC -Ae -mt  -I/tmp/monitor/subversion-1.3.0/apr/include/arch/unix -DHAVE_CONFIG_H -DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED   -I../../include -I../../include/arch/unix -I../../include/arch/unix  -c sendrecv.c && touch sendrecv.lo
> > Error 298: "/usr/include/netinet/tcp.h", line 63 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
> >             u_char  th_off:4,               /* data offset */
> >                     ^^^^^^
> > Error 298: "/usr/include/netinet/tcp.h", line 64 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
> >                     th_x2:4;                /* (unused) */
> 
> It looks like APR is failing to compile due to some interaction
> between the C compiler, the set of flags passed to the C compiler, and
> your system's header files (/usr/include/netinet/tcp.h is part of the
> Operating System).  Perhaps there's some flag that can be added to
> CFLAGS to make the compiler more permissive?

That's what I was thinking, but as to how to do that?  I had no idea.  I've
never used aCC before this.  I can make Sun Studio and MIPSpro sing and dance,
but I've a long way to go until I will be able to make aCC do that. ;)

Any recommendations as to what that flag could be?  So far I've come up short
with google and the man pages.

No offense to any HP-UX fanatics out there, but I have to say that the HP-UX
man pages are some of the worst I've seen.  ;)

-brian
-- 
"Some people say that if you play a Windows XP install CD backwards
you will hear demon voices commanding you to worship Satan.  But
that's nothing! If you play it forward it will install Windows XP."
    -- Anonymous

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Building on HP-UX problems

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 3/28/06, Brian Hechinger <wo...@4amlunch.net> wrote:
> I'm trying to build 1.3.0 on an HP-UX box, but I'm running into these
> issues:
>
> Making all in network_io/unix
> make[2]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> make[3]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> /bin/sh /tmp/monitor/subversion-1.3.0/apr/libtool --silent --mode=compile aCC -Ae -mt  -I/tmp/monitor/subversion-1.3.0/apr/include/arch/unix -DHAVE_CONFIG_H -DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED   -I../../include -I../../include/arch/unix -I../../include/arch/unix  -c sendrecv.c && touch sendrecv.lo
> Error 298: "/usr/include/netinet/tcp.h", line 63 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
>             u_char  th_off:4,               /* data offset */
>                     ^^^^^^
> Error 298: "/usr/include/netinet/tcp.h", line 64 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
>                     th_x2:4;                /* (unused) */

It looks like APR is failing to compile due to some interaction
between the C compiler, the set of flags passed to the C compiler, and
your system's header files (/usr/include/netinet/tcp.h is part of the
Operating System).  Perhaps there's some flag that can be added to
CFLAGS to make the compiler more permissive?

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Building on HP-UX problems

Posted by Tony Butt <to...@cea.com.au>.
Brian Hechinger wrote:
> I'm trying to build 1.3.0 on an HP-UX box, but I'm running into these
> issues:
>
> Making all in network_io/unix
> make[2]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> make[3]: Entering directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> /bin/sh /tmp/monitor/subversion-1.3.0/apr/libtool --silent --mode=compile aCC -Ae -mt  -I/tmp/monitor/subversion-1.3.0/apr/include/arch/unix -DHAVE_CONFIG_H -DHPUX11 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED   -I../../include -I../../include/arch/unix -I../../include/arch/unix  -c sendrecv.c && touch sendrecv.lo
> Error 298: "/usr/include/netinet/tcp.h", line 63 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
>             u_char  th_off:4,               /* data offset */
>                     ^^^^^^
> Error 298: "/usr/include/netinet/tcp.h", line 64 # In ANSI C bitfields must be one of 'int', 'signed int', or 'unsigned int' type.
>                     th_x2:4;                /* (unused) */
>                     ^^^^^
> make[3]: *** [sendrecv.lo] Error 1
> make[3]: Leaving directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/tmp/monitor/subversion-1.3.0/apr/network_io/unix'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/monitor/subversion-1.3.0/apr'
> make: *** [external-all] Error 1
>
> How do I fix this so that it build right?
>
> I don't want to install gcc if I can help it.
>
> -brian
>   
The aCC compiler on HP-UX is the ANSI compliant C++ compiler - probably 
not a good choice for the subversion build.
The compiler of choice would normally be 'cc -Ae' , which is the C 
compiler ANSI compliant, with HP extensions.

Tony Butt
CEA Technologies
Canberra, Australia