Subject: android-platform-frameworks-base: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 17:03:13 +0000

Package: src:android-platform-frameworks-base
Version: 1:14~beta1-3
Severity: important
Tags: sid forky
User: [email-masked]
Usertags: ftbfs-gcc-15

[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-frameworks-base_14~beta1-3_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

[...]
ln -sf libaapt.so.0 debian/out/libaapt.so
make[2]: Leaving directory '/build/reproducible-path/android-platform-frameworks-base-14~beta1'
dh_auto_build --buildsystem=makefile -- -f debian/aapt.mk
	make -j8 -f debian/aapt.mk
make[2]: Entering directory '/build/reproducible-path/android-platform-frameworks-base-14~beta1'
clang++ tools/aapt/Main.o -o debian/out/aapt -Wl,-z,relro -Wl,-z,now -fPIC -fuse-ld=lld -Wl,--build-id=sha1 -Ldebian/out -L/usr/lib/x86_64-linux-gnu/android -Wl,-rpath=/usr/lib/x86_64-linux-gnu/android -laapt -landroidfw -lutils -pie
make[2]: Leaving directory '/build/reproducible-path/android-platform-frameworks-base-14~beta1'
dh_auto_build --buildsystem=makefile -- -f debian/libaapt2.mk
	make -j8 -f debian/libaapt2.mk
make[2]: Entering directory '/build/reproducible-path/android-platform-frameworks-base-14~beta1'
mkdir -p debian/out/proto/frameworks/base/tools/aapt2
mkdir -p debian/out/proto/frameworks/base/tools/aapt2
mkdir -p debian/out/proto/frameworks/base/tools/aapt2
protoc --cpp_out=debian/out/proto/frameworks/base/tools/aapt2 \
	--proto_path=tools/aapt2 tools/aapt2/Configuration.proto
protoc --cpp_out=debian/out/proto/frameworks/base/tools/aapt2 \
	--proto_path=tools/aapt2 tools/aapt2/Resources.proto
protoc --cpp_out=debian/out/proto/frameworks/base/tools/aapt2 \
	--proto_path=tools/aapt2 tools/aapt2/ResourcesInternal.proto
In file included from tools/aapt2/cmd/Dump.cpp:17:
In file included from tools/aapt2/cmd/Dump.h:20:
tools/aapt2/io/FileStream.h:56:19: error: use of undeclared identifier 'uint8_t'
   56 |   std::unique_ptr<uint8_t[]> buffer_;
      |                   ^
tools/aapt2/io/FileStream.h:56:27: error: expected expression
   56 |   std::unique_ptr<uint8_t[]> buffer_;
      |                           ^
tools/aapt2/io/FileStream.h:98:19: error: use of undeclared identifier 'uint8_t'
   98 |   std::unique_ptr<uint8_t[]> buffer_;
      |                   ^
tools/aapt2/io/FileStream.h:98:27: error: expected expression
   98 |   std::unique_ptr<uint8_t[]> buffer_;
      |                           ^
tools/aapt2/cmd/Dump.cpp:156:21: error: no matching constructor for initialization of 'ContainerReader'
  156 |     ContainerReader reader(&input);
      |                     ^      ~~~~~~
tools/aapt2/format/Container.h:83:12: note: candidate constructor not viable: no known conversion from 'io::FileInputStream *' to 'io::InputStream *' for 1st argument
   83 |   explicit ContainerReader(io::InputStream* in);
      |            ^               ~~~~~~~~~~~~~~~~~~~
tools/aapt2/format/Container.h:91:28: note: candidate constructor not viable: no known conversion from 'io::FileInputStream *' to 'const ContainerReader' for 1st argument
   91 |   DISALLOW_COPY_AND_ASSIGN(ContainerReader);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/android/android-base/macros.h:46:3: note: expanded from macro 'DISALLOW_COPY_AND_ASSIGN'
   46 |   TypeName(const TypeName&) = delete;      \
      |   ^        ~~~~~~~~~~~~~~~
5 errors generated.
make[2]: *** [debian/libaapt2.mk:129: tools/aapt2/cmd/Dump.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build/reproducible-path/android-platform-frameworks-base-14~beta1'
dh_auto_build: error: make -j8 -f debian/libaapt2.mk returned exit code 2
make[1]: *** [debian/rules:52: debian/out/libaapt2.so] Error 25
make[1]: Leaving directory '/build/reproducible-path/android-platform-frameworks-base-14~beta1'
make: *** [debian/rules:61: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2