UCL / PETPVC

Partial Volume Correction in PET
Apache License 2.0
53 stars 14 forks source link

MacOS tests on Azure fail #64

Closed KrisThielemans closed 1 year ago

KrisThielemans commented 4 years ago

Errors like

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace
using ::signbit;

Also seen in many other places, including https://github.com/UCL/STIR/issues/531#issuecomment-667988045_ with hints it's a VTK bug

KrisThielemans commented 3 years ago

some people suggest to include <cmath> first, before anything else. e.g. https://developer.apple.com/forums/thread/110594?answerId=338792022#338792022

KrisThielemans commented 3 years ago

Note however that the Azure pipeline for OSX uses ITK 5.1 (see here, which will fail due to #55

KrisThielemans commented 3 years ago

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.

KrisThielemans commented 3 years ago

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))
KrisThielemans commented 1 year ago

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

KrisThielemans commented 1 year ago

There were 2 problems:

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.