Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exrmetrics: compilation error #1889

Open
0-wiz-0 opened this issue Oct 19, 2024 · 2 comments
Open

exrmetrics: compilation error #1889

0-wiz-0 opened this issue Oct 19, 2024 · 2 comments
Labels
Bug A bug in the source code

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Oct 19, 2024

While updating the openexr package in pkgsrc, I noticed the following compilation error on NetBSD-10.99.12/amd64 with gcc 12.4.0:

/scratch/graphics/openexr/work/openexr-3.3.0/src/bin/exrmetrics/exrmetrics.cpp: In function 'void exrmetrics(const char*, const char*, int, Imf_3_3::Compression, float, int)':
/scratch/graphics/openexr/work/openexr-3.3.0/src/bin/exrmetrics/exrmetrics.cpp:486:10: error: 'isinf' was not declared in this scope; did you mean 'std::isinf'?
  486 |     if (!isinf (level) && level >= -1)
      |          ^~~~~
      |          std::isinf
In file included from /usr/pkg/include/Imath/ImathMath.h:16,
                 from /usr/pkg/include/Imath/ImathVec.h:17,
                 from /usr/pkg/include/Imath/ImathBox.h:16,
                 from /scratch/graphics/openexr/work/openexr-3.3.0/src/lib/OpenEXR/ImfFrameBuffer.h:21,
                 from /scratch/graphics/openexr/work/openexr-3.3.0/src/lib/OpenEXR/ImfDeepFrameBuffer.h:11,
                 from /scratch/graphics/openexr/work/openexr-3.3.0/src/bin/exrmetrics/exrmetrics.cpp:10:
/usr/include/g++/cmath:605:5: note: 'std::isinf' declared here
  605 |     isinf(_Tp __x)
      |     ^~~~~

Following the compiler's suggestion fixes the build:

--- src/bin/exrmetrics/exrmetrics.cpp.orig      2024-09-26 23:34:32.000000000 +0000
+++ src/bin/exrmetrics/exrmetrics.cpp
@@ -482,7 +482,7 @@ exrmetrics (
     }
     else { compression = outHeader.compression (); }

-    if (!isinf (level) && level >= -1)
+    if (!std::isinf (level) && level >= -1)
     {
         switch (outHeader.compression ())
         {
@meshula meshula added the Bug A bug in the source code label Oct 24, 2024
@meshula
Copy link
Contributor

meshula commented Oct 24, 2024

fix lgtm, thanks; do you want to submit or PR, or simply have us apply it?

@0-wiz-0
Copy link
Author

0-wiz-0 commented Oct 24, 2024

I've made a patch but then noticed that I have to sign a contribution document, which is quite overkill for such an easy patch - so please just commit it yourself.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the source code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants