InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.37k stars 660 forks source link

GCC 13.2 Missing Headers #4600

Closed hjmjohnson closed 2 months ago

hjmjohnson commented 2 months ago

Description

Test compiling ITK 5.2.0 on the upcomming Ubuntu 24.04 release with gcc 13.2 compiler resulted in build errors due to fixes in include file pollution common in previous compilers.

This issue is intended to document a work around to a problem that may be common to many developers attempting to use newer compilers.

The

#include <limits>
#include <cstdint>

header files are not explicitly listed (previous compilers had them implicitly included).

# build hack to get around missing include files

cat > /tmp/extra_includes << EOF
#include <limits>
#include <cstdint>
EOF

ccmake -DCMAKE_CXX_FLAGS="-include /tmp/extra_includes" .

Steps to Reproduce

Try to compile ITK 5.2.0 on Ubuntu 24.04 (or gcc 13.2) compiler.

Expected behavior

Should build

Actual behavior

Fails build

Versions

At least 5.2.0

Environment

Ubuntu 24.04 environment.

github-actions[bot] commented 2 months ago

Thank you for contributing an issue! 🙏

Welcome to the ITK community! 🤗👋☀️

We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜 Also, please check existing open issues and consider discussion on the ITK Discourse. 📖

This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it.

thewtex commented 2 months ago

@hjmjohnson this has been fixed in recent ITK, correct?

hjmjohnson commented 2 months ago

Yes. I'm getting a ton of warnings, but the compilation succeeded.