[Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by abdullah »

Kunda1 wrote:Can we have 2 column output?
https://gist.github.com/luzpaz/a8bb373b ... 071eaf6181
Yes we can. At least I have nothing against it.

I would need to see if there is a way to do it nicely with STL, as I do not want to be coding tab separate strings to produce columns (and I do not know of another way to do this ATM)...

In any case, I think this is for later on. From this thread and the bug tracker, I understand that sometimes there is a suspicion that OCC may be at the source of a problem and then having extra information is very important for testing, bug confirmation, bug reporting. I am trying to support sgrogan to get there (while simultaneously fixing bugs).
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by sgrogan »

abdullah wrote:I am trying to support sgrogan to get there
And Thanks for that :D
I'm compiling master now, I added HAVE_TBB manually in the CMake gui.
How can I check for sure that FreeCAD is using this?
"fight the good fight"
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by abdullah »

sgrogan wrote:
abdullah wrote:I am trying to support sgrogan to get there
And Thanks for that :D
I'm compiling master now, I added HAVE_TBB manually in the CMake gui.
How can I check for sure that FreeCAD is using this?
Welcome!!!!! ;)

If you added a:
set(HAVE_TBB ON)

it should not work (I would be surprised if it does), you have to add a definition (a preprocesor macro that will be passed to c++). The one above should only be a cmake environment variable.

Checking: Go to your favourite c++ file, for example App/Document.cpp

And insert in any function:

#ifdef HAVE_TBB
ThisIsMyNonExistingFunction()
#endif

If compilation fails it is taking it, if it does not fail, well, the macro is not defined during compilation.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by sgrogan »

abdullah wrote:it should not work (I would be surprised if it does), you have to add a definition (a preprocesor macro that will be passed to c++). The one above should only be a cmake environment variable.
I thought that is what CMake did?
See Here: https://forum.freecadweb.org/viewtopic. ... 60#p156942
This thread is also where the OCAF problem originates.
abdullah wrote:#ifdef HAVE_TBB
ThisIsMyNonExistingFunction()
#endif

If compilation fails it is taking it, if it does not fail, well, the macro is not defined during compilation.
I will try this next. Thanks for all the help.
EDIT: Compilation didn't fail. I'll add this https://github.com/abdullahtahiriyo/Fre ... 543fdcbdc0 and try again.
Last edited by sgrogan on Thu May 25, 2017 9:43 pm, edited 1 time in total.
"fight the good fight"
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by abdullah »

sgrogan wrote:
abdullah wrote:it should not work (I would be surprised if it does), you have to add a definition (a preprocesor macro that will be passed to c++). The one above should only be a cmake environment variable.
I thought that is what CMake did?
See Here: https://forum.freecadweb.org/viewtopic. ... 60#p156942
This thread is also where the OCAF problem originates.
abdullah wrote:#ifdef HAVE_TBB
ThisIsMyNonExistingFunction()
#endif

If compilation fails it is taking it, if it does not fail, well, the macro is not defined during compilation.
I will try this next. Thanks for all the help.
I am not an expert in CMake, so whatever the test says is the reality. The non-existing function should help you determine what is really happen. Let me know ;)

It is my pleasure to help you (you are always helping around) and in any case I am interested in whatever helps filter/improve the quality of bug reports and for sure early detection of potential library conflicts. Those get difficult to see in a debugger...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by sgrogan »

OK compilation is still ongoing but I'm getting your expected failures

Code: Select all

Error	1	error C2143: syntax error : missing ';' before 'for'	C:\Users\Chris\GitHub\FreeCAD\src\App\Document.cpp	2782	1	FreeCADApp
Error	2	error C3861: 'ThisIsMyNonExistingFunction': identifier not found	C:\Users\Chris\GitHub\FreeCAD\src\App\Document.cpp	2780	1	FreeCADApp
Error	3	error C1083: Cannot open include file: 'tbb/parallel_for.h': No such file or directory	C:\Users\Chris\GitHub\FreeCAD\src\Mod\Import\App\ImportOCAF.cpp	83	1	Import
So vejmarie does this

Code: Select all

add_definitions(-DHAVE_TBB)
somewhere else that made a difference in my previous tests?

EDIT: abdullah, do you think we should start a new thread? and maybe ask a mod to move our conversation there? I think we have determined it's not a PPA packaging issue but a FreeCAD issue.
"fight the good fight"
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by abdullah »

sgrogan wrote:OK compilation is still ongoing but I'm getting your expected failures
sgrogan wrote:EDIT: abdullah, do you think we should start a new thread? and maybe ask a mod to move our conversation there? I think we have determined it's not a PPA packaging issue but a FreeCAD issue.
This is with the "add_definitions" isn't it?

If so, no, it is not a OCC PPA packaging issue anymore, but a FC cmake problem. It may only come back to OCC PPA packaging if changes are necessary to the packaging to detect the OCC compilation flags. However I do not expect this.

With respect to the thread, I am ok with this or a new one. Just quote me when replying to this topic (in any thread), because I rely a lot on the notification mechanism and have a very bad memory ;)
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by abdullah »

sgrogan wrote:OK compilation is still ongoing but I'm getting your expected failures

Code: Select all
Error 1 error C2143: syntax error : missing ';' before 'for' C:\Users\Chris\GitHub\FreeCAD\src\App\Document.cpp 2782 1 FreeCADApp
Error 2 error C3861: 'ThisIsMyNonExistingFunction': identifier not found C:\Users\Chris\GitHub\FreeCAD\src\App\Document.cpp 2780 1 FreeCADApp
Error 3 error C1083: Cannot open include file: 'tbb/parallel_for.h': No such file or directory C:\Users\Chris\GitHub\FreeCAD\src\Mod\Import\App\ImportOCAF.cpp 83 1 Import

So
BTW, the last error is the one I was mentioning about HAVE_TBB. I think it makes sense to rename the HAVE_TBB macro used for OCAF, as otherwise it will conflict with the HAVE_TBB from OCC that we are forced to use in that form because of OCC headers.
wmayer wrote: Werner...
Would you agree to renaming the OCAF HAVE_TBB macro to other name, like OCAF_HAVE_TBB for example?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Post by sgrogan »

abdullah wrote: Thu May 25, 2017 11:10 pm BTW, the last error is the one I was mentioning about HAVE_TBB. I think it makes sense to rename the HAVE_TBB macro used for OCAF, as otherwise it will conflict with the HAVE_TBB from OCC that we are forced to use in that form because of OCC headers.
I know that vejmarie was trying to get stuff into OCCT as part of his Step Reader improvements so at some point they may become re-aligned. I will try to get in touch with him this WE. Locally I will re-name to look at the CMake stuff.
"fight the good fight"
Post Reply