Personal tools
You are here: Home Forum Install & build GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Up to Install & build

GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Christophe Trophime at January 07. 2019

Hi,
I'm having some troubles building GUI component with a pre-installed OpenCascade package from Debian/Testing (aka buster).
The CONFIGURATION archive tarball contains:

cmake/FindSalomeCAS.cmake

cmake/FindCAS.cmake

and cmake/FindSalomeOpenCASCADE.cmake.

As the GUI cmake is looking for a package OpenCASCADE, I guess that there shall be a FindOpenCASCADE.cmake file somewhere...

Best
C.

 

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Christophe Trophime at January 07. 2019

Here is the exact error message when building GUI with '-DSALOME_CMAKE_DEBUG=ON':

CMake Error at /home/feelpp/salome/SALOME-9.2.0-DBtesting/SOURCES/CONFIGURATION/cmake/SalomeMacros.cmake:430 (FIND_PACKAGE):

  No "FindOpenCASCADE.cmake" found in CMAKE_MODULE_PATH.

Call Stack (most recent call first):

  /home/feelpp/salome/SALOME-9.2.0-DBtesting/SOURCES/CONFIGURATION/cmake/SalomeMacros.cmake:529 (SALOME_FIND_PACKAGE)

  /home/feelpp/salome/SALOME-9.2.0-DBtesting/SOURCES/CONFIGURATION/cmake/FindSalomeOpenCASCADE.cmake:37 (SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)

  CMakeLists.txt:156 (FIND_PACKAGE)

 

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Vadim SANDLER at January 09. 2019
The way the detection procedure for Open CASCADE Technology is implemented in SALOME CONFIGURATION package relies on presence of CMake configuration exported with OCCT build procedure (OpenCASCADEConfig.cmake); normally configuration files are distributed in the lib/cmake/opencascade subfolder. Probably these files were not deployed with the OCCT Debian's package or, maybe, they are a part of dev package which has to be installed as well.
 
In any case, I agree that detection procedure has to be improved, in order to be able to detect OCCT even if configuration files aren't available.
 
 

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Christophe Trophime at January 10. 2019

Hi,
in fact the trouble can be work around by doing something like:

IF (NOT DEFINED ENV{OPENCASCADE_ROOT_DIR})

     LIST(CMAKE_PATH_MODULE /usr/lib/cmake/occt)

ENDIF()

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Vadim SANDLER at January 11. 2019

Hmm..

This seems to mean that CMake configuration files are present in native packages, so we only need to adopt detection procedure to work properly with native OCCT distribution.

Thank you for the analysis.

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Christophe Trophime at January 23. 2019

After closer investigation, it turns out that the problem is the presence of "NO_CMAKE_SYSTEM_PATH" and "NO_SYSTEM_ENVIRONMENT_PATH" in SALOME_FIND_PACKAGE macro from SalomeMacros.cmake.

If the build is performed in a basic machine with only what is needed installed,

removing these flags is fine and solve almost all cmake issues even when using all prerequisites as native package

 

Hope it helps.

Best

C

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by DAVID Gilles at January 23. 2019

Macro says:

# NO_CMAKE_SYSTEM_PATH and NO_SYSTEM_ENVIRONMENT_PATH ensure any _system_ files like 'xyz-config.cmake'
# don't get loaded (typically Boost). To force their loading, set the XYZ_ROOT_DIR variable to '/usr'. "

Did you try "export OPENCASCADE_ROOT_DIR=/usr" ?

Re: GUI 9.2.0 from scratch FTBS: missing FindOpenCASCADE.cmake??

Posted by Christophe Trophime at January 23. 2019

I haven't tried that.
I tried to get rid of all xyz_ROOT_DIR instead... 


I prefer to avoid, as much as possible, setting environment variables if not **really** needed.
In the same "spirit" I would also like to get rid of extra LD_LIBRARY_PATH and PYTHON_PATH var

Powered by Ploneboard
Document Actions