magick-type.h: error: 'isnan' was not declared in this scope; did you mean 'std::isnan'?
barracuda156 opened this issue · 2 comments
In file included from /opt/local/include/ImageMagick-6/magick/MagickCore.h:78,
from /opt/local/include/ImageMagick-6/Magick++/Include.h:45,
from /opt/local/include/ImageMagick-6/Magick++.h:10,
from magick_types.h:3,
from RcppExports.cpp:4:
/opt/local/include/ImageMagick-6/magick/quantum.h: In function 'MagickCore::Quantum MagickCore::ClampToQuantum(MagickRealType)':
/opt/local/include/ImageMagick-6/magick/magick-type.h:220:20: error: 'isnan' was not declared in this scope; did you mean 'std::isnan'?
220 | # define IsNaN(a) isnan(a)
| ^~~~~
/opt/local/include/ImageMagick-6/magick/magick-type.h:220:20: note: in definition of macro 'IsNaN'
220 | # define IsNaN(a) isnan(a)
| ^~~~~
In file included from /opt/local/include/LegacySupport/cmath:54,
from /opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100,
from /opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62,
from /opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30,
from /opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27,
from magick_types.h:2:
/opt/local/include/gcc12/c++/cmath:632:5: note: 'std::isnan' declared here
632 | isnan(_Tp __x)
| ^~~~~
make: *** [RcppExports.o] Error 1
See also: igraph/rigraph#669
Can you please stop opening issues without context? How do you expect me to know what the problem is from the issue you post above? The warning does not even originate from this package, but from your version of imagemagick that is seemingly incompatible with your local toolchain.
I know from your other topics the problem is actually that you are using a 13 year obsolete OS and hardware so you should probably mention that.
@jeroen I thought issues exist to report issues :)
If the code does not work in less-than-trivial cases, perhaps it can be improved to be more robust. If you only test a bleeding edge OS with your favorite compiler, result will work great – on your personal setup. Strange that this has to be even explained.
Both GCC and R are the latest releases, ImageMagick – okay, I have 6.9.11 vs current 6.9.12. There is nothing PowerPC-specific in this story.