AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.76k stars 435 forks source link

Version string calculation create octal numbers. Probably affected all external dependencies that use same cmake routine [minizip-ng] #1818

Open ssh4net opened 1 year ago

ssh4net commented 1 year ago

I guess minizip-ng support was added before minizip-ng become 3.0.8 and compilation had no issues. Now when MZ is 3.0.8 compiling give an error.

/* MZ_VERSION */
#define MZ_VERSION                      ("3.0.8")
#define MZ_VERSION_BUILD                (030008)

#if MZ_VERSION_BUILD >= 040000

Zero on start treat octal number and 8 is not the digit that can be in such numbers

remia commented 1 year ago

Thanks for logging the issue @ssh4net, I guess we have to stop relying on MZ_VERSION_BUILD if we want to fix that. Might be good to log an issue on minizip-ng directly, I found this https://github.com/zlib-ng/minizip-ng/issues/719 which would have been helpful but seem like it was rejected.

opoplawski commented 6 months ago

And now we have:

#define MZ_VERSION                      ("3.0.10")
#define MZ_VERSION_BUILD                (03000a)

and:

/builddir/build/BUILD/OpenColorIO-2.3.2/src/OpenColorIO/OCIOZArchive.cpp:229:5: error: user-defined literal in preprocessor expression
  229 | #if MZ_VERSION_BUILD >= 040000
      |     ^~~~~~~~~~~~~~~~

Yeesh.