FreeCAD fail to build with OCE (community eddition)

Having trouble installing or compiling FreeCAD? Get help here.
cbalint
Posts: 2
Joined: Fri Nov 08, 2019 5:52 pm

FreeCAD fail to build with OCE (community eddition)

Postby cbalint » Fri Nov 08, 2019 5:57 pm

* As per description: https://www.freecadweb.org/tracker/view.php?id=4190

This [PR#2680](https://github.com/FreeCAD/FreeCAD/pull/2680) introduced a header file [Standard_Handle.hxx](https://github.com/FreeCAD/FreeCAD/blob ... lper.h#L26) not available in OCE community edition.

Unsure if it is intentional, is FreeCAD dropping OCE support.

Error is obvious:
```
[ 35%] Building CXX object src/Mod/TechDraw/App/CMakeFiles/TechDraw.dir/AppTechDrawPy.cpp.o
In file included from /home/cbalint/rpmbuild/BUILD/FreeCAD/src/Mod/TechDraw/App/AppTechDrawPy.cpp:73:
/home/cbalint/rpmbuild/BUILD/FreeCAD/src/Mod/TechDraw/App/DrawDimHelper.h:26:10: fatal error: Standard_Handle.hxx: No such file or directory
26 | #include <Standard_Handle.hxx>
```
wmayer
Site Admin
Posts: 14991
Joined: Thu Feb 19, 2009 10:32 am

Re: FreeCAD fail to build with OCE (community eddition)

Postby wmayer » Fri Nov 08, 2019 6:25 pm

Unsure if it is intentional, is FreeCAD dropping OCE support.
As far as I can see that's the one and only location in the FreeCAD code base that includes this header. As OCE/OCC internally includes the appropriate header file to offer the Handle() class it's superfluous to explicitly include it in FreeCAD code, too.

So, in this case it's trivial to fix the build for OCE but in the long-term OCE support might be dropped since the major Linux distributions switch back to OCC.
vocx
Posts: 1851
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD fail to build with OCE (community eddition)

Postby vocx » Fri Nov 08, 2019 10:46 pm

cbalint wrote:
Fri Nov 08, 2019 5:57 pm
...
Unsure if it is intentional, is FreeCAD dropping OCE support.
...
I haven't seen an official announcement, however, OCE, the community edition, has been pretty much ignored by FreeCAD since 2017 or so.

See I don't think anybody of the major developers tests their code against OCE, only the official OCCT 7.x series.

That FreeCAD still compiled against OCE was incidental; I don't think anybody explicitly wanted to retain "support" for it. It seems to me OCE is de facto obsolete, even if there was no official announcement.
sukoi26
Posts: 6
Joined: Thu Oct 12, 2017 6:46 pm

Re: FreeCAD fail to build with OCE (community eddition)

Postby sukoi26 » Sat Nov 09, 2019 8:27 am

Hello,
i suggest to change the line code
#include <Standard_Handle.hxx>
by
# include <Geom2d_Curve.hxx>

it work on OCE result info :

OS: Debian GNU/Linux bullseye/sid (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18702 (Git)
Build type: Unknown
Branch: master
Hash: aab61f3e151e65975e370b4d8ff3611d6355730c
Python version: 3.7.5
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18
....
sukoi26
Posts: 6
Joined: Thu Oct 12, 2017 6:46 pm

Re: FreeCAD fail to build with OCE (community eddition)

Postby sukoi26 » Sat Nov 09, 2019 9:01 am

test wih OCC

OS: Debian GNU/Linux bullseye/sid (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18702 (Git)
Build type: Unknown
Branch: master
Hash: aab61f3e151e65975e370b4d8ff3611d6355730c
Python version: 3.7.5
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
wmayer
Site Admin
Posts: 14991
Joined: Thu Feb 19, 2009 10:32 am

Re: FreeCAD fail to build with OCE (community eddition)

Postby wmayer » Sat Nov 09, 2019 11:02 am

User avatar
wandererfan
Posts: 3145
Joined: Tue Nov 06, 2012 5:42 pm

Re: FreeCAD fail to build with OCE (community eddition)

Postby wandererfan » Sat Nov 09, 2019 2:14 pm

wmayer wrote:
Sat Nov 09, 2019 11:02 am
git commit ac4e23012a4b6
Woke up this morning and this was already fixed! Thank you.
cbalint
Posts: 2
Joined: Fri Nov 08, 2019 5:52 pm

Re: FreeCAD fail to build with OCE (community eddition)

Postby cbalint » Sat Nov 09, 2019 4:42 pm

Thank you Folks !
sukoi26
Posts: 6
Joined: Thu Oct 12, 2017 6:46 pm

Re: FreeCAD fail to build with OCE (community eddition)

Postby sukoi26 » Sat Nov 09, 2019 5:16 pm

thank a lot wmayer for the commit :)