Closed KrisThielemans closed 1 year ago
some people suggest to include <cmath>
first, before anything else. e.g. https://developer.apple.com/forums/thread/110594?answerId=338792022#338792022
Note however that the Azure pipeline for OSX uses ITK 5.1 (see here, which will fail due to #55
Clarification: errors occur on the azure pipeline where we use brew install itk
. There is no problem on the Travis builds, where we install ITK ourselves.
Hopefully it will disappear when brew
uses ITK 5.2.0.
Current errors (brew install
ITK 5.1) also include https://dev.azure.com/petpvc/petpvc/_build/results?buildId=26&view=logs&j=a5e52b91-c83f-5429-4a68-c246fc63a4f7&t=2dac33d1-b0ca-5feb-3c36-18b56319df50&l=766
/usr/local/include/ITK-5.1/itkMath.h:326:32: error: expected unqualified-id
if (std::signbit(x1) != std::signbit(x2))
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
( sizeof(x) == sizeof(float) ? __inline_signbitf((float)(x))
I've tried to run this in #84. Still a problem with ITK 5.2 and https://dev.azure.com/petpvc/petpvc/_build/results?buildId=52&view=logs&j=a5e52b91-c83f-5429-4a68-c246fc63a4f7&t=2dac33d1-b0ca-5feb-3c36-18b56319df50 and Xcode_13.2.1. sigh.
some people suggest to include
<cmath>
first, before anything else. e.g. https://developer.apple.com/forums/thread/110594?answerId=338792022#338792022
that didn't work. https://dev.azure.com/petpvc/petpvc/_build/results?buildId=53&view=logs&j=a5e52b91-c83f-5429-4a68-c246fc63a4f7&t=2dac33d1-b0ca-5feb-3c36-18b56319df50
There were 2 problems:
Qt5
from brew
. I tried to use brew --prefix
to resolve that but failed when using CMake@1
as I don't know how to pass-through variables between stages, see https://github.com/microsoft/azure-pipelines-tasks/issues/12848#issuecomment-13169699. In the end I gave up and hard-wired the location::signbit
etc when using the brew
ITK. I've now "fixed" this by building our own ITK.This 2 fixes are in 90a3150a7af4c6f686811387a294f62667ce9bbc.
Hopefully, someone will fix the ITK version of brew
at some point, but at least our CI is now fine.
Errors like
Also seen in many other places, including https://github.com/UCL/STIR/issues/531#issuecomment-667988045_ with hints it's a VTK bug