--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gentoo FTCBFS: uses AC_TRY_RUN
- From: Helmut Grohne <helmut@subdivi.de>
- Date: Sat, 4 Jan 2020 15:09:24 +0100
- Message-id: <20200104140923.GA19333@alf.mars>
Source: gentoo
Version: 0.20.7-1
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs
gentoo fails to cross build from source, becasue it uses AC_TRY_RUN to
figure out whether it needs _FILE_OFFSET_BITS. This can be implemented
using a cross-compatible AC_CHECK_SIZEOF though. Please consider
applying the attached patch.
Helmut
--- gentoo-0.20.7.orig/configure.ac
+++ gentoo-0.20.7/configure.ac
@@ -75,40 +75,17 @@
# We do this in two steps: first figure out struct stat's st_size member's size for a "plain
# compile, and it that's just 32 we try again with _FILE_OFFSET_BITS=64 defined. If that works,
# we simply build gentoo with it and hope for the best.
-AC_MSG_CHECKING([number of bits in st_size field])
-bits="test failed"
-# Put the entire testing program into a variable, for easier re-use below.
-bitstest=`cat <<TESTPROG_EOF
- #include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
-
- int main(void)
- {
- struct stat stbuf;
- FILE *out;
-
- if((out = fopen("conftest.statbits", "wt")) != NULL)
- {
- fprintf(out, "%d\n", CHAR_BIT * sizeof stbuf.st_size);
- fclose(out);
- }
- exit(out != NULL ? EXIT_SUCCESS : EXIT_FAILURE);
- }
-TESTPROG_EOF`
-AC_TRY_RUN([$bitstest], bits=`cat conftest.statbits`)
-AC_MSG_RESULT([$bits])
-if test "x$bits" = "x32" ; then
- AC_MSG_CHECKING([again, with -D_FILE_OFFSET_BITS=64])
+AC_CHECK_SIZEOF([stbuf.st_size],,[AC_INCLUDES_DEFAULT
+#include <limits.h>
+struct stat stbuf;])
+AS_IF([test "$ac_cv_sizeof_stbuf_st_size" = 4],[
oldflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
- bits="test failed"
- AC_TRY_RUN([$bitstest], bits=`cat conftest.statbits`, , CPPFLAGS=$oldflags)
- AC_MSG_RESULT([$bits])
-fi
+ AC_CHECK_SIZEOF([stbuf64.st_size],,[AC_INCLUDES_DEFAULT
+#include <limits.h>
+struct stat stbuf64;])
+ AS_IF([test "$ac_cv_sizeof_stbuf64_st_size" = 8],,CPPFLAGS=$oldflags)
+])
# Check if the math library needs to be linked to explicitly in order to
# get the pow() function.
--- End Message ---
--- Begin Message ---
Source: gentoo
Source-Version: 0.20.7-3
Done: Vagrant Cascadian <vagrant@reproducible-builds.org>
We believe that the bug you reported is fixed in the latest version of
gentoo, 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 948138@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@reproducible-builds.org> (supplier of updated gentoo 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)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 01 Dec 2023 21:15:20 -0800
Source: gentoo
Architecture: source
Version: 0.20.7-3
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Vagrant Cascadian <vagrant@reproducible-builds.org>
Closes: 948138 1024284
Changes:
gentoo (0.20.7-3) unstable; urgency=medium
.
* QA upload.
.
[ Helmut Grohne ]
* Fix cross building by using AC_CHECK_SIZEOF instead of AC_TRY_RUN
(Closes: #948138)
.
[ Vagrant Cascadian ]
* src/Makefile.am: Do not embed the build user's home directory
(Closes: #1024284)
* Update to debhelper-compat 13.
* debian/control: Set Rules-Requires-Root to "no".
* debian/control: Set Vcs-* headers to use dgit repositories.
* debian/copyright: Use secure URL to reference copyright-format
specification.
Checksums-Sha1:
2463270287f573c59656ed380956b4ae0ee04438 1387 gentoo_0.20.7-3.dsc
3d6d886fa9a2d7e02ec2cc3ff29623857dd5e9d5 9672 gentoo_0.20.7-3.debian.tar.xz
Checksums-Sha256:
f7c0b9f07f5b08d1b61434f74e037173041e46992b3d54ced713ed4ea6ef628f 1387 gentoo_0.20.7-3.dsc
c460a3ea493955e8fb476a49af84ff9119afa29f06463cbf267de96958d0a861 9672 gentoo_0.20.7-3.debian.tar.xz
Files:
ed7d5d7a84c3ad73953072fb05e306ac 1387 x11 optional gentoo_0.20.7-3.dsc
bbe78067de43e4b45ca0b6369efa7d6a 9672 x11 optional gentoo_0.20.7-3.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iJYEARYKAD4WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZWq+3CAcdmFncmFudEBy
ZXByb2R1Y2libGUtYnVpbGRzLm9yZwAKCRDcUY/If5cWqni6AQDDrm8lyNi7qKgk
/QxC2aH7CqXlPqV49aiWn5rm+eCRuAEA0aWK8nyQ4sPnr88ETT81UvVZYH9nSDNi
zEjeXSJ+wwA=
=ivLA
-----END PGP SIGNATURE-----
--- End Message ---