Opened 10 years ago

Closed 2 years ago

#43463 closed defect (fixed)

p5-tk: nonfunctional bindings with libpng

Reported by: mojca (Mojca Miklavec) Owned by: chrstphrchvz (Christopher Chavez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: p5-tk

Description

Perl/Tk is not displaying PNG images as expected. I always wondered where the problem was and now I figured out that during installation of p5-tk the following errors/warnings are being thrown:

Writing MYMETA.yml and MYMETA.json
Test Compile/Run config/has_png.c
Using system's -lpng
Finding dependencies for PNG.xs
Finding dependencies for imgPNG.c
Invalid term: -32768 && INT_MAX == 32767 at /path/to/p5.16-tk/work/Tk-804.032/Tk/MakeDepend.pm line 55, </opt/local/include/libpng16/pngconf.h> line 508.
trailing:  -32768 && INT_MAX == 32767 at /path/to/p5.16-tk/work/Tk-804.032/Tk/MakeDepend.pm line 104, </opt/local/include/libpng16/pngconf.h> line 508.
ignore 'error "libpng requires a signed 16 bit type"'
ignore 'error "libpng requires an unsigned 16 bit type"'
Invalid term: -2147483646 && INT_MAX > 2147483646 at /path/to/p5.16-tk/work/Tk-804.032/Tk/MakeDepend.pm line 55, </opt/local/include/libpng16/pngconf.h> line 524.
trailing:  -2147483646 && INT_MAX > 2147483646 at /path/to/p5.16-tk/work/Tk-804.032/Tk/MakeDepend.pm line 104, </opt/local/include/libpng16/pngconf.h> line 524.
Invalid term: -2147483646 && LONG_MAX > 2147483646 at /path/to/p5.16-tk/work/Tk-804.032/Tk/MakeDepend.pm line 55, </opt/local/include/libpng16/pngconf.h> line 526.
trailing:  -2147483646 && LONG_MAX > 2147483646 at /path/to/p5.16-tk/work/Tk-804.032/Tk/MakeDepend.pm line 104, </opt/local/include/libpng16/pngconf.h> line 526.
ignore 'error "libpng requires a signed 32 bit (or more) type"'
ignore 'error "libpng requires an unsigned 32 bit (or more) type"'
Writing Makefile for Tk::PNG
Writing MYMETA.yml and MYMETA.json

Attachments (1)

Screen Shot 2018-11-09 at 3.51.19 AM.png (105.4 KB) - added by chrstphrchvz (Christopher Chavez) 5 years ago.
screenshot of photo.t (PNG results highlighted)

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I see that too, but the p5-tk portfile isn't doing anything special, so this must be a defect in the p5-tk software; you should report the problem to its developers.

comment:2 Changed 10 years ago by mojca (Mojca Miklavec)

Yes, that's an upstream bug, but there would be higher chances to fix it if we could come up with some basic diagnosis and a simple patch. If the main developer works on linux, the bug might remain open forever ;)

Here are the bug reports: https://rt.cpan.org/Public/Dist/Display.html?Name=Tk

Last edited 10 years ago by mojca (Mojca Miklavec) (previous) (diff)

Changed 5 years ago by chrstphrchvz (Christopher Chavez)

screenshot of photo.t (PNG results highlighted)

comment:3 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Possibly related upstream ticket (closed before this ticket was opened): https://rt.cpan.org/Ticket/Display.html?id=87016

I can reproduce the errors/warnings above; to me that output suggests there is a bug in Tk::MakeDepend preventing it from parsing pngconf.h (from libpng).

So far I've only tried displaying PNGs by running the t/photo.t test, and some of the PNG results seem brightened/more white than expected (see screenshot below). But this occurs on Linux and Windows as well.

https://trac.macports.org/raw-attachment/ticket/43463/Screen%20Shot%202018-11-09%20at%203.51.19%20AM.png

comment:4 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:5 in reply to:  3 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Possibly related upstream ticket (closed before this ticket was opened): https://rt.cpan.org/Ticket/Display.html?id=87016

I can reproduce the errors/warnings above; to me that output suggests there is a bug in Tk::MakeDepend preventing it from parsing pngconf.h (from libpng).

I've opened a ticket upstream specifically regarding that output: https://rt.cpan.org/Ticket/Display.html?id=127612

comment:6 Changed 5 years ago by mf2k (Frank Schima)

Cc: chrstphrchvz removed
Owner: changed from macports-tickets@… to chrstphrchvz
Status: newassigned

comment:7 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

I finally opened an upstream ticket for the issue I observed in the demo: https://rt.cpan.org/Ticket/Display.html?id=129472. In that specific example, the problem appears to be in the conversion to PNG rather than the displaying of the finished PNG.

I think the scope of this ticket is has unintentionally become too broad; I'm not sure if I understood what the original issue is or if it's addressed already. The original issue I would think is "Perl/Tk is not displaying PNG images as expected", but what program/example was this observed in, i.e. how can it be reproduced? (Admittedly I have not tried very hard finding another PNG example program nor recreating one on my own.) But the MakeDepend.pm errors/warnings during installation and what I observe in the screenshot of one of the tests might both be separate issues.

comment:8 Changed 5 years ago by mojca (Mojca Miklavec)

I wanted to say that you can try to fetch and extract http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz and run

./install-tl --gui perltk

and don't see the image. But then I ran this now and apparently something must have been fixed in the meantime since the time when I opened this ticket, as I see the image now (10.13, perl 5.28). On 10.7 and whatever perl version I had installed at that time I did not get the image displayed at all.

Last edited 5 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:9 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: assignedclosed

In aa2fc72934a02d30b56c74f9296456278717fbd9/macports-ports (master):

p5-tk: fix for bad PNG output

Closes: #43463

Note: See TracTickets for help on using tickets.