The Persistence of Vision Raytracer (POV-Ray).
This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.
Opened by Thomas Klausner - 2010-06-20
Last edited by Christoph Lipka - 2011-02-07
FS#144 - povray compatibility issue with png-1.4
source/png_pov.cpp included in povray-3.6.1 contains calls to an internal function of libpng (png_write_finish_row) which was removed from the public interface quite a while ago, so linking fails.
Also, in the 1.4 releases of libpng, the info_struct “trans” member was renamed to trans_alpha. This causes a compilation error in the same file.
A suggestion for the solution:
a) remove the png_write_finish_row prototype and function call
b) add something like:
#if PNG_LIBPNG_VER < 10400
#define trans_alpha trans
#endif
and change
cmap[index].Transmit = 255 - r_info_ptr→trans[index];
to
cmap[index].Transmit = 255 - r_info_ptr→trans_alpha[index];
(two occurrences).
prepared 3.7 code for libpng-1.4-compatibility with change #5031 (needs testing!), using PNG_LIBPNG_VER-dependent code. png_write_finish_row had been eliminated from 3.7 branch earlier already.
N.B.: Unix configure script still needs to be modified to accept libpng 1.4.
I'll do this if I'm not stepping on toes. The libpng upgrade is something I was hoping for, so I'll add my $0.02 worth. I'll see if I can build against the head version as well. Did you notice libpng.org they just published 1.4.3 a couple of days ago. Is that the version I should set in ~smp/unix/configure.ac?
I was able to successfully make the change to configure.ac. To test my changes I DID NOT upgrade libpng on my system, and indeed the configure phase of the build failed with appropriate messages. I then upgraded libpng and the configure phase detected the upgrade appeared to be happy. However during the compile phase I'm getting numerous warnings and eventually an error that halted the compile:
closer examination that include file is INDEED pointing to the upgraded libpng via a symbolic link
i think the kicker is:
I looked and didn't find a way to attach a file with a more complete transcript of the errors, but have that available and will email it to you if you'd like.
Jim:
The error you're seeing should be fixed by code like the one I proposed above.
I'm sorry but I don't know how to get access to the latest source code; otherwise I could prepare a possible patch.
Thomas,
Thanks for the follow up ... I have access to source, and my read on Christoph's post was that he'd checked in a fix, but needed someone to do the unix configure.ac changes. I downloaded his fix to further test the changes I made to configure.ac before checking that file back in to the code repository. The errors and aborted compile cut short my testing.
I've submitted a change to ~smp/unix/configure.ac (change #5039) ... with a note to defer pending the resolution of the final outcome of this fix.
Gee, Jim, hit me on the head for this one - and try again with change #5041.
Minor joy ... the compile didn't abort at the same place, however I'm still getting a whack of deprecated warnings:
image/png.cpp: In function ‘bool pov_base::Png::ReadPNGUpdateInfo(png_struct*, png_info*)’:
image/png.cpp:338: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/local/include/png.h:1096)
image/png.cpp: In function ‘bool pov_base::Png::ReadPNGImage(png_struct*, png_byte**)’
image/png.cpp:349: warning: ‘png_struct_def::jmpbuf’ is deprecated (declared at /usr/local/include/png.h:1096)
image/png.cpp: In function ‘pov_base::Image* pov_base::Png::Read(pov_base::IStream*, const pov_base::Image::ReadOptions&)’:
image/png.cpp:419: warning: ‘png_info_struct::valid’ is deprecated (declared at /usr/local/include/png.h:641)
this last one repeats from lines 419 - 1016 warning about gamma, width, height, color_type, num_palette, ... others. I can email you the error log if that's helpful. As I mentioned the compile didn't about in the same place this time ...
disp_sdl.cpp: In member function ‘void pov_frontend::UnixSDLDisplay::SetCaption(bool)’:
disp_sdl.cpp:188: error: ‘format’ was not declared in this scope
disp_sdl.cpp:188: error: expected ‘;’ before ‘f’
disp_sdl.cpp:190: error: ‘f’ was not declared in this scope
disp_sdl.cpp:194: error: ‘f’ was not declared in this scope
this doesn't seem related to this (#5041) fix, but from #4990 (perhaps not), as I STILL had the copy of disp_sdl.cpp laying around that I copied & pasted from your post in NG when I first brought up this prob. diff with than and the version you checked in was spot on as expected. Unless you know of some upstream fix that was submitted that could possibly be the culprit ... I will need to back-track through my setup again (was late last night, so I think one more look at my setup would be a good idea) ... standby on that one I guess. Email me direct if this is getting too verbose.
This error is apparently related to change #5009; we'll probably need to replace "format" with "boost::format". I have no idea why this wasn't fixed at least with change #5011.
Change #5043 should eliminate most (if not all) deprecation warnings. Jim, can you please test?
Still some fallout ... I've emailed you the compile transcript ... ha-ha maybe 3rd time will be the charm as they say!
This issue appears to be laid to rest with changes #5041, #5043, #5043 (libpng), and #5045 (unix configure.ac)
oops #5046 (libpng)
See also
FS#192for compatibility issues between POV-Ray 3.6 and libpng 1.5