Error while building from source in Ubuntu 22.04.3 LTS

I am building the library from source and followed installation instructions given on the official website. But I am getting this this error. Please help. Thanks in advance.

gkv311 n's picture

Please post text logs, not just screenshots. Images couldn't be used for search and difficult to qoute.

Utkarsh's picture

Do you mean something like this?

/home/utkarsh/Downloads/opencascade-7.7.0/src/ViewerTest/ViewerTest_CmdParser.cxx:53:80: error: ‘numeric_limits’ is not a member of ‘std’
   53 | iewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY = (std::numeric_limits<std::size_t>::max)();
      |                                                             ^~~~~~~~~~~~~~

/home/utkarsh/Downloads/opencascade-7.7.0/src/ViewerTest/ViewerTest_CmdParser.cxx:53:106: error: expected primary-expression before ‘>’ token
   53 | UNNAMED_COMMAND_OPTION_KEY = (std::numeric_limits<std::size_t>::max)();
      |                                                              ^

/home/utkarsh/Downloads/opencascade-7.7.0/src/ViewerTest/ViewerTest_CmdParser.cxx:53:109: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   53 | UNNAMED_COMMAND_OPTION_KEY = (std::numeric_limits<std::size_t>::max)();
      |                                                                 ^~~
      |                                                                 std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from /home/utkarsh/Downloads/opencascade-7.7.0/src/ViewerTest/ViewerTest_CmdParser.cxx:22:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[2]: *** [src/TKViewerTest/CMakeFiles/TKViewerTest.dir/build.make:104: src/TKViewerTest/CMakeFiles/TKViewerTest.dir/__/ViewerTest/ViewerTest_CmdParser.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3235: src/TKViewerTest/CMakeFiles/TKViewerTest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
gkv311 n's picture

Yes, like this. Looks like your issue is covered by this patch:
#33250

Utkarsh's picture

Sorry but I don't understand what is to be done? Could you please help? Thanks for your responses.

Dmitrii Pasukhin's picture

Hello, the problem was fixed on last release. Please cherry pick the commend:

OCCT Git - occt.git/commit (opencascade.org) or 0033250: Configuration - Missing Limits header file · Open-Cascade-SAS/OCCT@2a8c5ad (github.com)

Best regards, Dmitrii.