bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation error under HP-UX-B.10.20


From: Bob Proulx
Subject: Re: Compilation error under HP-UX-B.10.20
Date: Tue, 2 Jul 2002 17:10:03 -0600
User-agent: Mutt/1.4i

> I'm trying to build binutils 2.12 under HP-UX-B.10.20.

Just making sure you are aware of 

  http://hpux.cs.utah.edu/hppd/hpux/

Which has precompiled binaries for many useful things on hpux.

> Compilation of file strings.c in binutils directory fails:
> 
> gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd -I./../bfd 
> -I./../include -DHOST_HPPAHPUX -I./../intl -I../intl 
> -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes 
> -Wmissing-prototypes -g -O2 -c strings.c

> strings.c:97: parse error before `file_off'
[...]
> the first error is a missing typedef for off64_t in file strings.c(97):
> #ifdef HAVE_FOPEN64
> typedef off64_t file_off;
> #define file_open(s,m) fopen64(s,m)

If you are using off64_t then you need to have _FILE_OFFSET_BITS=64
defined somewhere.  I do not see -D_FILE_OFFSET_BITS=64 anywhere.  It
might be in the config.h file.

But you should not have gotten HAVE_FOPEN64 defined if you did not
that.  Which is contradictory evidence.

> off64_t should be defined in types.h:
> 
> #  ifndef _OFF64_T
> #    define _OFF64_T
> #    if !defined(__STDC_32_MODE__)
>         typedef int64_t off64_t;      /* 64bit offsets and sizes */
> #    endif
> #  endif /* _OFF64_T */

> my guess is that __STDC_32_MODE__ is set (maybe via file _inttypes.h).

Yes, if you do not compile in LP64 mode, which on 10.20 you can't.
You need 11.x or later for LP64 mode.  Which is the whole reason for
the off64_t being defined with _FILE_OFFSET_BITS=64.

Check your config.h and see what _FILE_OFFSET_BITS is set to.  If you
are using off64_t then you need _FILE_OFFSET_BITS=64.  autoconf-2.52
and later have built in support for this.  Earlier versions need
manual help to force that mode.  If the configure is old then it won't
have this by default and you will have to help it.

> I'm using compiler egcs 2.91.66.

That is pretty old to the point of being a little scary.  I would feel
better if you had said 2.95.[23] which work pretty well on hpux 10.20.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]