#852617 autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

Package:
autoconf
Source:
autoconf
Submitter:
Date:
2025-04-15 09:21:02 UTC
Severity:
wishlist
Tags:
#852617#5
Date:
2002-08-31 07:50:21 UTC
From:
To:
Quote from the documentation:

 - Macro: AC_SYS_LARGEFILE
     Arrange for large-file support(1).  On some hosts, one must use
     special compiler options to build programs that can access large
     files.  Append any such options to the output variable `CC'.
     Define `_FILE_OFFSET_BITS' and `_LARGE_FILES' if necessary.

This is wrong, the output variable in question is not called "CC", but
"DEFS".

#852617#8
Date:
2002-09-01 03:05:35 UTC
From:
To:
The following bug was reported against the Debian GNU/Linux
package for Autoconf version 2.53.  It is an upstream bug, so I
am forwarding it to the Autoconf mailing list.

Thanks,

Ben.

Quote from the documentation:

 - Macro: AC_SYS_LARGEFILE
     Arrange for large-file support(1).  On some hosts, one must use
     special compiler options to build programs that can access large
     files.  Append any such options to the output variable `CC'.
     Define `_FILE_OFFSET_BITS' and `_LARGE_FILES' if necessary.

This is wrong, the output variable in question is not called "CC", but
"DEFS".
-------------------- End of forwarded message --------------------

#852617#9
Date:
2002-09-01 10:39:28 UTC
From:
To:
still wrong.  It should be CPPFLAGS.
#852617#10
Date:
2002-09-01 11:00:20 UTC
From:
To:
Perhaps you're confusing special compiler options (e.g. IRIX 6.2's C
compiler needs the "-n32" option) with ordinary compiler options like
"-D_FILE_OFFSET_BITS=64"?  The special options are appended to CC as
the Autoconf documentation says.  The ordinary ones are appended to
DEFS if AC_CONFIG_HEADERS is not called.

Another possibility is that you've somehow got hold of an older
version of the AC_SYS_LARGEFILE macro, and are overriding the macro
that comes with Autoconf 2.53.

#852617#15
Date:
2002-09-01 17:19:29 UTC
From:
To:
Paul Eggert <eggert@twinsun.com> writes:

According to Paul Eggert above, this is not a bug in Autoconf
2.53, so I am closing this bug.

Thanks,

Ben.

#852617#24
Date:
2017-01-25 16:45:14 UTC
From:
To:
found 158969 2.69-10
thanks

Hi *,

I have to reopen this because the documentation is plain wrong
and misleading still:

#852617#37
Date:
2017-01-25 16:57:03 UTC
From:
To:
Let’s keep track of t̲h̲i̲s̲ bug here <852617@bugs.debian.org>.
Again, please forward this upstream, too.

The workaround I was forced to use in a real-world package is thus:
https://anonscm.debian.org/cgit/pkg-remote/xrdp.git/plain/debian/patches/lfs.diff?id=e17430063641d44f5596b5bfc1b32ac4ba39f9f1

This feels completely wrong (and breaks with nōn-GCC compilers).

Thanks in advance,
//mirabilos (current hat: Debian Developer)

#852617#42
Date:
2017-01-25 17:02:17 UTC
From:
To:
If the real-world package is not including config.h first, then that is
a bug in the real-world package that should be fixed there.  Autoconf
clearly documents that if you create config.h, it MUST be included
first, before any system headers.

#852617#47
Date:
2017-01-25 17:21:45 UTC
From:
To:
severity 852617 wishlist
tags 852617 = upstream
thanks

OK, I’ve (separately) reported the bug to xrdp upstream.

Still not happy with this… it used to “just work”, and this change
is very likely to break existing software (unless — actually, even
if — that requirement was documented “always”, i.e. not added later).

Would you at least *consider* moving the definition back to some
command line argument? (Changing severity to wishlist now; if not,
we can likely close the bug, but I’d still like you to please at
least consider doing the change.)

bye,
//mirabilos

#852617#54
Date:
2017-01-25 18:02:26 UTC
From:
To:
Interesting, as I recall seeing -D_FILE_OFFSET_BITS=64 on various
compiler command lines when working under GNU. (I normally work
under BSD at home, so I don’t know where exactly.)

Interesting, when was that? (That is, before 2.13? Anything before
that, even I consider ancient ☻)

bye,
//mirabilos

#852617#59
Date:
2017-01-25 17:54:30 UTC
From:
To:
As far as I can tell from the Git history, AC_SYS_LARGEFILE has
*always* used AC_DEFINE_UNQUOTED to define the various preprocessor
macros that it can define (_FILE_OFFSET_BITS, _LARGE_FILES, and
_DARWIN_USE_64_BIT_INODE).  That part of the code has been unchanged
since AC_SYS_LARGEFILE was added to specific.m4.

I can see how you got the impression from the documentation that these
are added to CC instead, but that's actually talking about a different
thing that AC_SYS_LARGEFILE can do -- on *one* system, namely IRIX 6,
it may try adding "-n32" to CC.  As a general rule, whenever the
Autoconf manual says that something defines preprocessor macros, you
can assume that it does that with AC_DEFINE(_UNQUOTED).

You're talking about this like it's a regression.  Can you please
verify that it really was an Autoconf upgrade that broke the build of
whatever program you're having trouble with, and if so, report what
the older version was?

zw

#852617#64
Date:
2017-01-25 18:24:45 UTC
From:
To:
Is it possible that those programs were not using a config.h?

2000-06-08.  According to NEWS, it was not in 2.13 (which was released
1999-05-01), but it was in the very next release, 2.50 (2001-05-21).
The ChangeLog entry for the addition says "Import AC_SYS_LARGEFILE
from largefile.m4 serial 12", so that sounds like there was an add-on
.m4 file with the same functionality floating around prior to that - I
don't know where to find copies of that file.

zw

#852617#69
Date:
2017-01-25 18:41:17 UTC
From:
To:
It's from gnulib, which in turn got it from coreutils.

Gnulib still has m4/largefile.m4, although now it's merely a copy of
what's in (the next version of) Autoconf. That is, people use the Gnulib
largefile.m4 because they don't want to wait for the next release of
Autoconf to come out.

#852617#74
Date:
2017-01-25 19:25:49 UTC
From:
To:
Hm right, that could have been possible… although I also vaguely
recall seeing it on short compile lines, so there would have been
very few -DHAVE_* on it (but that’s not impossible either).

Hm, possible as well then. (I mostly use 2.13 for old software,
2.61 for new software, when building on my BSD. Debian has more
up-to-date autoconf, and only that, nowadays.)

Me either. Well, if it’s this obscure… I could almost say this
issue can be closed, especially since we seem to be going for‐
wards with the documentation issue. (It can still be confusing
for people switching from no config.h to using config.h, but
the suggested documentation change addresses this somewhat
explicitly.)

bye,
//mirabilos

#852617#79
Date:
2025-03-25 17:39:35 UTC
From:
To:
This breaks rdfind build on i386 as documented in #1091577.
Upstream has fixed this with the forwarded commit which applies cleanly
to autoconf 2.72. Please consider including this for trixie.

#852617#92
Date:
2025-04-13 08:50:24 UTC
From:
To:
Control: tag -1 + pending

I uploaded an NMU with this patch to DELAYED/2-days. nmudiff attached.

Kind regards
Philipp Kern

#852617#99
Date:
2025-04-13 11:22:07 UTC
From:
To:
user debian-release@lists.debian.org
usertag 1091027 + bsp-2025-04-at-vienna
usertag 1057462 + bsp-2025-04-at-vienna
usertag 994274 + bsp-2025-04-at-vienna
tag 1091027 + pending
tag 1057462 + pending
tag 994274 + pending
thanks

Uploaded an NMU to DELAYED/0-day:

Kind regards
Philipp Kern

#852617#104
Date:
2025-04-15 09:19:00 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
autoconf, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 852617@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philipp Kern <pkern@debian.org> (supplier of updated autoconf package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 13 Apr 2025 10:42:16 +0200
Source: autoconf
Architecture: source
Version: 2.72-3.1
Distribution: unstable
Urgency: medium
Maintainer: Alex Myczko <tar@debian.org>
Changed-By: Philipp Kern <pkern@debian.org>
Closes: 852617
Changes:
 autoconf (2.72-3.1) unstable; urgency=medium
 .
   * Non-maintainer upload
   * Let AC_SYS_LARGEFILE output to CPPFLAGS - fixing LFS support on i386.
     (Closes: #852617)
Checksums-Sha1:
 6f6977fc24300c14ae65b014f4acdd2a2719d325 1746 autoconf_2.72-3.1.dsc
 466d6976b9408228bbec4f16b3a7d0c3137cd26a 24096 autoconf_2.72-3.1.debian.tar.xz
 576078a01cbcee2d199e5575e360a2dd7e51aeb8 7522 autoconf_2.72-3.1_amd64.buildinfo
Checksums-Sha256:
 211a4dbec6467f6f4b3137edb2c51466e4147a57143a3365efcba46b486464c2 1746 autoconf_2.72-3.1.dsc
 4f235b135ef2d19b7f7b2831dac859ca42582599a817fd2d14e871f2e720eec9 24096 autoconf_2.72-3.1.debian.tar.xz
 3602072906106a4e6b0460205142379277705564f3e1348a0101ceb6edf028f4 7522 autoconf_2.72-3.1_amd64.buildinfo
Files:
 290ec9d618b7f78fd5d2670119cfcd05 1746 devel optional autoconf_2.72-3.1.dsc
 c1fd654459b63b77e4268f4e73b7fe2c 24096 devel optional autoconf_2.72-3.1.debian.tar.xz
 5bde073cb440e5f5444e1b2acafc6434 7522 devel optional autoconf_2.72-3.1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCgAvFiEEPzuChCNsw7gPxr3/RG4lRTXQVuwFAmf7elURHHBrZXJuQGRl
Ymlhbi5vcmcACgkQRG4lRTXQVuwWKwgAmMi/Cw2xhtMrgHqM+lP/Dyl+K9vUOCpb
xejS4L33H6U+3gSUQ58XetCJF0QLLA4OGW5zNtk4fAMJQcjDPcxtgW+wvN1miOvT
4rbyYIbrZd1vbkI6mxw51u3DgA7Jc6ldREiFt45il5rYMiBVNOHXolqKBEv8TQkA
5J/ywrYK4i3T+5PpEPRvbrQQUKMotAp7lE9LntmpfJ2aBgz/DsN2PHrisx6A+KOS
Q+HANpa0x92U+MNHIbcZOfHq8k4JSbnBEWJOY0AAhZj2wbXpeLTsYTtqMKN2LqvR
HeEfuj8Bgs+3A1vSGY2s4dHYFlk+rFu83/A1k6SSzSPV8HmWMLh/lQ==
=niEh
-----END PGP SIGNATURE-----