[INFO] OCCT 7.6.0 beta is out !

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [INFO] OCCT 7.6.0 beta is out !

Post by wmayer »

adrianinsaval wrote: Mon Oct 11, 2021 1:32 pm I don't know how to get freecad to compile against a self compiled occ that is not installed
It is really simple and straightforward :D

When self-compiling OCCT I recommend to also install it but of course only somewhere in your home directory. When you run the CMake GUI to configure the makefiles you should get an option where to install the OCCT files.

To make your self-compiled FreeCAD version use the self-compiled OCCT version you should set the path for the OpenCASCADE_DIR variable. Make sure that it points to OCCT's cmake directory that you find underneath the lib directory. When re-configuring CMake it automatically fetches the correct include and lib paths.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [INFO] OCCT 7.6.0 beta is out !

Post by Syres »

drmacro wrote: Mon Oct 11, 2021 1:13 pm [I don't believe it is really simple and straightforward...maybe for those who use cmake, etc. more actively. I can compile
I agree, this is what I've put together having never done it before. I'd really recommend sticking the Linux flavour that you're most comfortable with.

All the following done on Linux Mint 19.3, from the root of your home drive, first get the OCCT dependencies:

Code: Select all

sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype6-dev libxt-dev libxmu-dev libgl1-mesa-dev libfreeimage-dev libtbb-dev libgl2ps-dev
download the source and checkout the beta commit

Code: Select all

git clone https://git.dev.opencascade.org/repos/occt.git occt760b-source
git checkout OCCT-760-BETA
create the build and install folders

Code: Select all

mkdir occt760b-build
mkdir occt760b-install
cd occt760b-build
compile OCCT

Code: Select all

cmake -DINSTALL_DIR=/home/john/occt760b-install ../occt760b-source
make -j$(nproc --ignore=2)
make install
Now create a dedicated build folder for FC based on OCCT760beta

Code: Select all

mkdir fc-daily-build-occt760b
cd fc-daily-build-occt760b
Now compile FreeCAD using the newly compiled OCCT760beta

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -DOpenCASCADE_DIR=/home/john/occt760b-install/lib/cmake/opencascade ../freecad-daily-source
make -j$(nproc --ignore=2)
Edit: It works!!

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.26069 (Git)
Build type: Release
Branch: master
Hash: fbdb4e29d848511913d2ff58be0f0813693509ea
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.6.0.beta
Locale: English/UnitedKingdom (en_GB)
Last edited by Syres on Mon Oct 11, 2021 5:22 pm, edited 1 time in total.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by adrianinsaval »

drmacro wrote: Mon Oct 11, 2021 1:49 pm I have seen the -git "stuff" offered in the software installer application, still no clue what it is, does, or how it can help me. :(
they're dev packages, they pull the latest commit from the git repository when you hit install and it compiles in your machine using a program called makepkg and the scripts written in the corresponding PKGBUILD file.
The opencascade link you provided above shows it is doing 7.5 OOCT, no clue how to translate that 7.6.
by changing the source in the PKGBUILD file you can make it compile 7.6 (assuming nothing has changed in the compilation requirements)
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by drmacro »

wmayer wrote: Mon Oct 11, 2021 2:57 pm
adrianinsaval wrote: Mon Oct 11, 2021 1:32 pm I don't know how to get freecad to compile against a self compiled occ that is not installed
It is really simple and straightforward :D
Hmm...for someone who is familiar with the process and does it regularly, possibly several times daily for the last 20 years (for example, someone like a wmayer ;) ) it is most likely really simple and straightforward.

For others who have not done anything that serious for 20 years (like me :mrgreen: ) or someone who has no experience with building code and is just a user reading the wiki on how to build FC or OCCT links, it is not simple or straight forward. :(
When self-compiling OCCT I recommend to also install it but of course only somewhere in your home directory. When you run the CMake GUI to configure the makefiles you should get an option where to install the OCCT files.
I have not investigated cmake-gui for OCCT. I have only minimally investigated cmake-gui for building FC. The FC build on Linux mentions cmake-gui, basically in passing, leaving the reader with no particular instructions on how to extrapolate the wiki info about the cmake options discussed in the wiki into actionable knowledge to use in cmake-gui. The gui version may make it easier for those who know what they see in the gui, unfortunately for those who are not cmake and build gurus, it is just a nice display of lots of stuff; granted some familiar names if you've build from the command prompt, but, not particularly intuitive. I've been, told more than once, that cmake-gui is the way to go, that it makes life easier, but, my limited attempts to use it have not had this effect. :(
To make your self-compiled FreeCAD version use the self-compiled OCCT version you should set the path for the OpenCASCADE_DIR variable. Make sure that it points to OCCT's cmake directory that you find underneath the lib directory. When re-configuring CMake it automatically fetches the correct include and lib paths.
I will take this under advisement for future attempts. :)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by sgrogan »

drmacro wrote: Mon Oct 11, 2021 5:40 pm I will take this under advisement for future attempts.
Maybe we should take a half step back.
What distro are you using, and why. The why is not so important unless it is directly related to FreeCAD use.
Although the steps are similar the particulars are slightly different due to the package manager used.

Can you give us the baseline of your system, distro/any FreeCAD/OCCT already installed.
"fight the good fight"
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by drmacro »

sgrogan wrote: Mon Oct 11, 2021 8:27 pm ...
Maybe we should take a half step back.
What distro are you using, and why. The why is not so important unless it is directly related to FreeCAD use.
Although the steps are similar the particulars are slightly different due to the package manager used.

Can you give us the baseline of your system, distro/any FreeCAD/OCCT already installed.
Hmm...I suppose most could just say I'm using distro X. But, for me it's not that simple (or maybe this is just my way of thinking about it).
I will note, that I currently have no version of FC "installed" on any of my machines. (i.e. I don't issue a "make install". I run out of the build directory.)

I have multiple machines, one of which I use as a test bed, so it changes at my whim.

ATM, I primarily use Debian (or an offshoot UbuntuStudio). I build FC from git source on Debian 10, Rasbian (now just called Debian 10, I believe) and UbuntuStudio.

I started looking at building OCCT because Debian repos always lag and currently only have 7.3. In the meantime, Ubuntu repos have 7.5 (as does the FC PPA). Hence my UbuntuStudio machine has 7.5 and my Debian 10 machine has 7.3.

On the test bed machine I've tried Debian 11, FC built ok, I don't recall any issues. (But still OCCT 7.3)

In general, with Debian and Ubuntu it's just apt get the deps as specified in the FC wiki on compiling on Linux and follow the out of source cmake/make. (I don't use cmake-gui, it opens and shows a mind boggling list of "stuff" which, not knowing what it being displayed, just looks like changing something will most likely break something that is unfixable by an inexperienced user...)
(Other than the pesky thing with "pip install pyside2" which installs pyside2 and shiboken2, then FC will no longer run or build...so, when things like the new Vendor parts workbench attempt to import pyside, I just don't use them.)

I wanted to try Manjaro for purposes unrelated to CAD and, so far it appears good, so I figured I'd try to get to a similar level (as my Debian & Ubuntu machines) with FC. This has led me to pacman, PKGBUILD, etc. which I'm learning more about daily. (I'm now at the point where the freecad-git has built 0.20 and is using OCCT 7.5. But, I didn't actually do anything myself, I just used the GUI front end for pacman to get freecad-git. So, I'm assuming it used the defined PKGBUILD because I have yet to grok enough of that to attempt it from the commandline.)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by sgrogan »

drmacro wrote: Tue Oct 12, 2021 12:05 pm (Other than the pesky thing with "pip install pyside2" which installs pyside2 and shiboken2, then FC will no longer run or build...so, when things like the new Vendor parts workbench attempt to import pyside, I just don't use them.)
pyside2 links against QT5. The problem is that the pip pyside2 package links against QT 5.15. If your on Debian/Ubuntu your system QT is 5.11 or 5.12
and the QT's clash.
The root cause is the apt pyside2 package isn't packaged with some necessary files. Compatible files, under a different name, are available in the apt PyQT5 package. There is a work around to apt install PyQT5 and simlink the necessary files. I'll look for the link.
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by sgrogan »

drmacro wrote: Tue Oct 12, 2021 12:05 pm Hmm...I suppose most could just say I'm using distro X. But, for me it's not that simple (or maybe this is just my way of thinking about it).
I will note, that I currently have no version of FC "installed" on any of my machines. (i.e. I don't issue a "make install". I run out of the build directory.)

I have multiple machines, one of which I use as a test bed, so it changes at my whim.

ATM, I primarily use Debian (or an offshoot UbuntuStudio). I build FC from git source on Debian 10, Rasbian (now just called Debian 10, I believe) and UbuntuStudio.
That's fine, my point is only that the advice will be slightly different for different distro/version. It's a lot of "the same thing only different"
For example the pyside2 issue I described above is Debian/Ubuntu specific. If you use Ubuntu 18.04 we even have a proper pyside2 package on the PPA, so the work around can be avoided.

Although there is no problem running FreeCAD from the build directory, if you want to link FreeCAD against a custom built OCCT, OCCT "must" be installed. You don't want to use OCCT's default install location, because it will bork your system installed version. Instead you need to set the CMake install pre-fix to some user place. The reason OCCT needs to be installed is because at install the OCCT directory structure is re-arranged. FreeCAD expects the structure to be like the installed version.
Syres' instructions look good for a Debian/Ubuntu/Mint system.
Syres wrote: Mon Oct 11, 2021 4:21 pm compile OCCT

Code: Select all

cmake -DINSTALL_DIR=/home/john/occt760b-install ../occt760b-source
make -j$(nproc --ignore=2)
make install
Here the install directory is set to a user location, note sudo isn't necessary for install.
"fight the good fight"
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by drmacro »

sgrogan wrote: Sun Oct 17, 2021 2:14 pm ...
pyside2 links against QT5. The problem is that the pip pyside2 package links against QT 5.15. If your on Debian/Ubuntu your system QT is 5.11 or 5.12
and the QT's clash.
The root cause is the apt pyside2 package isn't packaged with some necessary files. Compatible files, under a different name, are available in the apt PyQT5 package. There is a work around to apt install PyQT5 and simlink the necessary files. I'll look for the link.
I figured it was something like that when I broke one of my machine with it the first time. I was attempting to get the script that converts output (dialogs) from qtdesigner to pyside 2. (it was a while ago and haven't visited it since...fuzzy memories. :roll: )

@kkremitski schooled me on how to do it without the script with some qt tool provided with the FC pyside PPA ...maybe, again fuzzy. :lol:

If you find the workaround I'll have a look.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [INFO] OCCT 7.6.0 beta is out !

Post by sgrogan »

drmacro wrote: Sun Oct 17, 2021 2:32 pm If you find the workaround I'll have a look.
https://forum.freecadweb.org/viewtopic. ... 24#p440870
See hko's post from the link in the link.
"fight the good fight"
Post Reply