[MacPorts] #66978: ImageMagick headers conflict with LegacySupport? magick-type.h: error: 'isnan' was not declared in this scope; did you mean 'std::isnan'?

MacPorts noreply at macports.org
Wed Feb 22 06:53:50 UTC 2023


#66978: ImageMagick headers conflict with LegacySupport? magick-type.h: error:
'isnan' was not declared in this scope; did you mean 'std::isnan'?
--------------------------+-------------------------
 Reporter:  barracuda156  |      Owner:  ryandesign
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.8.1
 Keywords:                |       Port:  ImageMagick
--------------------------+-------------------------
 {{{
 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
 }}}

 I am not sure on which side is the error. I got this now trying to build
 `R-magick`, but apparently it merely passes `ImageMagic` headers. Issue
 with the package upstream: https://github.com/ropensci/magick/issues/369
 This is the same error which got `R-igraph` broken on some configs:
 https://github.com/igraph/rigraph/issues/669

 Any ideas what is going wrong and where?

-- 
Ticket URL: <https://trac.macports.org/ticket/66978>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list