-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Compilation fails with GCC 8.4. #3643
Comments
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. |
@maxaehle Thanks, that's a very helpful suggestion, Max! The "{ nullptr }" initializer isn't really necessary for |
ITK now requires at least C++14. Does the compile error also occur when you do |
Thanks again Max. Just reproduced at https://godbolt.org/z/zM8PM5eTe even with GCC 9.1:
Output:
I'll prepare a pull request, probably just having your suggested workaround. |
Worked around a GCC bug which produced the following error: > unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type The issue InsightSoftwareConsortium#3643 "Compilation fails with GCC 8.4." was reported by Max Aehle. The GCC bug appears to be fixed with GCC 9.2. The workaround (removing "`{ nullptr }`") was also suggested by Max Aehle.
Worked around a GCC bug which produced the following error: > unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type The issue #3643 "Compilation fails with GCC 8.4." was reported by Max Aehle. The GCC bug appears to be fixed with GCC 9.2. The workaround (removing "`{ nullptr }`") was also suggested by Max Aehle.
Description
Compilation fails.
Steps to Reproduce
Clone ITK into
ITK/src
, cd intoITK/bin
andExpected behavior
Successful compilation.
Actual behavior
Compilation aborts with error message like this one:
Reproducibility
The above error happens consistently in the environment described below.
Versions
Current master branch, commit 171fb2b.
Environment
Linux, CMake 3.20.2, GCC 8.4.0.
(You can reproduce a similar environment with GCC 8.5.0, which also exhibits this problem, by building a Singularity container with this definition file: singularity.def.txt.)
Additional Information
The compilation error can be fixed by removing the initializer "
{ nullptr }
" ofObject::m_SubjectImplementation
. So maybe this problem is related to #3620.With GCC 9.4 the problem does not come up.
The text was updated successfully, but these errors were encountered: