MAJA compilation error when compiling OTB

System information

  • OS Platform and Distribution: Ubuntu 20.10 (WSL2, Windows Subsystem for Linux)
  • Maja installed from: source
  • Maja version: develop branch
  • Maja commit sha: latest
  • Complementary info: cmake 3.16.3, gcc/c++ 10.2.0

Describe the current behavior

MAJA compilation stops when compiling OTB.

OTB-build-err.log:

In file included from /root/src/build/OTB/source/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarData.cpp:27:
/root/src/build/OTB/source/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarData.h:61:15: error: ‘ostream’ in namespace ‘std’ does not name a type
   61 |   friend std::ostream& operator<<(std::ostream& os, const AlosPalsarData& data);
      |               ^~~~~~~
/root/src/build/OTB/source/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarData.h:31:1: note: ‘std::ostream’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
   30 | #include <map>
  +++ |+#include <ostream>
   31 |
/root/src/build/OTB/source/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarData.h:66:15: error: ‘istream’ in namespace ‘std’ does not name a type
   66 |   friend std::istream& operator>>(std::istream& is, AlosPalsarData& data);
      |               ^~~~~~~
/root/src/build/OTB/source/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarData.h:31:1: note: ‘std::istream’ is defined in header ‘<istream>’; did you forget to ‘#include <istream>’?
   30 | #include <map>
  +++ |+#include <istream>
   31 |

Urgency/Criticity

  • Urgency (Select Low/Medium/High): High
  • Criticity (Select Low/Medium/High): High

Correction

Add to build/OTB/source/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarData.h:

#include <ostream>
#include <istream>