POV-Ray : Newsgroups : povray.programming : OpenEXR 3.x issues - call to arms : OpenEXR 3.x issues - call to arms Server Time
24 Apr 2024 18:24:49 EDT (-0400)
  OpenEXR 3.x issues - call to arms  
From: clipka
Date: 2 Jun 2021 17:46:09
Message: <60b7fc21$1@news.povray.org>
Hi everyone,

anyone trying to compile POV-Ray with a modern version of OpenEXR - i.e. 
3.0.0 or higher - will have noticed that we're having some snag there.

The reason behind this is that some time in the past, Industrial Light 
and Magic (who had kicked off the OpenEXR thingumajig) had transferred 
the whole shebang to the public, who picked up the ball and ran with it 
like crazy.

Now, in March this year, this transfer has left its mark to the 
structure of the project itself, leading to two major changes:

(1) The OpenEXR library, which used to be named `IlmImf` (for Intustrial 
Light and Magic Image Format), has now officially been renamed to `OpenEXR`.

(2) An accompanying library, providing low-level mathematical stuff, 
like a 16-bit floating-point data type, that used to go by the moniker 
`IlmBase`, has been renamed to `Imath`.

This breaks all our builds, because those are not the libraries we are 
looking for.

And someone needs to fix this.


I presume it's more a matter of diligence, that requires a bit of 
understanding how an Automake-based build process works, but other than 
that will hopefully not need deep insight into the bowels of POV-Ray 
itself. And it also needs someone who can test any fixes before checking 
them in - which I can't, because my Linux Fu is limited, and the Linux 
machine I have convenient access to doesn't have OpenEXR 3 installed.

What I *think* needs to be done, is the following:

* Fix the Unix build process to do the right kind of version checking 
and pulling-in of libraries (primarily relevant files: 
`unix/configure.ac` and `unix/config/ax_check_openexr.m4`). The test for 
the actual `IlmImf` library would have to be changed, to test for 
`OpenEXR` instead if the version number detected is 3.0 or higher; also 
in that case, a test for the `Imath` library would have to be performed, 
which we currently don't have because it was effectively implicit when 
OpenEXR was present.

* Fix whatever needs fixing to make sure our OpenEXR handling source 
file (in v3.8 that would be `source/base/image/openexr.cpp` includes 
whatever files need including. Maybe we need to include different files 
if OpenEXR 3.x is installed. Maybe we just need to somehow adjust the 
include paths. I'm not sure yet. I haven't dug that deep.

* Fix `source/base/povray.cpp` to pull in the proper version information 
header files for the two libraries; again, you may need to change them, 
or maybe you don't.

* (optional) While you're at it, you might also want to concoct a 
mechanism by which to decide (depending on version number) whom to 
credit as copyright holders, and what internet address to refer to. 
Maybe also pull version information from the libraries via function 
calls (as we do for other libs; but note the comment saying that such 
function is unavailable in older versions). And maybe split up the 
credit into two chunks, one for IlmImf/OpenEXR and the other for 
IlmBase/Imath, as the libs are now fully separate projects.

* IMPORTANT: In all you do, make sure that the whole smash pretty much 
behaves as before (except for maybe improvements to the copyright 
notice) unless OpenEXR 3.0.0 or higher is indeed installed.

* If you're familiar with Git, submit your changes as a pull request to 
the `master` branch in the repo.

The issues affect both v3.8 and v3.7, so you're not done yet:

* Do all of the above again for the `v3.7.0` branch, starting from 
scratch. Whatever you did to fix v3.8, the same approach should also 
work for v3.7, and the changes won't be much different. But the two 
versions have grown too far apart to try and do anything that involves 
merges. They'd bite you in the arse for trying. You figured out what 
needed to be done, so you can do it again.


There. Now for the $0.000.000 question:

Any takers?


I know I could do it myself, but I'd prefer to spare my energy (which is 
limited, as we've seen) and time for the work that still needs to be 
done in POV-Ray's deep, deep gory bowels, where I dare not send anyone 
else, lest they be devoured by the abominations that lurk there. You 
know, the parser. The thing that software developers tell their children 
bedtime stories about when they're refusing to go to sleep. The thing 
that goes "bump" in the night `#if` you don't put an `#end` to it in 
time. The thing that scares you shitless when you meet it at night in a 
dark alleyway...

I think Lovecraft must have had premonitions of the POV-Ray parser code...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.