Skip to content

OTB does not compile with GCC 8.1

Description

See pc-christophe dashboard submission:

https://dash.orfeo-toolbox.org/viewBuildError.php?buildid=331676

Error in return value (std::vector vs std::vector *):

In file included from /home/otbtesting/build/orfeo/trunk/OTB-Nightly-Coverage/Debug/Modules/Learning/LearningBase/test/OTBLearningBaseHeaderTest1.cxx:28: /home/otbtesting/sources/orfeo/trunk/OTB-Nightly/Modules/Learning/LearningBase/include/otbSEMClassifier.hxx: In member function 'otb::SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType* otb::SEMClassifier<TInputImage, TOutputImage>::GetInitialProportions()': /home/otbtesting/sources/orfeo/trunk/OTB-Nightly/Modules/Learning/LearningBase/include/otbSEMClassifier.hxx:107:10: error: cannot convert 'otb::SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType' {aka 'std::vector'} to 'otb::SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType*' {aka 'std::vector*'} in return return m_InitialProportions;

Steps to reproduce

Describe as precisely as possible how to reproduce the bug. Try to isolate a minimal number of steps. Also describe reproducibility (always, random ...).

Configuration information

OS, OTB version or tag, information related to build (binaries, superbuild, system libs ...)