MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032035Community[OCCT] OCCT:Configurationpublic2020-12-31 20:322021-01-12 15:48
Reporterefferre79 
Assigned Toefferre79 
PrioritynormalSeveritymajor 
StatusfeedbackResolutionopen 
PlatformLinuxOSGentooOS Versionrolling
Product Version[OCCT] 7.4.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0032035: Configuration - bug in OpenCASCADEConfig.cmake when using INSTALL_DIR_CMAKE
Descriptionwhen using INSTALL_DIR_CMAKE during the configuration phase, it's possible to change the installation location of cmake files

OpenCASCADEConfig.cmake defines opencascade installation root (variable) OpenCASCADE_INSTALL_PREFIX starting from the path of cmake file itself by assuming the cmake file is installed below the same path of the include and lib files. This is true only in the case INSTALL_DIR_CMAKE is not defined externally

the result is that find_package(OpenCASCADE) sets wrong OpenCASCADE_*_DIR variables in 3rd part cmake files trying to look for opencascade

The same applies for latest 7.5.0.
Steps To Reproduceconfigure opencascade by using
$ cmake -DINSTALL_DIR_CMAKE=/usr/lib64/cmake 
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0032046feedbacktaoyouh Configuration - CMake Installs .lib files to libd instead of lib on Windows 

-  Notes
(0098068)
bugmaster (administrator)
2021-01-11 14:45

Hi,

INSTALL_DIR_... variables set location of folders cmake, doc, samples, etc relative INSTALL_DIR variable.
If you really need to redefine INSTALL_DIR_CMAKE externally use relative paths.

(0098094)
efferre79 (reporter)
2021-01-12 15:23

I am working under Linux

The cmake files are found on typical locations as indicated in https://cmake.org/cmake/help/latest/command/find_package.html [^] so it's better to install below /usr/lib${LIB_SUFFIX}/cmake/opencascade-${VERSION}.

I am trying to create an installation where there are many parallel versions of opencascade available, the simplest way is to install everything under a separate directory but the cmake files which should be installed as explained above (in the past the root path was something like /usr/lib64/opencascade-7.4.0/ros). Alternatively by using -DINSTALL_DIR_WITH_VERSION=ON it's possible to install in the default destination (e.g. below /usr) but there are some files which are not versioned, e.g. some binaries

/usr/bin/custom.sh
/usr/bin/custom_gcc_64.sh
/usr/bin/draw.sh
/usr/bin/env.sh
/usr/bin/sample.sh
(0098095)
kgv (developer)
2021-01-12 15:36
edited on: 2021-01-12 15:47

Just to comment *.sh scripts. Files like
> /usr/bin/custom.sh
> /usr/bin/custom_gcc_64.sh
> /usr/bin/draw.sh
> /usr/bin/env.sh

are hacks to pre-configure environment to libraries and resources within development environment.
E.g., when OCCT is not actually installed system-wide but placed somewhere within $HOME directory.
This is a common way for developing OCCT-based application relying not on OCCT packages provided by Linux distributive.

When installing DRAWEXE system-wide, starting executable directly should not require any $LD_LIBRARY_PATH hacks and application should be able to find resource files in their default locations (hence global variables like $CSF_OCCTResourcePath/$CSF_DrawPluginDefaults should not be necessary as well).

searchResources() function in src/Draw/Draw.cxx defines resource look up by Draw Harness - at first it tries to find resources within "/share/opencascade-7.6.0.dev/" folder with fully qualified version and then fallbacks to shorter options:
 ("/share/opencascade-" OCC_VERSION_STRING_EXT "/") + theResName,
 ("/share/opencascade-" OCC_VERSION_COMPLETE "/") + theResName,
 ("/share/opencascade-" OCC_VERSION_STRING "/") + theResName,
 ("/share/opencascade/") + theResName,
 ("/share/occt-" OCC_VERSION_STRING_EXT "/") + theResName,
 ("/share/occt-" OCC_VERSION_COMPLETE "/") + theResName,
 ("/share/occt-" OCC_VERSION_STRING "/") + theResName,
 ("/share/occt/") + theResName,


Apart from Draw Harness plugins and Tcl scripts, there is no much global resource files in OCCT nowadays necessary for using OCCT in other applications (most resources are embedded into .so and plugin interface for loading OCAF documents has been superseded by direct linking and registering drivers).


- Issue History
Date Modified Username Field Change
2020-12-31 20:32 efferre79 New Issue
2020-12-31 20:32 efferre79 Assigned To => bugmaster
2021-01-01 14:31 kgv Target Version => 7.6.0*
2021-01-01 14:31 kgv Summary bug in OpenCASCADEConfig.cmake when using INSTALL_DIR_CMAKE => Configuration - bug in OpenCASCADEConfig.cmake when using INSTALL_DIR_CMAKE
2021-01-01 14:31 kgv Steps to Reproduce Updated View Revisions
2021-01-11 14:45 bugmaster Note Added: 0098068
2021-01-11 14:45 bugmaster Assigned To bugmaster => efferre79
2021-01-11 14:45 bugmaster Status new => assigned
2021-01-11 15:20 bugmaster Status assigned => feedback
2021-01-12 15:23 efferre79 Note Added: 0098094
2021-01-12 15:36 kgv Note Added: 0098095
2021-01-12 15:37 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:38 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:39 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:39 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:43 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:43 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:44 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:44 kgv Relationship added related to 0032046
2021-01-12 15:45 kgv Note Edited: 0098095 View Revisions
2021-01-12 15:45 kgv Description Updated View Revisions
2021-01-12 15:45 kgv Additional Information Updated View Revisions
2021-01-12 15:47 kgv Note Edited: 0098095 View Revisions


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker