Bug#811634: FTBFS with GCC 6: cannot convert x to y

2016-06-27 Thread Gert Wollny
Control: tags -1 patch 

Hello, 

the attached patch fixes this bug. I've only tested it with g++-6, i.e.
I don't know whether it will compile properly with -std < c++11 (That
is with g++-5 and not forcing -std=c++11), but it should. 

Best, 
Gert 




Author: Gert Wollny 
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811634
Description: Fix compilation with g++-6 
 This patch might require that -std=c++11 is set. 

--- a/meshlab/src/common/GLLogStream.h
+++ b/meshlab/src/common/GLLogStream.h
@@ -51,7 +51,7 @@
 	void Logf(int Level, const char * f, ... );
   void Log(int Level, const char * buf )
 	{
-		S.push_back(std::make_pair(Level,buf));
+		S.push_back(std::make_pair(Level,buf));
 qDebug("LOG: %i %s",Level,buf);
 	}
 
--- a/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp
+++ b/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp
@@ -122,7 +122,7 @@
 		currentT = p;
 
 		// We do not intersect grid.
-		if (!found) return false;
+		if (!found) return NULL;
 }
 
 stepX = (dir.x() > 0) ? 1 : -1;
--- a/vcglib/vcg/complex/algorithms/clean.h
+++ b/vcglib/vcg/complex/algorithms/clean.h
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // VCG headers
 #include 
@@ -1703,7 +1704,7 @@
 		Allocator::DeleteFace(m,(**fpvi));
 }
   }
-			return std::make_pair(TotalCC,DeletedCC);
+  return std::make_pair(TotalCC,DeletedCC);
 }
 
 
@@ -1734,7 +1735,7 @@
 		tri::Allocator::DeleteFace(m,(**fpvi));
 }
   }
-			return std::make_pair(TotalCC,DeletedCC);
+			return std::make_pair(TotalCC,DeletedCC);
 }
 
 /// Remove the connected components greater than a given diameter
@@ -1764,7 +1765,7 @@
 		tri::Allocator::DeleteFace(m,(**fpvi));
 }
   }
-			return std::make_pair(TotalCC,DeletedCC);
+			return std::make_pair(TotalCC,DeletedCC);
 }
 
 		}; // end class
--- a/vcglib/vcg/math/base.h
+++ b/vcglib/vcg/math/base.h
@@ -94,7 +94,7 @@
 /// static_assert: implemented as a macro for "assert", but it is separated for clarity.
 /// Should be used for checking integrity constraints that can be tested at complile time,
 /// as the ones involving templated constants in templated classes.
-#define static_assert assert
+//#define static_assert assert
 
   #ifdef __BORLANDC__
 float sqrtf (float v) {return sqrt(v);}


Bug#811634: FTBFS with GCC 6: cannot convert x to y

2016-01-19 Thread Martin Michlmayr
Package: meshlab
Version: 1.3.2+dfsg1-2
Severity: important
User: debian-...@lists.debian.org
Usertags: ftbfs-gcc-6 gcc-6-cannot-convert

This package fails to build with GCC 6.  GCC 6 has not been released
yet, but it's expected that GCC 6 will become the default compiler for
stretch.

Note that only the first error is reported; there might be more.  You
can find a snapshot of GCC 6 in experimental.  To build with GCC 6,
you can set CC=gcc-6 CXX=g++-6 explicitly.

> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
> g++ -c -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security 
> -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -W -D_REENTRANT -DQT_NO_DEBUG 
> -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB 
> -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore 
> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml 
> -I/usr/include/qt4/QtScript -I/usr/include/qt4 -Issynth -I/usr/X11R6/include 
> -I. -o VoxelStepper.o ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp
> ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp: In member function 
> 'QList* 
> SyntopiaCore::GLEngine::VoxelStepper::setupRay(SyntopiaCore::Math::Vector3f, 
> SyntopiaCore::Math::Vector3f, double&)':
> ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp:125:26: error: cannot 
> convert 'bool' to 'QList*' in return
>if (!found) return false;
>   ^
> 
> Makefile:609: recipe for target 'VoxelStepper.o' failed
> make[2]: *** [VoxelStepper.o] Error 1
> make[2]: Leaving directory 
> '/<>/meshlab-1.3.2+dfsg1/meshlab/src/external/structuresynth'

-- 
Martin Michlmayr
Linux for HPE Helion, Hewlett Packard Enterprise