From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f42.google.com ([74.125.83.42]:32969 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752395AbcLAAjJ (ORCPT ); Wed, 30 Nov 2016 19:39:09 -0500 Received: by mail-pg0-f42.google.com with SMTP id 3so87836648pgd.0 for ; Wed, 30 Nov 2016 16:39:08 -0800 (PST) Date: Wed, 30 Nov 2016 16:39:05 -0800 From: Eric Biggers Subject: Re: [PATCH v2] Fix building xfsprogs on 32-bit platforms Message-ID: <20161201003905.GC14029@google.com> References: <1480549580-105022-1-git-send-email-ebiggers@google.com> <20161201001952.GA1318@nyan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161201001952.GA1318@nyan> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Felix Janda Cc: linux-xfs@vger.kernel.org, Dave Chinner On Wed, Nov 30, 2016 at 07:20:50PM -0500, Felix Janda wrote: > Eric Biggers wrote: > > xfslibs now requires that its users enable transparent largefile > > support. This broke building xfsprogs on 32-bit Linux (with glibc) > > because _FILE_OFFSET_BITS=64 was not getting defined. Although the > > autoconf macro AC_SYS_LARGEFILE was intended to define it, this didn't > > work because AC_SYS_LARGEFILE will only define _FILE_OFFSET_BITS in a > > config header, which doesn't work for xfsprogs because not all .c files > > include platform_defs.h as their first include. Also, > > platform_defs.h.in is not generated by autoheader and didn't contain a > > template for _FILE_OFFSET_BITS. > > > > Therefore, to fix the problem remove the useless autoconf macros and > > instead add -D_FILE_OFFSET_BITS=64 to CFLAGS in builddefs.in. Use > > CFLAGS rather than PCFLAGS because this definition could be needed by > > platforms other than "linux", and it doesn't hurt to always define it. > > Sorry, for this breakage. Patch looks good to me except that also the > now unecessary definition of AC_NEED_LFS should be removed from > m4/package_libcdev.m4. > > Removing AC_SYS_LARGEFILE also has the advantage that the configure > script does no longer have a --disable-largefile option. > > Felix Indeed, the AC_NEED_LFS definition should be removed. I forgot it wasn't provided by autoconf. I do notice that without AC_SYS_LARGEFILE we won't get largefile support for the configuration tests in m4/package_libcdev.m4 anymore. I think it doesn't actually matter though. Eric