[bug #68028] (image) Deprecation Warning when building image package under version 11.0.92

Carnë Draug <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #13, bug #68028 (group octave):

I submit it says "success" but it seems that it actually fails to upload(or
the file server is failing to make it available for download.

Here's the patch inline (I see you already pushed something similar):


# HG changeset patch
# User Carnë Draug <[email protected]>
# Date 1770807991 0
#      Wed Feb 11 11:06:31 2026 +0000
# Branch stable
# Node ID 27fd6e95716642e85306ca3425ead896c89a4884
# Parent  3edc1ed9d96d283b0b8c5fecefcc7834123af1bd
Check for presence of mappers.h instead of lo-mappers.h (bug #68028)

Octave has renamed the lo-mappers.h to mappers.h.  This commit checks
for the presence of the former to use it instead of the later to avoid
warnings during build.  This is so we remain compatible with Octave 7.

diff -r 3edc1ed9d96d -r 27fd6e957166 .hgignore
--- a/.hgignore	Sun Feb 08 22:42:01 2026 +0200
+++ b/.hgignore	Wed Feb 11 11:06:31 2026 +0000
@@ -19,6 +19,7 @@ syntax: regexp
 ^src/aclocal\.m4$
 ^src/configure$
 ^src/autom4te\.cache($|/)
+^src/config\.h\.in$
 ^src/config\.log$
 ^src/config\.status$
 ^src/Makefile$
diff -r 3edc1ed9d96d -r 27fd6e957166 src/__eps__.cc
--- a/src/__eps__.cc	Sun Feb 08 22:42:01 2026 +0200
+++ b/src/__eps__.cc	Wed Feb 11 11:06:31 2026 +0000
@@ -19,11 +19,21 @@ along with this program; see the file CO
 <http://www.gnu.org/licenses/>.
 */
 
+#include <config.h>
+
 #include <cmath>
 #include <limits>
 
 #include <octave/oct.h>
-#include <octave/mappers.h>
+
+// Octave 11 renamed lo-mappers to mappers so try that first to avoid
+// deprecation warning.  Drop this once we are dependent on Octave 11.
+// See bug #68028.
+#if defined (HAVE_OCTAVE_MAPPERS_H)
+  #include <octave/mappers.h>
+#else
+  #include <octave/lo-mappers.h>
+#endif
 
 // Work around bug #50561 - remove this when the Image package is
 // dependent on Octave 4.4 or later only.
diff -r 3edc1ed9d96d -r 27fd6e957166 src/config.h.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/config.h.in	Wed Feb 11 11:06:31 2026 +0000
@@ -0,0 +1,5 @@
+/* Define to 1 if you have the <octave/lo-mappers.h> header file. */
+#undef HAVE_OCTAVE_LO_MAPPERS_H
+
+/* Define to 1 if you have the <octave/mappers.h> header file. */
+#undef HAVE_OCTAVE_MAPPERS_H
diff -r 3edc1ed9d96d -r 27fd6e957166 src/configure.ac
--- a/src/configure.ac	Sun Feb 08 22:42:01 2026 +0200
+++ b/src/configure.ac	Wed Feb 11 11:06:31 2026 +0000
@@ -21,7 +21,16 @@ image_save_CPPFLAGS="$CPPFLAGS"
 
 CXX=`${MKOCTFILE} -p CXX`
 CXXFLAGS=`${MKOCTFILE} -p CXXFLAGS`
-CPPFLAGS=`${MKOCTFILE} -p CPPFLAGS`
+CPPFLAGS="`${MKOCTFILE} -p CPPFLAGS` `${MKOCTFILE} -p INCFLAGS`"
+
+## Octave 11 renamed lo-mappers.h to mappers.h so check what we have.
+## Drop this once we are dependent on Octave 11.  See bug #68028.
+AC_CHECK_HEADERS([octave/mappers.h],
+  [],
+  [AC_CHECK_HEADERS(
+    [octave/lo-mappers.h],
+    [],
+    AC_MSG_ERROR([Failed to find octave's mappers header file]))])
 
 ## Test for gcc bug #65843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65843
 ## which shows up as Octave bug #45096 https://savannah.gnu.org/bugs/?45096
diff -r 3edc1ed9d96d -r 27fd6e957166 src/imreconstruct.cc
--- a/src/imreconstruct.cc	Sun Feb 08 22:42:01 2026 +0200
+++ b/src/imreconstruct.cc	Wed Feb 11 11:06:31 2026 +0000
@@ -24,10 +24,19 @@
 // This should still be more efficient than using subscript indices to find
 // when we are on the border.
 
+#include <config.h>
+
 #include <functional>
 #include <queue>
 
-#include <octave/mappers.h>
+// Octave 11 renamed lo-mappers to mappers so try that first to avoid
+// deprecation warning.  Drop this once we are dependent on Octave 11.
+// See bug #68028.
+#if defined (HAVE_OCTAVE_MAPPERS_H)
+  #include <octave/mappers.h>
+#else
+  #include <octave/lo-mappers.h>
+#endif
 
 #include <octave/defun-dld.h>
 #include <octave/defun-int.h>




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68028>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaYy8TwAKCRCqLAuaBUf3
Ttv8AQDgtkvfuH5gvJcNHPE9r5D/PzKPWztUEvGH1HhfXm1h3AEAgEiLayq7nINX
V+hymgsQBtZI3c6i4jLA8A1CgC3O1wE=
=/N3d
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.