AC_SYS_LARGEFILE check causing gcc compile failures on AIX and HP-UX

David Lee t.d.lee at durham.ac.uk
Mon Sep 10 09:15:32 GMT 2007


On Fri, 7 Sep 2007, Gerald (Jerry) Carter wrote:

> I'm seeing a lot of compile failures on AIX and HP-UX
> after moving Centeris' code base to the SAMBA_3_2_0 tree.
> The AIX failures are strangely causing failures about
> redefinitions in standard header files:
>
> /usr/include/sys/lockf.h:64: error: conflicting types for 'lockf64'
> /usr/include/sys/lockf.h:62: error: previous declaration of
>    'lockf64' was here
>
> What's wrong with the original checks in configure.in for
> large file support? And why do we need a new one?

Jerry:  I'm no expert at all on this, and have no real knowledge of AIX or
HP-UX.  But I did come across something similar on Solaris when we were
adding portability to the Linux-HA (heartbeat) project.

The Solaris "lfcompile(5)" man page says:
   "Set the compile-time flag _FILE_OFFSET_BITS to 64 before including
   any headers."

In "heartbeat" coding practice we translated this to:
  "the first include file should be our autoconf-generated header file
  (that defines '_FILE_OFFSET_BITS')".  [Aside: in practice, we have
  another level of indirection, but that early definition principle is
  maintained.]

See:
   http://lists.community.tummy.com/pipermail/linux-ha-dev/2005-May/010718.html

I don't know how much of this might apply to AIX and HPUX.  But it's
probably worth a quick check in your Samba code for this or something
similar.

Best wishes.

-- 

:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:  UNIX Team Leader                         Durham University     :
:                                           South Road            :
:  http://www.dur.ac.uk/t.d.lee/            Durham DH1 3LE        :
:  Phone: +44 191 334 2752                  U.K.                  :


More information about the samba-technical mailing list