Wed, 07/15/2020 - 07:48
I had liboce-ocaf-dev 0.18.2 installed on my Ubuntu 18.04 and wanted to shift to the latest release of open cascade 7.4.0. Based on the installation instruction recommendations, I removed to the liboce-ocaf-dev package since its an older version. But that package comes with some liboce* dependencies as well, below:-
liboce-foundation-dev/bionic,now 0.18.2-2build1 amd64,
liboce-foundation11/bionic,now 0.18.2-2build1 amd64,
liboce-modeling-dev/bionic,now 0.18.2-2build1 amd64,
liboce-modeling11/bionic,now 0.18.2-2build1 amd64,
liboce-ocaf-dev/bionic,now 0.18.2-2build1 amd64,
liboce-ocaf-lite-dev/bionic,now 0.18.2-2build1 amd64,
liboce-ocaf-lite11/bionic,now 0.18.2-2build1 amd64,
liboce-ocaf11/bionic,now 0.18.2-2build1 amd64,
Do I need to remove them as well, if I want to install and work with 7.4.0 now? Or the 7.4.0 assumes these dependencies will be there on Ubuntu?
I sometimes need to go back and forth between version due to some compatibility issues in my application, is there a easy way to want to uninstall 7.4.0 ?
Wed, 07/15/2020 - 10:40
Open CASCADE is not a library, but a framework, which means it consists of a lot of libraries depending on each other.
Mixing libraries of different OCCT versions is usually not supported - most likely such combination will result in runtime linkage errors or crashes.
Therefore, all liboce packages should be removed, not just liboce-ocaf-dev.
As for development, it is a common practice having multiple OCCT versions at different installation paths.
You just need to ensure that your application is built (configure CMake / header / library folders properly) and run (configure batch scripts / LD_LIBRARY_PATH) against proper OCCT location.
Wed, 07/15/2020 - 19:53
I see, thanks for clarifying about the dependencies, Kirill. When I want to uninstall Open CASCADE 7.4.0 and its all dependencies from my linux machine, is there a neat way to do it that's provided by the framework? For example, for the liboce-ocaf-dev I install it and remove it with a single "apt" command - apt install or apt remove. I was wondering if there is something similar supported by the framework?
Wed, 07/15/2020 - 20:10
Linux packaging is not part of OCCT - it is done by Linux maintainers. I suppose you may try using mask:
Using make install alike commands has no "undo" - you should care about installation path and cleanup destination on your own.
Or just avoid installing into system paths (normally, this requires root rights, so that this cannot be done accidentally) - by specifying install location to CMake configure or by chroot tools.
The latter one is commonly used for preparation of binary Linux packages - making an own Debian package for OCCT (can be complicated) or configuring a Launchpad repository with newer OCCT (if there are any) might be alternatives.
Thu, 07/16/2020 - 23:06
Thanks for the explanation. But I think what you suggested about using apt-get for uninstalling open cascade will not work if I have setup open cascade 7.4.0 from your official release at http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=fd47711d682be943f0e0a13d1fb54911b0499c31;sf=tgz
So if installed from the link above which is not an Ubuntu package, then there is no automatic method and I should do it manually, correct?As you suggested I will need to make sure that I am not installing into system paths and to uninstall it, I will need to clean up manually, correct?
Fri, 08/07/2020 - 11:52
This is correct. Though technically possible, it is unusual making "uninstall" (make uninstall) target in addition to "install" (make install) within Makefile.
OCCT comes with CMake scripts, and CMake does not provide automatic generation of such target - see their FAQ.