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

2016-09-19 Thread James Cowgill
Control: fixed -1 2.1.0-git20160229+dfsg-2~exp1
Control: tags -1 pending

Hi all,

On 19/09/16 12:20, Adrian Bunk wrote:
> Control: tags 811612 +fixed-upstream
> Control: tags 811612 +patch
> 
> On Wed, Jan 20, 2016 at 11:14:09PM +0100, Lennart Weller wrote:
>> On 20.01.2016 18:30, Martin Michlmayr wrote
>>> This builds fine.
>> Nice. So I either just have to add the patches for 2.0.8 or get 0ad to work
>> with 2.1.0. I'll look into that in the next few days as time permits.
>> ...
> 
> This bug is the reason why 0ad is not in testing, and if it doesn't get 
> fixed then 0ad will not be in the next Debian stable. 
> 
> I've attached the trivial fix.

Thanks for the patch Adrian.

I've uploaded the attached NMU which fixes this to DELAYED/5. Please
tell me if you want me to delay / cancel it. I've also pushed the fix to
the git repository on collab-maint.

The bug doesn't appear to affect the newer version in experimental.

Thanks,
James
diff -Nru nvidia-texture-tools-2.0.8-1+dfsg/debian/changelog nvidia-texture-tools-2.0.8-1+dfsg/debian/changelog
--- nvidia-texture-tools-2.0.8-1+dfsg/debian/changelog	2015-12-08 07:51:31.0 +
+++ nvidia-texture-tools-2.0.8-1+dfsg/debian/changelog	2016-09-19 12:41:04.0 +
@@ -1,3 +1,12 @@
+nvidia-texture-tools (2.0.8-1+dfsg-8.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Adrian Bunk ]
+  * Fix FTBFS with GCC 6. (Closes: #811612)
+
+ -- James Cowgill   Mon, 19 Sep 2016 12:41:04 +
+
 nvidia-texture-tools (2.0.8-1+dfsg-8) unstable; urgency=medium
 
   * Removed symbols file
diff -Nru nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/14-gcc6.patch nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/14-gcc6.patch
--- nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/14-gcc6.patch	1970-01-01 00:00:00.0 +
+++ nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/14-gcc6.patch	2016-09-19 12:32:14.0 +
@@ -0,0 +1,60 @@
+Description: Fix building with gcc 6
+Author: Adrian Bunk 
+Bug-Debian: https://bugs.debian.org/811612
+Reviewed-By: James Cowgill 
+
+--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvimage/ImageIO.cpp
 nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp
+@@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(cons
+ 	StdInputStream stream(fileName);
+ 	
+ 	if (stream.isError()) {
+-		return false;
++		return NULL;
+ 	}
+ 	
+ 	return loadFloat(fileName, stream);
+@@ -233,7 +233,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
+ 		case TGA_TYPE_INDEXED:
+ 			if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) {
+ nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" );
+-return false;
++return NULL;
+ 			}
+ 			pal = true;
+ 			break;
+@@ -254,7 +254,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
+ 
+ 		default:
+ 			nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
+-			return false;
++			return NULL;
+ 	}
+ 
+ 	const uint pixel_size = (tga.pixel_size/8);
+@@ -621,7 +621,7 @@ Image * nv::ImageIO::loadPNG(Stream & s)
+ 	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ 	if (png_ptr == NULL) {
+ 	//	nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name );
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	// Allocate/initialize a memory block for the image information
+@@ -629,14 +629,14 @@ Image * nv::ImageIO::loadPNG(Stream & s)
+ 	if (info_ptr == NULL) {
+ 		png_destroy_read_struct(_ptr, NULL, NULL);
+ 	//	nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name );
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	// Set up the error handling
+ 	if (setjmp(png_jmpbuf(png_ptr))) {
+ 		png_destroy_read_struct(_ptr, _ptr, NULL);
+ 	//	nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name );
+-		return false;
++		return NULL;
+ 	}
+ 
+ 	// Set up the I/O functions.
diff -Nru nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series
--- nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series	2015-12-08 07:51:31.0 +
+++ nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series	2016-09-19 12:30:02.0 +
@@ -11,3 +11,4 @@
 11-arm64-support.patch
 12-fix-simd-warning.patch
 13-typos.patch
+14-gcc6.patch


signature.asc
Description: OpenPGP digital signature


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

2016-09-19 Thread Adrian Bunk
Control: tags 811612 +fixed-upstream
Control: tags 811612 +patch

On Wed, Jan 20, 2016 at 11:14:09PM +0100, Lennart Weller wrote:
> On 20.01.2016 18:30, Martin Michlmayr wrote
> > This builds fine.
> Nice. So I either just have to add the patches for 2.0.8 or get 0ad to work
> with 2.1.0. I'll look into that in the next few days as time permits.
>...

This bug is the reason why 0ad is not in testing, and if it doesn't get 
fixed then 0ad will not be in the next Debian stable. 

I've attached the trivial fix.

> Lennart

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

Description: Fix building with gcc 6

--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvimage/ImageIO.cpp
+++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp
@@ -135,7 +135,7 @@ FloatImage * nv::ImageIO::loadFloat(cons
 	StdInputStream stream(fileName);
 	
 	if (stream.isError()) {
-		return false;
+		return NULL;
 	}
 	
 	return loadFloat(fileName, stream);
@@ -233,7 +233,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
 		case TGA_TYPE_INDEXED:
 			if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) {
 nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" );
-return false;
+return NULL;
 			}
 			pal = true;
 			break;
@@ -254,7 +254,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
 
 		default:
 			nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
-			return false;
+			return NULL;
 	}
 
 	const uint pixel_size = (tga.pixel_size/8);
@@ -621,7 +621,7 @@ Image * nv::ImageIO::loadPNG(Stream & s)
 	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
 	if (png_ptr == NULL) {
 	//	nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name );
-		return false;
+		return NULL;
 	}
 
 	// Allocate/initialize a memory block for the image information
@@ -629,14 +629,14 @@ Image * nv::ImageIO::loadPNG(Stream & s)
 	if (info_ptr == NULL) {
 		png_destroy_read_struct(_ptr, NULL, NULL);
 	//	nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name );
-		return false;
+		return NULL;
 	}
 
 	// Set up the error handling
 	if (setjmp(png_jmpbuf(png_ptr))) {
 		png_destroy_read_struct(_ptr, _ptr, NULL);
 	//	nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name );
-		return false;
+		return NULL;
 	}
 
 	// Set up the I/O functions.


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

2016-01-20 Thread Martin Michlmayr
Hi Lennart,

* Lennart Weller  [2016-01-20 15:49]:
> Could you also report this upstream[0]? 
> The upstream version and the current debian version are already diverging by 
> quite a bit
> and I don't want to add even more patches on top.
> 
> Have you tried building the experimental branch from [1] with gcc6? It's a 
> way more recent release
> but seems to break some functionality in 0ad.
> 
> [0] https://github.com/castano/nvidia-texture-tools

This builds fine.

> [1] http://anonscm.debian.org/cgit/collab-maint/nvidia-texture-tools.git

Can you remind me how to generate the orig tarball?

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



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

2016-01-20 Thread Lennart Weller
Hey Martin,

Could you also report this upstream[0]? 
The upstream version and the current debian version are already diverging by 
quite a bit
and I don't want to add even more patches on top.

Have you tried building the experimental branch from [1] with gcc6? It's a way 
more recent release
but seems to break some functionality in 0ad.

[0] https://github.com/castano/nvidia-texture-tools
[1] http://anonscm.debian.org/cgit/collab-maint/nvidia-texture-tools.git

January 20 2016 1:21 AM, "Martin Michlmayr"  wrote:
> Package: nvidia-texture-tools
> Version: 2.0.8-1+dfsg-8
> 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
> 
> ...
> 
>> [ 33%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp: In 
>> function
>> 'nv::FloatImage* nv::ImageIO::loadFloat(const char*)':
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:138:10:
>>  error: cannot
>> convert 'bool' to 'nv::FloatImage*' in return
>> return false;
>> ^
>> 
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp: In 
>> function 'nv::Image*
>> nv::ImageIO::loadTGA(nv::Stream&)':
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:236:12:
>>  error: cannot
>> convert 'bool' to 'nv::Image*' in return
>> return false;
>> ^
>> 
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:257:11:
>>  error: cannot
>> convert 'bool' to 'nv::Image*' in return
>> return false;
>> ^
>> 
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp: In 
>> function 'nv::Image*
>> nv::ImageIO::loadPNG(nv::Stream&)':
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:624:10:
>>  error: cannot
>> convert 'bool' to 'nv::Image*' in return
>> return false;
>> ^
>> 
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:632:10:
>>  error: cannot
>> convert 'bool' to 'nv::Image*' in return
>> return false;
>> ^
>> 
>> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:639:10:
>>  error: cannot
>> convert 'bool' to 'nv::Image*' in return
>> return false;
>> ^
>> 
>> src/nvimage/CMakeFiles/nvimage.dir/build.make:134: recipe for target
>> 'src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o' failed
> 
> --
> Martin Michlmayr
> Linux for HPE Helion, Hewlett Packard Enterprise



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

2016-01-20 Thread Lennart Weller

On 20.01.2016 18:30, Martin Michlmayr wrote

This builds fine.
Nice. So I either just have to add the patches for 2.0.8 or get 0ad to 
work with 2.1.0. I'll look into that in the next few days as time permits.

Can you remind me how to generate the orig tarball?
There are two source branches. upstream which is the original source 
imported from gcode/github and dfsg_clean which is the upstream branch minus
all the propriertary libraries he for some reason still has in the 
source. The HEAD on both is the 2.1.0 release. To export the orig 
tarball you use

gbp buildpackage -S or
gbp buildpackage -S --git-upstream-tag=upstream/2.1.0+git20150822+dfsg
Otherwise you can probably just switch to the branch and tar it right 
there excluding .git and have the same result.


Lennart



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

2016-01-20 Thread Martin Michlmayr
* Lennart Weller  [2016-01-20 23:14]:
> gbp buildpackage -S --git-upstream-tag=upstream/2.1.0+git20150822+dfsg

Ok, that also builds afaict.

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



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

2016-01-19 Thread Martin Michlmayr
Package: nvidia-texture-tools
Version: 2.0.8-1+dfsg-8
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
...
> [ 33%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp: In 
> function 'nv::FloatImage* nv::ImageIO::loadFloat(const char*)':
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:138:10:
>  error: cannot convert 'bool' to 'nv::FloatImage*' in return
>return false;
>   ^
> 
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp: In 
> function 'nv::Image* nv::ImageIO::loadTGA(nv::Stream&)':
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:236:12:
>  error: cannot convert 'bool' to 'nv::Image*' in return
>  return false;
> ^
> 
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:257:11:
>  error: cannot convert 'bool' to 'nv::Image*' in return
> return false;
>^
> 
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp: In 
> function 'nv::Image* nv::ImageIO::loadPNG(nv::Stream&)':
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:624:10:
>  error: cannot convert 'bool' to 'nv::Image*' in return
>return false;
>   ^
> 
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:632:10:
>  error: cannot convert 'bool' to 'nv::Image*' in return
>return false;
>   ^
> 
> /<>/nvidia-texture-tools-2.0.8-1+dfsg/src/nvimage/ImageIO.cpp:639:10:
>  error: cannot convert 'bool' to 'nv::Image*' in return
>return false;
>   ^
> 
> src/nvimage/CMakeFiles/nvimage.dir/build.make:134: recipe for target 
> 'src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o' failed

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