#1097539 paho.mqtt.c: ftbfs with GCC-15

#1097539#5
Date:
2025-02-17 17:42:17 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/paho.mqtt.c_1.3.14-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

[...]
[ 10%] Building C object src/CMakeFiles/common_ssl_obj_static.dir/Tree.c.o
cd /build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu/src && /usr/bin/cc -DOPENSSL=1 -DPAHO_MQTT_STATIC=1 -D_GNU_SOURCE  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/paho.mqtt.c-1.3.14=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -fvisibility=hidden -MD -MT src/CMakeFiles/common_ssl_obj_static.dir/Tree.c.o -MF CMakeFiles/common_ssl_obj_static.dir/Tree.c.o.d -o CMakeFiles/common_ssl_obj_static.dir/Tree.c.o -c /build/reproducible-path/paho.mqtt.c-1.3.14/src/Tree.c
[ 10%] Building C object src/CMakeFiles/common_ssl_obj_static.dir/Socket.c.o
cd /build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu/src && /usr/bin/cc -DOPENSSL=1 -DPAHO_MQTT_STATIC=1 -D_GNU_SOURCE  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/paho.mqtt.c-1.3.14=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -fvisibility=hidden -MD -MT src/CMakeFiles/common_ssl_obj_static.dir/Socket.c.o -MF CMakeFiles/common_ssl_obj_static.dir/Socket.c.o.d -o CMakeFiles/common_ssl_obj_static.dir/Socket.c.o -c /build/reproducible-path/paho.mqtt.c-1.3.14/src/Socket.c
In file included from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTProtocolClient.h:25,
                 from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTProtocolClient.c:35:
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: error: ‘bool’ cannot be defined via ‘typedef’
   31 | typedef unsigned int bool;
      |                      ^~~~
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:1: warning: useless type name in empty declaration
   31 | typedef unsigned int bool;
      | ^~~~~~~
[ 11%] Building C object src/CMakeFiles/common_ssl_obj_static.dir/Log.c.o
cd /build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu/src && /usr/bin/cc -DOPENSSL=1 -DPAHO_MQTT_STATIC=1 -D_GNU_SOURCE  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/paho.mqtt.c-1.3.14=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -fvisibility=hidden -MD -MT src/CMakeFiles/common_ssl_obj_static.dir/Log.c.o -MF CMakeFiles/common_ssl_obj_static.dir/Log.c.o.d -o CMakeFiles/common_ssl_obj_static.dir/Log.c.o -c /build/reproducible-path/paho.mqtt.c-1.3.14/src/Log.c
make[3]: *** [src/CMakeFiles/common_ssl_obj_static.dir/build.make:96: src/CMakeFiles/common_ssl_obj_static.dir/MQTTProtocolClient.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 11%] Building C object src/CMakeFiles/common_ssl_obj.dir/Clients.c.o
cd /build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu/src && /usr/bin/cc -DOPENSSL=1 -DPAHO_MQTT_EXPORTS=1 -D_GNU_SOURCE  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/paho.mqtt.c-1.3.14=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -fvisibility=hidden -MD -MT src/CMakeFiles/common_ssl_obj.dir/Clients.c.o -MF CMakeFiles/common_ssl_obj.dir/Clients.c.o.d -o CMakeFiles/common_ssl_obj.dir/Clients.c.o -c /build/reproducible-path/paho.mqtt.c-1.3.14/src/Clients.c
In file included from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTProtocolClient.h:25,
                 from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTProtocolClient.c:35:
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: error: ‘bool’ cannot be defined via ‘typedef’
   31 | typedef unsigned int bool;
      |                      ^~~~
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:1: warning: useless type name in empty declaration
   31 | typedef unsigned int bool;
      | ^~~~~~~
In file included from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.c:28:
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: error: ‘bool’ cannot be defined via ‘typedef’
   31 | typedef unsigned int bool;
      |                      ^~~~
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:1: warning: useless type name in empty declaration
   31 | typedef unsigned int bool;
      | ^~~~~~~
[ 12%] Building C object src/CMakeFiles/common_ssl_obj.dir/utf-8.c.o
cd /build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu/src && /usr/bin/cc -DOPENSSL=1 -DPAHO_MQTT_EXPORTS=1 -D_GNU_SOURCE  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/paho.mqtt.c-1.3.14=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -fvisibility=hidden -MD -MT src/CMakeFiles/common_ssl_obj.dir/utf-8.c.o -MF CMakeFiles/common_ssl_obj.dir/utf-8.c.o.d -o CMakeFiles/common_ssl_obj.dir/utf-8.c.o -c /build/reproducible-path/paho.mqtt.c-1.3.14/src/utf-8.c
make[3]: *** [src/CMakeFiles/common_ssl_obj.dir/build.make:96: src/CMakeFiles/common_ssl_obj.dir/MQTTProtocolClient.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [src/CMakeFiles/common_ssl_obj_static.dir/build.make:138: src/CMakeFiles/common_ssl_obj_static.dir/MQTTPacket.c.o] Error 1
In file included from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacketOut.h:23,
                 from /build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacketOut.c:30:
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: error: ‘bool’ cannot be defined via ‘typedef’
   31 | typedef unsigned int bool;
      |                      ^~~~
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:1: warning: useless type name in empty declaration
   31 | typedef unsigned int bool;
      | ^~~~~~~
make[3]: *** [src/CMakeFiles/common_ssl_obj_static.dir/build.make:152: src/CMakeFiles/common_ssl_obj_static.dir/MQTTPacketOut.c.o] Error 1
In file included from /build/reproducible-path/paho.mqtt.c-1.3.14/src/Log.c:27:
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: error: ‘bool’ cannot be defined via ‘typedef’
   31 | typedef unsigned int bool;
      |                      ^~~~
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:22: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
/build/reproducible-path/paho.mqtt.c-1.3.14/src/MQTTPacket.h:31:1: warning: useless type name in empty declaration
   31 | typedef unsigned int bool;
      | ^~~~~~~
make[3]: *** [src/CMakeFiles/common_ssl_obj_static.dir/build.make:208: src/CMakeFiles/common_ssl_obj_static.dir/Log.c.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:454: src/CMakeFiles/common_ssl_obj.dir/all] Error 2
make[3]: Leaving directory '/build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:550: src/CMakeFiles/common_ssl_obj_static.dir/all] Error 2
make[2]: Leaving directory '/build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:159: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/paho.mqtt.c-1.3.14/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j8 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2