2021-06-22 04:37 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001142Orfeo Toolbox (OTB)Generalpublic2016-03-04 10:17
Reportersebastic 
Assigned Togrizonnetm 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
Summary0001142: Fails to build with ITK 4.9.0 (itksys/FundamentalType.h: No such file or directory)
DescriptionOTB 5.2.0 & 5.2.1 fail to build with ITK 4.9.0 which no longer includes the itksys/FundamentalType.h header among others.

OTB now fails to build on Debian unstable:

[ 2%] Building CXX object Modules/Core/Common/src/CMakeFiles/OTBCommon.dir/otbConfigurationManager.cxx.o
cd /build/otb-5.2.1+dfsg/obj-x86_64-linux-gnu/Modules/Core/Common/src && /usr/bin/c++ -DOTBCommon_EXPORTS -I/build/otb-5.2.1+dfsg/Modules/ThirdParty/Boost/src -I/usr/include/gdal -I/build/otb-5.2.1+dfsg/Modules/ThirdParty/ITK/include -I/usr/include/ITK-4.9 -I/build/otb
-5.2.1+dfsg/obj-x86_64-linux-gnu/Modules/Core/Common -I/build/otb-5.2.1+dfsg/Modules/Core/Common/include -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Win
valid-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 -O3 -DNDEBUG -fPIC -o CMakeFiles/OTBCommon.dir/otbConfigurationM
anager.cxx.o -c /build/otb-5.2.1+dfsg/Modules/Core/Common/src/otbConfigurationManager.cxx
In file included from /build/otb-5.2.1+dfsg/Modules/Core/Common/src/otbConfigurationManager.cxx:18:0:
/build/otb-5.2.1+dfsg/Modules/Core/Common/include/otbConfigurationManager.h:21:36: fatal error: itksys/FundamentalType.h: No such file or directory
compilation terminated.
Modules/Core/Common/src/CMakeFiles/OTBCommon.dir/build.make:185: recipe for target 'Modules/Core/Common/src/CMakeFiles/OTBCommon.dir/otbConfigurationManager.cxx.o' failed
Steps To ReproduceBuild OTB 5.2.1 with ITK 4.9.0.
TagsNo tags attached.
Attached Files
  • patch file icon itk-4.8-4.9.patch (1,933 bytes) 2016-02-12 18:55 -
    Description: Support both ITK 4.8 and ITK 4.9.
    Author: Bas Couwenberg <sebastic@debian.org>
    Bug: https://bugs.orfeo-toolbox.org/view.php?id=1142
    
    --- a/Modules/Core/Common/include/otbConfigurationManager.h
    +++ b/Modules/Core/Common/include/otbConfigurationManager.h
    @@ -18,7 +18,11 @@
     #ifndef _otbConfigurationManager_h
     #define _otbConfigurationManager_h
     
    +#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
    +#include "itksys/FundamentalType.h"
    +#else
     #include "itk_kwiml.h"
    +#endif
     
     #include <string>
     #include <boost/cstdint.hpp>
    @@ -38,7 +42,11 @@ namespace otb
     class ConfigurationManager
     {
     public:
    +#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
    +  typedef ::itksysFundamentalType_UInt64 RAMValueType;
    +#else
       typedef KWIML_INT_uint64_t RAMValueType;
    +#endif
     
       /**
        * DEMDirectory is a directory were DEM tiles are stored. 
    --- a/Modules/Core/Streaming/include/otbPipelineMemoryPrintCalculator.h
    +++ b/Modules/Core/Streaming/include/otbPipelineMemoryPrintCalculator.h
    @@ -19,7 +19,11 @@
     #define __otbPipelineMemoryPrintCalculator_h
     
     #include "itkProcessObject.h"
    +#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
    +#include "itksys/FundamentalType.h"
    +#else
     #include "itk_kwiml.h"
    +#endif
     #include <set>
     
     namespace otb
    @@ -75,7 +79,11 @@ public:
       typedef ProcessObjectType::Pointer          ProcessObjectPointerType;
       typedef itk::DataObject                     DataObjectType;
       typedef DataObjectType::Pointer             DataObjectPointerType;
    +#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 8)
    +  typedef ::itksysFundamentalType_UInt64      MemoryPrintType;
    +#else
       typedef KWIML_INT_uint64_t                  MemoryPrintType;
    +#endif
       typedef std::set<const ProcessObjectType *> ProcessObjectPointerSetType;
     
       /** Run-time type information (and related methods). */
    
    patch file icon itk-4.8-4.9.patch (1,933 bytes) 2016-02-12 18:55 +

-Relationships
+Relationships

-Notes

~0003225

grizonnetm (administrator)

fixed in branch release-5.2 and develop:
https://git.orfeo-toolbox.org/otb.git/commit/c7b301d750c67f6e7b740ad5e085522a3c478ed9

https://git.orfeo-toolbox.org/otb.git/commit/9dbefc8d581fd0839116208ef7b1ccbcb6027a53

thanks a lot for the report. I can hardly understand how we miss that one on otb cdash...

~0003226

sebastic (reporter)

The ITK 4.9 packages in Debian are only available recently, but the packages aren't available on the i386 architecture yet due to build failures (see https://buildd.debian.org/status/package.php?p=insighttoolkit4).

The fix for this issue should be made conditional, because itk_kwiml.h is only available in ITK 4.9, for 4.8 itksys/FundamentalType.h should still be used.

~0003227

sebastic (reporter)

The changes in itk-4.8-4.9.patch make the changes for 4.9 conditional, I've added it to the otb Debian package to make it build successfully with both ITK 4.9 on amd64 and 4.8 on i386.

~0003228

grizonnetm (administrator)

you're right it has to be conditional...I made the patch too quickly last Friday. I was thinking that itk would have maintain backward compat for both versions (kwsys and kwiml).

I've applied, adapted (add #include "itkVersion.h") and pushed you're patch to both release-5.2 and develop branches:

https://git.orfeo-toolbox.org/otb.git/commit/e0884b46344bd3a25e12c55ade5fc8655d3b7153

Thanks again!

~0003229

sebastic (reporter)

Thanks for the merge, with that this issue should be resolved now.

~0003237

grizonnetm (administrator)

fix in 5.2 and develop branch
+Notes

-Issue History
Date Modified Username Field Change
2016-02-11 23:05 sebastic New Issue
2016-02-12 08:58 grizonnetm Sticky Issue No => Yes
2016-02-12 08:58 grizonnetm Sticky Issue Yes => No
2016-02-12 08:58 grizonnetm Assigned To => grizonnetm
2016-02-12 08:58 grizonnetm Priority normal => high
2016-02-12 08:58 grizonnetm Status new => confirmed
2016-02-12 09:45 grizonnetm Note Added: 0003225
2016-02-12 09:45 grizonnetm Status confirmed => closed
2016-02-12 09:45 grizonnetm Resolution open => fixed
2016-02-12 17:25 sebastic Note Added: 0003226
2016-02-12 17:25 sebastic Status closed => feedback
2016-02-12 17:25 sebastic Resolution fixed => reopened
2016-02-12 18:55 sebastic File Added: itk-4.8-4.9.patch
2016-02-12 18:56 sebastic Note Added: 0003227
2016-02-12 18:56 sebastic Status feedback => assigned
2016-02-15 09:54 grizonnetm Note Added: 0003228
2016-02-15 18:47 sebastic Note Added: 0003229
2016-02-16 08:43 grizonnetm Status assigned => resolved
2016-03-04 10:17 grizonnetm Note Added: 0003237
2016-03-04 10:17 grizonnetm Status resolved => closed
2016-03-04 10:17 grizonnetm Resolution reopened => fixed
+Issue History