Hi, I hope somebody might be able to give me some advice.

I'm the maintainer of OpenImageIO, and recently I started getting some failures 
after changing our CI to test against the new libtiff v4.7.1. 

Specifically, my call to TIFFReadRGBAImageOriented is failing with an error 
message "Bogus JPEGTables field" when reading the libtiff-images image 
"smallliz.tif". It's really odd, it's only on a certain test job (i.e. 
combination of compilers and dependency versions), and only on the CI machine 
(I can't reproduce locally), but it consistently fails on that CI job, it's not 
non-deterministic at all. I can't easily characterize why this should be 
different.

I spent a couple days bisecting the changes between v4.7.0 (which doesn't ever 
have these failures) and v4.7.1, and was able to narrow it down specifically to 
the change of commit 2b6b7018 (corresponding to MR 
https://gitlab.com/libtiff/libtiff/-/merge_requests/678). This was VERY 
confusing, because the prior commit actually changed something in 
TIFFReadRGBAImageOriented, but that appears to be a red herring.

MR 678 is a tiny cmake change that is merely adding

    if(POLICY CMP0074)
        # Allow find_package() to use the ZLIB_ROOT variable, if available.
        cmake_policy(SET CMP0074 NEW)
    endif()

See https://cmake.org/cmake/help/latest/policy/CMP0074.html for an explanation 
-- it has to do with how other packages are searched for.

I suppose this could end up finding a different zlib (or some other mutual 
dependency?) that's on the system than it would without this policy. But I'm at 
a loss to explain how that would lead to this particular failure and error 
message, and no other change or failures. 

Maybe somebody sees this and it rings a bell or has some insight I've missed?

Now that I know it's somehow related to finding another dependency (maybe 
zlib?), I can probably lock things down better on that CI machine to avoid the 
problem, but I have this uneasy feeling that a user on a different machine 
building from source could encounter the problem and not understand it.

--
Larry Gritz
[email protected]





_______________________________________________
Tiff mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/tiff

Reply via email to