#1133587 octave-optim: ftbfs with GCC-16

#1133587#5
Date:
2026-04-13 13:08:51 UTC
From:
To:
Hi,

octave-optim 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/octave-optim_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.

[...]


         | g++ -std=gnu++11 -E `/usr/bin/mkoctfile --verbose -p INCFLAGS` -x c++ -iquote '.' \
           -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' \
           -D'DEFUNX_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,fname,gname,args,nargout,doc)=DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)' - \
         | sed -e '/.*DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS/!D'; \
         echo "}"; \
        ) \
        | g++ -x c++ -D'DEFUN_DLD_REPLACEMENT_FOR_PACKAGE_DOCS(name,doc)=printf("%c" #name "\n@c " #name " __max_nargin_optim__.cc\n" doc "\n\n", 0x1D);' -o __max_nargin_optim__.bin -
In file included from <stdin>:20:
/usr/include/octave-11.1.0/octave/../octave/lo-mappers.h:29:2: warning: #warning 'header file "lo-mappers.h" is deprecated, use "mappers.h" instead' [-Wcpp]
   29 | #warning 'header file "lo-mappers.h" is deprecated, use "mappers.h" instead'
      |  ^~~~~~~
In file included from <stdin>:20:
/usr/include/octave-11.1.0/octave/../octave/lo-mappers.h:29:2: warning: #warning 'header file "lo-mappers.h" is deprecated, use "mappers.h" instead' [-Wcpp]
   29 | #warning 'header file "lo-mappers.h" is deprecated, use "mappers.h" instead'
      |  ^~~~~~~
In file included from <stdin>:26:
/usr/include/octave-11.1.0/octave/../octave/lo-mappers.h:29:2: warning: #warning 'header file "lo-mappers.h" is deprecated, use "mappers.h" instead' [-Wcpp]
   29 | #warning 'header file "lo-mappers.h" is deprecated, use "mappers.h" instead'
      |  ^~~~~~~
(echo "### This file is generated automatically from the"; \
         echo "### corresponding .cc file by a Makefile rule."; \
         echo ""; ./__disna_optim__.bin) > __disna_optim__.cc.docstrings
(echo "### This file is generated automatically from the"; \
         echo "### corresponding .cc file by a Makefile rule."; \
         echo ""; ./numgradient.bin) > numgradient.cc.docstrings
(echo "### This file is generated automatically from the"; \
         echo "### corresponding .cc file by a Makefile rule."; \
         echo ""; ./numhessian.bin) > numhessian.cc.docstrings
(echo "### This file is generated automatically from the"; \
         echo "### corresponding .cc file by a Makefile rule."; \
         echo ""; ./__max_nargin_optim__.bin) > __max_nargin_optim__.cc.docstrings
(echo "### This file is generated automatically from the"; \
         echo "### corresponding .cc file by a Makefile rule."; \
         echo ""; ./__bfgsmin.bin) > __bfgsmin.cc.docstrings
./munge-texi.pl MFDOCSTRINGS __bfgsmin.cc.docstrings numgradient.cc.docstrings numhessian.cc.docstrings __disna_optim__.cc.docstrings __max_nargin_optim__.cc.docstrings < ../doc/optim.txi > ../doc/optim.texi
makeinfo ../doc/optim.texi -o ../doc/optim.info
macros.texi:51: warning: redefining Texinfo language command: @seealso
In file included from error-helpers.h:20,
                 from error-helpers.cc:22:
config.h:50:37: error: ‘octave_execution_exception’ does not name a type
   50 | #define OCTAVE__EXECUTION_EXCEPTION octave_execution_exception
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
error-helpers.h:33:22: note: in expansion of macro ‘OCTAVE__EXECUTION_EXCEPTION’
   33 | void c_verror (const OCTAVE__EXECUTION_EXCEPTION&, const char *, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
config.h:50:37: error: ‘octave_execution_exception’ does not name a type
   50 | #define OCTAVE__EXECUTION_EXCEPTION octave_execution_exception
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
error-helpers.cc:36:17: note: in expansion of macro ‘OCTAVE__EXECUTION_EXCEPTION’
   36 | c_verror (const OCTAVE__EXECUTION_EXCEPTION&, const char *fmt, ...)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error-helpers.cc: In function ‘void _p_error(const char*, ...)’:
config.h:65:25: error: ‘octave_vformat’ was not declared in this scope; did you mean ‘octave_sort’?
   65 | #define OCTAVE__VFORMAT octave_vformat
      |                         ^~~~~~~~~~~~~~
error-helpers.cc:53:3: note: in expansion of macro ‘OCTAVE__VFORMAT’
   53 |   OCTAVE__VFORMAT (output_buf, fmt, args);
      |   ^~~~~~~~~~~~~~~
make[1]: *** [Makefile:69: error-helpers.o] Error 1
rm numhessian.bin numgradient.cc.docstrings MFDOCSTRINGS numgradient.bin __disna_optim__.cc.docstrings __disna_optim__.bin numhessian.cc.docstrings __max_nargin_optim__.bin __max_nargin_optim__.cc.docstrings __bfgsmin.bin __bfgsmin.cc.docstrings
make[1]: Leaving directory '/tmp/oct-7710Wy/octave-optim-1.6.3/src'

error: pkg: error running 'make' for the optim package
error: called from
    configure_make at line 121 column 9
    install at line 202 column 7
    pkg at line 692 column 9
    /usr/share/dh-octave/install-pkg.m at line 45 column 1
dh_auto_install: error: octave --no-gui --no-history --silent --no-init-file --no-window-system /usr/share/dh-octave/install-pkg.m /build/reproducible-path/octave-optim-1.6.3/debian/octave-optim/usr/share/octave/packages /build/reproducible-path/octave-optim-1.6.3/debian/octave-optim/usr/lib/aarch64-linux-gnu/octave/packages returned exit code 1
make: *** [debian/rules:5: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2