#1096309 android-platform-external-libselinux: ftbfs with GCC-15

#1096309#5
Date:
2025-02-17 17:03:11 UTC
From:
To:
[This bug is NOT targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/android-platform-external-libselinux_10.0.0+r36-2_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

To build with GCC 15, either set CC=gcc-15 CXX=g++-15 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other Common build failures are new warnings resulting in build failures
with -Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-15/porting_to.html

[...]
   57 |         uint32_t bool;
      |                      ^
libsepol/src/link.c: In function ‘copy_cond_list’:
libsepol/src/link.c:1584:35: error: expected identifier before ‘bool’
 1584 |                         cur_expr->bool =
      |                                   ^~~~
In file included from libsepol/include/sepol/policydb/expand.h:30,
                 from libsepol/src/module.c:25:
libsepol/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
libsepol/include/sepol/policydb/conditional.h:57:22: warning: declaration does not declare anything
   57 |         uint32_t bool;
      |                      ^
In file included from libsepol/src/module_to_cil.c:48:
libsepol/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
libsepol/include/sepol/policydb/conditional.h:57:22: warning: declaration does not declare anything
   57 |         uint32_t bool;
      |                      ^
libsepol/src/module_to_cil.c: In function ‘cond_expr_to_cil’:
libsepol/src/module_to_cil.c:1285:62: error: expected identifier before ‘bool’
 1285 |                         val1 = pdb->p_bool_val_to_name[curr->bool - 1];
      |                                                              ^~~~
In file included from libsepol/include/sepol/policydb/expand.h:30,
                 from libsepol/src/policydb.c:48:
libsepol/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
libsepol/include/sepol/policydb/conditional.h:57:22: warning: declaration does not declare anything
   57 |         uint32_t bool;
      |                      ^
In file included from libsepol/src/services.c:61:
libsepol/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
libsepol/include/sepol/policydb/conditional.h:57:22: warning: declaration does not declare anything
   57 |         uint32_t bool;
      |                      ^
In file included from libsepol/include/sepol/policydb/expand.h:30,
                 from libsepol/src/users.c:11:
libsepol/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
libsepol/include/sepol/policydb/conditional.h:57:22: warning: declaration does not declare anything
   57 |         uint32_t bool;
      |                      ^
In file included from libsepol/src/write.c:41:
libsepol/include/sepol/policydb/conditional.h:57:18: error: two or more data types in declaration specifiers
   57 |         uint32_t bool;
      |                  ^~~~
libsepol/include/sepol/policydb/conditional.h:57:22: warning: declaration does not declare anything
   57 |         uint32_t bool;
      |                      ^
In file included from libsepol/src/write.c:46:
libsepol/src/write.c: In function ‘cond_write_node’:
libsepol/src/write.c:772:54: error: expected identifier before ‘bool’
  772 |                 buf[items++] = cpu_to_le32(cur_expr->bool);
      |                                                      ^~~~
libsepol/src/private.h:27:25: note: in definition of macro ‘cpu_to_le32’
   27 | #define cpu_to_le32(x) (x)
      |                         ^
make[2]: *** [debian/libsepol.mk:62: build] Error 1
make[2]: Leaving directory '/build/reproducible-path/android-platform-external-libselinux-10.0.0+r36'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" -f debian/libsepol.mk returned exit code 2
make[1]: *** [debian/rules:16: debian/out/libsepol.so] Error 25
make[1]: Leaving directory '/build/reproducible-path/android-platform-external-libselinux-10.0.0+r36'
make: *** [debian/rules:10: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1096309#14
Date:
2026-09-16 10:44:24 UTC
From:
To:
Hi all,


I'm planning to fix this bug by NMU. It is a simple fix. Just add
-std=gnu17 in debian/rules.


Please see the debdiff attached.


I think I'll wait for 10 days if no one object. And upload to delay/10.


Yours,
Paul

#1096309#19
Date:
2026-09-26 11:04:22 UTC
From:
To:
Hi all,


I've uploaded to delay/10.


Please see https://ftp-master.debian.org/deferred.html


Yours,

Paul

#1096309#24
Date:
2026-10-06 01:34:00 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
android-platform-external-libselinux, 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 1096309@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> (supplier of updated android-platform-external-libselinux 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: Wed, 16 Sep 2026 11:29:45 +0100
Source: android-platform-external-libselinux
Architecture: source
Version: 10.0.0+r36-2.1
Distribution: unstable
Urgency: low
Maintainer: Android Tools Maintainers <android-tools-devel@lists.alioth.debian.org>
Changed-By: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Closes: 1096309
Changes:
 android-platform-external-libselinux (10.0.0+r36-2.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * debian/rules: Build with -std=gnu17 to fix FTBFS with GCC 15.
     (Closes: #1096309)
Checksums-Sha1:
 b5350b02f086c3f0be4f5050dff9d5c28631e975 2689 android-platform-external-libselinux_10.0.0+r36-2.1.dsc
 22846fd92d2a1728c156d95380c6dc8e5dfbd1a7 6156 android-platform-external-libselinux_10.0.0+r36-2.1.debian.tar.xz
 2cc55f51622a6a16ca070b29330b7c67d689acf2 6464 android-platform-external-libselinux_10.0.0+r36-2.1_source.buildinfo
Checksums-Sha256:
 033e0560031efb8718a4a6b6c7bfe993092129494104068ff50297d86f6c12d4 2689 android-platform-external-libselinux_10.0.0+r36-2.1.dsc
 867f78e58be6bf76e13a1a4354eda99b81146c4efb48a823fe1b97082c48bce5 6156 android-platform-external-libselinux_10.0.0+r36-2.1.debian.tar.xz
 8bbc0f57b48e0ae94b27b78c393438ecd041d4c31b0b742c1c5c386ef69d3385 6464 android-platform-external-libselinux_10.0.0+r36-2.1_source.buildinfo
Files:
 8fa115ad5c02921ea586f796efd92455 2689 libs optional android-platform-external-libselinux_10.0.0+r36-2.1.dsc
 54483d9a25fc36f3d283a4d7940478be 6156 libs optional android-platform-external-libselinux_10.0.0+r36-2.1.debian.tar.xz
 b6bce0c444b0da69c9a8ac8e563cb998 6464 libs optional android-platform-external-libselinux_10.0.0+r36-2.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJHBAEBCgAxFiEEo2h49GQQhoFgDLZIRBc/oT0FiIgFAmq3FzYTHHBhdWxsaXVA
ZGViaWFuLm9yZwAKCRBEFz+hPQWIiIm3D/wLFJu80MP4s5QRlg/065yvAQ9pRi8Y
ntdD7Zze/Odpb36KgtFiC3rcEo0l0f/AbI6SimczcV+yVBKqa/yCrzArmJ9SA0O/
LOzZPNOxVQ8uhEU0uf6zSbw0G5iR7sE3JR3Pp9VChQ2656LSAjSvlDUgEZXggPLH
KCp1jZmm8w0H7z/3ktOazpyZQmHfbXWVUJnZ7h65jC1p3JYiFfYYBO4Hv+o+IZ0I
WvT+4ZulQyaNL0dypww8tsVloEsmfKHm6yo4648hWkEi2kXSMfNUhbnpRXSP/5ZT
pHr8kWpq2SJi/ZfDVa8eNxZr+vcwisGiFGUWelv6cMzSHrXMivpxjRz0P/GbT+YC
ZjocaQxmsDqwVHSx1QS+fQUEO8uYrEyPuTSNA8sbrSOWCDiaiqRn6wBv03QfEuO5
qOH2ZNB1n8fBGSyQff1JjZIoLepBfJi33cV2KnpQJRNFMSusY2OFVelHJhNrUCbq
wfnCfQOsw27J7cunXrLEPuLcJurRcYlZUjCX6shrJTWMBPBC5u3+UgdKrpf8oY+f
a/OiABWMjQICwyWeN6fyoe5qb8z0plJUoQMIargYgTIY2C4t/PuDoBBMrrMB4wer
+NcxnDD2/RxqHRNf/Mg9cIKNG0OcbqRIXSxUT0FSxXyO+59LQU23xf0IE6zkND3H
MTnKDPYW+5cmGA==
=GO6f
-----END PGP SIGNATURE-----