InsightSoftwareConsortium / ITKRemoteModuleBuildTestPackageAction

A composite GitHub Action to build, test, and package, ITK remote modules
Apache License 2.0
3 stars 6 forks source link

BUG: `build-macos-py` builds with outdated C++14 #66

Closed tbirdso closed 1 year ago

tbirdso commented 1 year ago

Expected behavior

ITK requires building with C++17 or later.

https://github.com/InsightSoftwareConsortium/ITK/blob/3454d857dc46e4333ad1178be8c186547fba87ef/CMake/ITKInitializeCXXStandard.cmake#L2-L4

Observed behavior

ITKElastix build observed to fail in build-macos-py due to building with C++14.

https://github.com/InsightSoftwareConsortium/ITKElastix/pull/234#issuecomment-1644164635

cd /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/Wrapping/Modules/Elastix && env SDKROOT=/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk MACOSX_DEPLOYMENT_TARGET=10.9 /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/Wrapping/Generators/CastXML/castxml/bin/castxml -o /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.xml --castxml-gccxml --castxml-start _wrapping_ --castxml-cc-gnu "(" /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 ")" -w -c @/Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/.castxml.inc /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.cxx
In file included from /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../ITK-3.11-macosx_x86_64/Wrapping/castxml_inputs/itkElastixRegistrationMethod.cxx:16:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Main/itkElastixRegistrationMethod.h:41:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Kernel/elxElastixMain.h:21:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Kernel/elxMainBase.h:23:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Kernel/elxElastixBase.h:33:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Configuration/elxConfiguration.h:25:
In file included from /Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Common/ParameterFileParser/itkParameterMapInterface.h:22:
/Users/runner/work/ITKElastix/ITKElastix/_skbuild/macosx-10.9-universal2-3.11/cmake-build/_deps/elx-src/Core/Install/elxConversion.h:92:24: error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'?

build-macos-py pipeline should be updated to build with -std=c++17.

tbirdso commented 1 year ago

Also observed in build-test-cxx (ubuntu) in ITKSplitComponents:

https://github.com/tbirdso/ITKSplitComponents/actions/runs/5645564369/job/15291583317

https://open.cdash.org/viewBuildError.php?buildid=8860614

test/itkSplitComponentsImageFilterTest.cxx:40:22: error: 'is_same_v' is not a member of 'std'; did you mean 'is_same'?

tbirdso commented 1 year ago

@thewtex I propose we investigate a resolution for this issue further as part of ITK v5.4.0 preparation.

thewtex commented 1 year ago

@tbirdso this is likely fixed with the v5.4rc01 builds where the C++ standard is 17 by default via ITK.

tbirdso commented 1 year ago

ITKElastix C++17 is now building with https://github.com/InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/tree/v5.4.0. Thanks for getting v5.4rc1 packages out @thewtex 👍