ITK icon indicating copy to clipboard operation
ITK copied to clipboard

fatal error: 'typeinfo' file not found

Open jhgoebbert opened this issue 4 years ago • 8 comments

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 <..>Modules/Core/Common/include/itkMacro.h:45:10: fatal error: 'typeinfo' file not found

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.

jhgoebbert avatar Mar 12 '20 15:03 jhgoebbert

Which part is compiled with a C compiler? All of ITK should use C++ for the compiled parts that depend upon itkMacro.h.

Hans

hjmjohnson avatar Mar 12 '20 16:03 hjmjohnson

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

jhgoebbert avatar Mar 12 '20 17:03 jhgoebbert

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Jul 11 '20 01:07 stale[bot]

Perhaps we should check for locale environmental variables on Linux and warn if not are set? Or ...

thewtex avatar Jul 13 '20 18:07 thewtex

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Nov 14 '20 04:11 stale[bot]

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>

Flamefire avatar Aug 06 '21 10:08 Flamefire

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 11:04 stale[bot]

Any news?

Flamefire avatar Apr 17 '22 07:04 Flamefire