Hi,
On Wed, Jan 20, 2016 at 07:36:45AM +0100, Tobias Frost wrote:
> > > > ++++ b/sources/png.c
> > > > +@@ -5,6 +5,7 @@
> > > > + #include <stdio.h>
> > > > + #include <stdlib.h>
> > > > + #include "to_png.h"
> > > > ++#include <zlib.h>
> > > 
> > > This fixes a different problem, doesn't it?
> >
> > Is this really needed?
> > In png.h I see this:
> > 
> > #ifndef PNG_VERSION_INFO_ONLY
> > /* Include the compression library's header */
> > #include "zlib.h"
> > #endif
> > 
> > It seems to build without this. I also wonder if we need zlib at all
> since I
> > get this warning during the build:
> > 
> > dpkg-shlibdeps: warning: package could avoid a useless dependency if
> debian/hp2xx/usr/bin/hp2xx was not linked against libz.so.1 (it uses
> none of the library's symbols)
> 
> This will FTBFS with libpng 1.6; as it no longer includes zlib.h (along
> with others)

I have built this in an unstable chroot, libpng12-0 was installed. Where is
libpng 1.6 and why don't I get this package when I build this?
 
> You can spot it here, that it causes errors:
>  http://libpng.sviech.de/hp2xx.build

So you are building with non official packages?

Get:1 http://libpng.sviech.de/libpng16 sid/main amd64 libpng16-16 amd64 
1.6.19-1.1~libpng16 [274 kB]
Get:2 http://libpng.sviech.de/libpng16 sid/main amd64 libpng16-dev amd64 
1.6.19-1.1~libpng16 [352 kB]

I that case I don't think this is a release critcal bug, yet. As soon as
libpng16 is available to regular developers I am happy to take your patch.
If I understand this correctly your NMU needs another biNMU before png1.6 is
used. Wouldn't it be better to have regular uploads so we can also mention
the transition in the changelog?

> Png.c:54:37: error: 'Z_BEST_COMPRESSION' undeclared (first use in this
> function)
>   png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
> 
> The Linkerflag "as-needed" would make the shlibdeps warning go away, fo
> rsure. 
> (However, an include moved to an different file alone does not trigger
> a linker action, so I suspect another reason here.)
> 
> 
> >  
> > > > + #include <png.h>
> > > > + 
> > > > + #define PDNCOL 256
> > > > +@@ -36,7 +37,7 @@
> > > > +       }
> > > > + 
> > > > +       /* set up error handlimg for libpng */
> > > > +-      if (setjmp(png_ptr->jmpbuf)) {
> > > > ++      if (setjmp(png_jmpbuf(png_ptr))) {
> > > > +               png_destroy_write_struct(&png_ptr, &info_ptr);
> > > > +               return;
> > > > +       }
> > 
> > upstream has a slightly different solution for this in the alpha
> version:
> > 
> > -       if (setjmp(png_ptr->jmpbuf)) {
> > +       jmp_context = (jmp_buf*) png_get_error_ptr(png_ptr);
> > +       if (jmp_context) {
> >                 png_destroy_write_struct(&png_ptr, &info_ptr);
> > und entsprechend weiter oben:
> >         png_bytep *row_pointers;
> > +       jmp_buf* jmp_context;
> > 
> > 
> 
> the png_jmpbuf is the getter for png_ptr->jmpbuf; therefore the above
> might need other changes too. (I did not check; this change would be
> too risky for an NMU). 

So you agree to Martin's solution also? I should probably upload the alpha
version, at least to experimental, which already includes all of this.

Christian

Reply via email to