Bug#984401: vtk7: ftbfs with GCC-11

2021-11-18 Thread Steve Langasek
Package: vtk7
Version: 7.1.1+dfsg2-10
Followup-For: Bug #984401
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Please find attached a patch which has been uploaded to Ubuntu to fix this
build failure.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru vtk7-7.1.1+dfsg2/debian/patches/gcc-11.patch 
vtk7-7.1.1+dfsg2/debian/patches/gcc-11.patch
--- vtk7-7.1.1+dfsg2/debian/patches/gcc-11.patch1969-12-31 
16:00:00.0 -0800
+++ vtk7-7.1.1+dfsg2/debian/patches/gcc-11.patch2021-11-18 
09:30:28.0 -0800
@@ -0,0 +1,53 @@
+Description: gcc-11 compatibility
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/984401
+Last-Update: 2021-11-18
+
+Index: vtk7-7.1.1+dfsg2/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx
+===
+--- vtk7-7.1.1+dfsg2.orig/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx
 vtk7-7.1.1+dfsg2/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx
+@@ -52,7 +52,7 @@
+ XdmfErrorMessage("Cannot Receive Message of Length = " << 
Msg->Length);
+ return(XDMF_FAIL);
+ }
+-if(Msg->Data <= 0 ){
++if(!Msg->Data){
+ XdmfErrorMessage("Cannot Receive Message into Data Buffer = " << 
Msg->Length);
+ return(XDMF_FAIL);
+ }
+@@ -66,7 +66,7 @@
+ XdmfErrorMessage("Cannot Send Message of Length = " << Msg->Length);
+ return(XDMF_FAIL);
+ }
+-if(Msg->Data <= 0 ){
++if(!Msg->Data){
+ XdmfErrorMessage("Cannot Send Message from Data Buffer = " << 
Msg->Length);
+ return(XDMF_FAIL);
+ }
+Index: vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h
+===
+--- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchyPrivate.h
 vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h
+@@ -66,7 +66,7 @@
+ {
+ }
+ 
+-bool operator () ( const vtkIdType& a, const vtkIdType& b )
++bool operator () ( const vtkIdType& a, const vtkIdType& b ) const
+ {
+   if (0 == this->Hierarchy)
+   {
+Index: vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx
+===
+--- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchy.cxx
 vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx
+@@ -525,7 +525,7 @@
+   {
+   public:
+ bool operator()(const vtkHierarchyNode & a,
+-const vtkHierarchyNode & b)
++const vtkHierarchyNode & b) const
+ {
+   if (a.Level != b.Level)
+   {
diff -Nru vtk7-7.1.1+dfsg2/debian/patches/series 
vtk7-7.1.1+dfsg2/debian/patches/series
--- vtk7-7.1.1+dfsg2/debian/patches/series  2020-12-15 11:51:51.0 
-0800
+++ vtk7-7.1.1+dfsg2/debian/patches/series  2021-11-18 09:28:09.0 
-0800
@@ -23,3 +23,4 @@
 mysq8_my_bool.patch
 3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch
 581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch
+gcc-11.patch


Bug#984401: vtk7: ftbfs with GCC-11

2021-10-16 Thread John David Anglin
Source: vtk7
Version: 7.1.1+dfsg2-10+b2
Followup-For: Bug #984401

Dear Maintainer,

On hppa:

[  3%] Building CXX object 
ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeFiles/vtkxdmf2.dir/XdmfDsmMsg.cxx.o
cd /<>/debian/build/ThirdParty/xdmf2/vtkxdmf2/libsrc && 
/usr/bin/mpic++ -DLinux -DMPICH_IGNORE_CXX_SEEK -DVTK_IN_VTK -D_HPUX_SOURCE 
-Dvtkxdmf2_EXPORTS -I/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc 
-I/<>/debian/build/ThirdParty/xdmf2/vtkxdmf2/libsrc 
-I/<>/debian/build/ThirdParty/xdmf2 
-I/<>/ThirdParty/xdmf2 
-I/<>/debian/build/ThirdParty/hdf5 
-I/<>/ThirdParty/hdf5 -I/usr/include/hdf5/openmpi 
-I/<>/debian/build/ThirdParty/zlib 
-I/<>/ThirdParty/zlib 
-I/<>/debian/build/ThirdParty/libxml2 
-I/<>/ThirdParty/libxml2 -I/usr/include/libxml2 
-I/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc/utils -g -O2 
-ffile-prefix-map=/<>=. -Wformat -Werror=format-security 
-Wdate-time -D_FORTIFY_SOURCE=2  -w -w -w -fPIC -MD -MT 
ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeFiles/vtkxdmf2.dir/XdmfDsmMsg.cxx.o -MF 
CMakeFiles/vtkxdmf2.dir/XdmfDsmMsg.cxx.o.d -o 
CMakeFiles/vtkxdmf2.dir/XdmfDsmMsg.cxx.o -c 
/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmMsg.cxx
/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx: In member 
function ‘virtual XdmfInt32 xdmf2::XdmfDsmComm::Receive(xdmf2::XdmfDsmMsg*)’:
/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx:55:18: error: 
ordered comparison of pointer with integer zero (‘void*’ and ‘int’)
   55 | if(Msg->Data <= 0 ){
  |~~^~~~
/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx: In member 
function ‘virtual XdmfInt32 xdmf2::XdmfDsmComm::Send(xdmf2::XdmfDsmMsg*)’:
/<>/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx:69:18: error: 
ordered comparison of pointer with integer zero (‘void*’ and ‘int’)
   69 | if(Msg->Data <= 0 ){
  |~~^~~~
make[4]: *** 
[ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeFiles/vtkxdmf2.dir/build.make:541: 
ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeFiles/vtkxdmf2.dir/XdmfDsmComm.cxx.o] 
Error 1
make[4]: *** Waiting for unfinished jobs

Regards,
Dave Anglin

-- System Information:
Debian Release: bookworm/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 5.14.12+ (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)