ITK
ITK copied to clipboard
fatal error: 'typeinfo' file not found
Description
ITK includes typeinfo in itkMacro.h, which is a C++ header file, but compiles part of its code with a C compiler. This leads to the following error:
#include
Steps to Reproduce
Use CentOS Compile ITK
Expected behavior
No error, even when LC_ALL is not set as it is the case for CentOS
Actual behavior
This error only occurs on CentOS 7.x.
Reproducibility
100% on CentOS
Versions
ITK 5
Environment
CentOS
Additional Information
Work-Around: It can be avoided by setting LC_ALL=C before building.
Which part is compiled with a C compiler? All of ITK should use C++ for the compiled parts that depend upon itkMacro.h.
Hans
This issue seems to be a problem for some already before as I found the workaround here:
https://insightsoftwareconsortium.atlassian.net/browse/ITK-3538?focusedCommentId=27765&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-27765
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
Perhaps we should check for locale environmental variables on Linux and warn if not are set? Or ...
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
Seeing that with 4.13.1 but not with 4.13.0
Verbose make output:
cd /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/easybuild_obj/Wrapping/Modules/ITKFiniteDifference && ../../Generators/CastXML/castxml/bin/castxml -o /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.
14/easybuild_obj/Wrapping/itkFiniteDifferenceImageFilter.xml --castxml-gccxml --castxml-start _wrapping_ --castxml-cc-gnu "(" /sw/installed/GCCcore/6.4.0/bin/g++ -O3 -march=native -fno-math-errno -fPIC -DOMPI
_SKIP_MPICXX -Wall -Wno-long-double -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-
overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -Wstrict-null-sentinel ")" -w -c @/dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/easybuild_obj/Wrapping/ITKFiniteDifference.castxml.in
c /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/easybuild_obj/Wrapping/itkFiniteDifferenceImageFilter.cxx
In file included from /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/easybuild_obj/Wrapping/itkFiniteDifferenceImageFilter.cxx:1:
In file included from /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/ITK-4.13.1/Modules/Core/Common/include/itkCommand.h:21:
In file included from /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/ITK-4.13.1/Modules/Core/Common/include/itkObject.h:31:
In file included from /dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/ITK-4.13.1/Modules/Core/Common/include/itkLightObject.h:21:
/dev/shm/ebbuild/ITK/4.13.1/foss-2018a-Python-2.7.14/ITK-4.13.1/Modules/Core/Common/include/itkMacro.h:45:10: fatal error: 'typeinfo' file not found
#include <typeinfo>
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
Any news?