#1133521 libkml: ftbfs with GCC-16

#1133521#5
Date:
2026-04-13 13:05:44 UTC
From:
To:
Hi,

libkml fails to build in a test rebuild on at least amd64 and arm64 with
gcc-16/g++-16, but builds properly with gcc-15/g++-15. The severity of this
report will be raised before the forky release.

The full build log can be found at:
https://people.debian.org/~ema/gcc-16-rebuilds/output-1/libkml_arm64.build.xz

The last lines of the build log are at the end of this report.

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

  apt-get -t=experimental install g++

Common build failures include unused (but set) variables, array subscripts
partly outside array bounds, and new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-16/porting_to.html

Please only close this issue after double-checking that the package can be
built correctly with GCC 16.

Please do not reassign this bug to another package. If a fix in another package
is required, then file a bug for the other package (or clone), and mark this
bug as blocked by the bug in the other package.

[...]


   68 |     set_gx_playlist(NULL);
      |                     ^~~~
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:59:55: error: ‘intrusive_ptr_add_ref’ was not declared in this scope; did you mean ‘kmlbase::intrusive_ptr_add_ref’?
   59 |         if( px != 0 && add_ref ) intrusive_ptr_add_ref( px );
      |                                  ~~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                  kmlbase::intrusive_ptr_add_ref
/build/reproducible-path/libkml-1.3.0/src/kml/base/referent.h:70:6: note: ‘kmlbase::intrusive_ptr_add_ref’ declared here
   70 | void intrusive_ptr_add_ref(kmlbase::Referent* r);
      |      ^~~~~~~~~~~~~~~~~~~~~
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:264: src/kml/dom/CMakeFiles/kmldom.dir/gx_tour.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:432: src/kml/dom/CMakeFiles/kmldom.dir/liststyle.cc.o] Error 1
/usr/include/boost/smart_ptr/intrusive_ptr.hpp: In instantiation of ‘constexpr boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T = kmldom::Model]’:
/build/reproducible-path/libkml-1.3.0/src/kml/dom/geometry.h:568:34:   required from here
  568 |   void clear_model() { set_model(NULL); }
      |                                  ^~~~
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:59:55: error: ‘intrusive_ptr_add_ref’ was not declared in this scope; did you mean ‘kmlbase::intrusive_ptr_add_ref’?
   59 |         if( px != 0 && add_ref ) intrusive_ptr_add_ref( px );
      |                                  ~~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                  kmlbase::intrusive_ptr_add_ref
/build/reproducible-path/libkml-1.3.0/src/kml/base/referent.h:70:6: note: ‘kmlbase::intrusive_ptr_add_ref’ declared here
   70 | void intrusive_ptr_add_ref(kmlbase::Referent* r);
      |      ^~~~~~~~~~~~~~~~~~~~~
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:166: src/kml/dom/CMakeFiles/kmldom.dir/document.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:236: src/kml/dom/CMakeFiles/kmldom.dir/geometry.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:572: src/kml/dom/CMakeFiles/kmldom.dir/schema.cc.o] Error 1
/usr/include/boost/smart_ptr/intrusive_ptr.hpp: In instantiation of ‘constexpr boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T = kmldom::GxPlaylist]’:
/build/reproducible-path/libkml-1.3.0/src/kml/dom/gx_tour.h:68:21:   required from here
   68 |     set_gx_playlist(NULL);
      |                     ^~~~
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:59:55: error: ‘intrusive_ptr_add_ref’ was not declared in this scope; did you mean ‘kmlbase::intrusive_ptr_add_ref’?
   59 |         if( px != 0 && add_ref ) intrusive_ptr_add_ref( px );
      |                                  ~~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                  kmlbase::intrusive_ptr_add_ref
/build/reproducible-path/libkml-1.3.0/src/kml/base/referent.h:70:6: note: ‘kmlbase::intrusive_ptr_add_ref’ declared here
   70 | void intrusive_ptr_add_ref(kmlbase::Referent* r);
      |      ^~~~~~~~~~~~~~~~~~~~~
/usr/include/boost/smart_ptr/intrusive_ptr.hpp: In instantiation of ‘constexpr boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T = kmldom::GxPlaylist]’:
/build/reproducible-path/libkml-1.3.0/src/kml/dom/gx_tour.h:68:21:   required from here
   68 |     set_gx_playlist(NULL);
      |                     ^~~~
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:59:55: error: ‘intrusive_ptr_add_ref’ was not declared in this scope; did you mean ‘kmlbase::intrusive_ptr_add_ref’?
   59 |         if( px != 0 && add_ref ) intrusive_ptr_add_ref( px );
      |                                  ~~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                  kmlbase::intrusive_ptr_add_ref
/build/reproducible-path/libkml-1.3.0/src/kml/base/referent.h:70:6: note: ‘kmlbase::intrusive_ptr_add_ref’ declared here
   70 | void intrusive_ptr_add_ref(kmlbase::Referent* r);
      |      ^~~~~~~~~~~~~~~~~~~~~
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:180: src/kml/dom/CMakeFiles/kmldom.dir/element.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:110: src/kml/dom/CMakeFiles/kmldom.dir/atom.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:194: src/kml/dom/CMakeFiles/kmldom.dir/extendeddata.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:712: src/kml/dom/CMakeFiles/kmldom.dir/visitor_driver.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:698: src/kml/dom/CMakeFiles/kmldom.dir/visitor.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:558: src/kml/dom/CMakeFiles/kmldom.dir/region.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:362: src/kml/dom/CMakeFiles/kmldom.dir/kml_handler.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:530: src/kml/dom/CMakeFiles/kmldom.dir/placemark.cc.o] Error 1
make[3]: *** [src/kml/dom/CMakeFiles/kmldom.dir/build.make:334: src/kml/dom/CMakeFiles/kmldom.dir/kml_cast.cc.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:294: src/kml/dom/CMakeFiles/kmldom.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 63%] Linking CXX shared library ../../../lib/libkmlxsd.so
cd /build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu/src/kml/xsd && /usr/bin/cmake -E cmake_link_script CMakeFiles/kmlxsd.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/build/reproducible-path/libkml-1.3.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wno-unused-parameter -pedantic -fno-rtti -shared -Wl,-z,relro -Wl,-z,now -Wl,--dependency-file=CMakeFiles/kmlxsd.dir/link.d -Wl,-soname,libkmlxsd.so.1 -o ../../../lib/libkmlxsd.so.1.3.0 CMakeFiles/kmlxsd.dir/xsd_complex_type.cc.o CMakeFiles/kmlxsd.dir/xsd_element.cc.o CMakeFiles/kmlxsd.dir/xsd_file.cc.o CMakeFiles/kmlxsd.dir/xsd_handler.cc.o CMakeFiles/kmlxsd.dir/xsd_primitive_type.cc.o CMakeFiles/kmlxsd.dir/xsd_util.cc.o CMakeFiles/kmlxsd.dir/xst_parser.cc.o  -Wl,-rpath,/build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu/lib: ../../../lib/libkmlbase.so.1.3.0 /usr/lib/aarch64-linux-gnu/libexpat.so /usr/lib/aarch64-linux-gnu/libz.so /usr/lib/aarch64-linux-gnu/libminizip.so /usr/lib/aarch64-linux-gnu/liburiparser.so /usr/lib/aarch64-linux-gnu/libexpat.so /usr/lib/aarch64-linux-gnu/libz.so /usr/lib/aarch64-linux-gnu/libminizip.so /usr/lib/aarch64-linux-gnu/liburiparser.so
cd /build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu/src/kml/xsd && /usr/bin/cmake -E cmake_symlink_library ../../../lib/libkmlxsd.so.1.3.0 ../../../lib/libkmlxsd.so.1 ../../../lib/libkmlxsd.so
make[3]: Leaving directory '/build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu'
[ 63%] Built target kmlxsd
make[2]: Leaving directory '/build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu'
make[1]: *** [Makefile:139: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/libkml-1.3.0/obj-aarch64-linux-gnu'
dh_auto_build: error: cd obj-aarch64-linux-gnu && make -j128 INSTALL="install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:13: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

#1133521#10
Date:
2026-04-13 13:17:12 UTC
From:
To:
reassign -1 src:boost1.90
found -1 boost1.90/1.90.0-6
affects -1 src:libkml
thanks

This is an issue in boost, reassigning accordingly.

Kind Regards,

Bas

#1133521#25
Date:
2026-08-02 07:39:12 UTC
From:
To:
reassign 1133521 src:libkml 1.3.0-13
thanks

It is not a Boost bug - this is most probably a libkml bug.

boost::intrusive_ptr relies on ADL to find intrusive_ptr_add_ref,
which needs the pointer type to be complete.
GCC-16 is stricter about this than older GCC.

Regards,

Anton

#1133521#36
Date:
2026-08-06 17:21:59 UTC
From:
To:
I have not idea how to fix this, and seeing how libkml is dead upstream, we should just get rid of it.

Both gdal & goldencheetah dropped its use in git, and the latter only had an unused build dependency.

#1133521#41
Date:
2026-08-24 10:38:52 UTC
From:
To:
Dear submitter,

as the package libkml has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1144736

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)