Subject: Bug#1097515: opencl-clang-18: ftbfs with GCC-15

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

Package: src:opencl-clang-18
Version: 18.1.1-1
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/opencl-clang-18_18.1.1-1_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

[...]
   29 |   SmallString() = default;
      |   ^~~~~~~~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:31: error: ‘class llvm::SmallVector<char, 256>’ has no member named ‘begin’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                         ~~~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:46: error: ‘class llvm::SmallVector<char, 256>’ has no member named ‘end’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                                        ~~~~~~^~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h: In instantiation of ‘llvm::SmallVector<T, N>::~SmallVector() [with T = const char*; unsigned int N = 16]’:
/usr/lib/llvm-18/include/llvm/Option/ArgList.h:412:40:   required from here
  412 |   InputArgList() : NumInputArgStrings(0) {}
      |                                        ^
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:31: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘begin’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                         ~~~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:46: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘end’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                                        ~~~~~~^~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h: In instantiation of ‘llvm::SmallVector<T, N>::SmallVector(llvm::SmallVector<T, N>&&) [with T = const char*; unsigned int N = 16]’:
/usr/lib/llvm-18/include/llvm/Option/ArgList.h:417:34:   required from here
  417 |       : ArgList(std::move(RHS)), ArgStrings(std::move(RHS.ArgStrings)),
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1260:14: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘empty’
 1260 |     if (!RHS.empty())
      |          ~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h: In instantiation of ‘llvm::SmallVector<T, N>& llvm::SmallVector<T, N>::operator=(llvm::SmallVector<T, N>&&) [with T = const char*; unsigned int N = 16]’:
/usr/lib/llvm-18/include/llvm/Option/ArgList.h:426:42:   required from here
  426 |     ArgStrings = std::move(RHS.ArgStrings);
      |                                          ^
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1278:13: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘empty’
 1278 |     if (RHS.empty()) {
      |         ~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1279:33: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘begin’
 1279 |       this->destroy_range(this->begin(), this->end());
      |                           ~~~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1279:48: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘end’
 1279 |       this->destroy_range(this->begin(), this->end());
      |                                          ~~~~~~^~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1280:13: error: ‘class llvm::SmallVector<const char*, 16>’ has no member named ‘Size’
 1280 |       this->Size = 0;
      |       ~~~~~~^~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h: In instantiation of ‘llvm::SmallVector<T, N>::~SmallVector() [with T = char; unsigned int N = 0]’:
/usr/lib/llvm-18/include/llvm/Support/raw_ostream.h:728:71:   required from here
  728 |   buffer_ostream(raw_ostream &OS) : raw_svector_ostream(Buffer), OS(OS) {}
      |                                                                       ^
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:31: error: ‘class llvm::SmallVector<char, 0>’ has no member named ‘begin’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                         ~~~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:46: error: ‘class llvm::SmallVector<char, 0>’ has no member named ‘end’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                                        ~~~~~~^~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h: In instantiation of ‘llvm::SmallVector<T, N>::~SmallVector() [with T = llvm::StringLiteral; unsigned int N = 3]’:
/usr/lib/llvm-18/include/llvm/Option/OptTable.h:330:7:   required from here
  330 | class GenericOptTable : public OptTable {
      |       ^~~~~~~~~~~~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:31: error: ‘class llvm::SmallVector<llvm::StringLiteral>’ has no member named ‘begin’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                         ~~~~~~^~~~~
/usr/lib/llvm-18/include/llvm/ADT/SmallVector.h:1215:46: error: ‘class llvm::SmallVector<llvm::StringLiteral>’ has no member named ‘end’
 1215 |     this->destroy_range(this->begin(), this->end());
      |                                        ~~~~~~^~~
make[3]: *** [CMakeFiles/opencl-clang.dir/build.make:146: CMakeFiles/opencl-clang.dir/options.cpp.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/opencl-clang-18-18.1.1/build'
make[2]: *** [CMakeFiles/Makefile2:305: CMakeFiles/opencl-clang.dir/all] Error 2
make[2]: Leaving directory '/build/reproducible-path/opencl-clang-18-18.1.1/build'
make[1]: *** [Makefile:139: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/opencl-clang-18-18.1.1/build'
dh_auto_build: error: cd build && make -j8 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:11: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

---

From: "Debian Bug Tracking System" <[email-masked]>
Date: Mon, 17 Feb 2025 17:43:34 +0000

Thank you for filing a new Bug report with Debian.

You can follow progress on this Bug here: 1097515: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097515.

This is an automatically generated reply to let you know your message
has been received.

Your message has been forwarded to the package maintainers (but not
other interested parties, as you requested) for their attention; they
will reply in due course.

Your message has been sent to the package maintainer(s):
 Debian OpenCL team <[email-masked]>

If you wish to submit further information on this problem, please
send it to [email-masked].

Please do not send mail to [email-masked] unless you wish
to report a problem with the Bug-tracking system.

-- 
1097515: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097515
Debian Bug Tracking System
Contact [email-masked] with problems