Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Fix older gcc build error including "cstddef" for "ptrdiff_t" #3472

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Jun 23, 2022

This commit fixes a regression likely introduced in c173dfd (STYLE: Remove std:: prefix from types that work without it) to support building ITK wheels using manylinux_2_24 providing gcc 6.3.

It fixes build error like the following:

  In file included from /work/ITK-source/ITK/Modules/Core/Common/include/itkImageRegion.h:33:0,
                   from /work/ITK-source/ITK/Modules/Core/Common/include/itkMultiThreaderBase.h:35,
                   from /work/ITK-source/ITK/Modules/Core/Common/src/itkTotalProgressReporter.cxx:19:
  /work/ITK-source/ITK/Modules/Core/Common/include/itkSize.h:242:27: error: ‘ptrdiff_t’ does not name a type
     using difference_type = ptrdiff_t;
                             ^~~~~~~~~

cc: @Leengit

PR Checklist

@github-actions github-actions bot added area:Core Issues affecting the Core module area:IO Issues affecting the IO module type:Compiler Compiler support or related warnings labels Jun 23, 2022
@jcfr jcfr added the action:ApplyClangFormat Add this label to a pull request to apply `clang-format` to the branch label Jun 23, 2022
This commit fixes a regression likely introduced in c173dfd (STYLE: Remove
`std::` prefix from types that work without it) to support building ITK
wheels using manylinux_2_24 providing gcc 6.3.

It fixes build error like the following:

  In file included from /work/ITK-source/ITK/Modules/Core/Common/include/itkImageRegion.h:33:0,
                   from /work/ITK-source/ITK/Modules/Core/Common/include/itkMultiThreaderBase.h:35,
                   from /work/ITK-source/ITK/Modules/Core/Common/src/itkTotalProgressReporter.cxx:19:
  /work/ITK-source/ITK/Modules/Core/Common/include/itkSize.h:242:27: error: ‘ptrdiff_t’ does not name a type
     using difference_type = ptrdiff_t;
                             ^~~~~~~~~
@thewtex thewtex force-pushed the fix-older-gcc-adding-missing-include-for-ptrdiff_t branch from 8ca6e8d to 0563258 Compare June 23, 2022 16:58
@thewtex
Copy link
Member

thewtex commented Jun 23, 2022

Addressed clang-format issues locally (the applyClangFormat label / action has permissions issue).

@thewtex
Copy link
Member

thewtex commented Jun 23, 2022

👍 thanks jcfr 🙏

@jcfr
Copy link
Contributor Author

jcfr commented Jun 23, 2022

Thanks @thewtex for the follow up 💯

@thewtex
Copy link
Member

thewtex commented Jun 24, 2022

\azp run ITK.macOS

@thewtex
Copy link
Member

thewtex commented Jun 24, 2022

/azp run ITK.macOS

@thewtex thewtex merged commit a549eb8 into InsightSoftwareConsortium:master Jun 24, 2022
@jcfr jcfr deleted the fix-older-gcc-adding-missing-include-for-ptrdiff_t branch June 24, 2022 17:02
@jcfr
Copy link
Contributor Author

jcfr commented Jun 24, 2022

🚀 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action:ApplyClangFormat Add this label to a pull request to apply `clang-format` to the branch area:Core Issues affecting the Core module area:IO Issues affecting the IO module type:Compiler Compiler support or related warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants