Yup, that's where we started, but in the process of trying to get this to work abdullah realized we are not compiling FreeCAD correctly w/TBB.Kunda1 wrote:Does it also merit to mention OCC TBB support in Help > About FreeCAD ?
Yup, that's where we started, but in the process of trying to get this to work abdullah realized we are not compiling FreeCAD correctly w/TBB.Kunda1 wrote:Does it also merit to mention OCC TBB support in Help > About FreeCAD ?
and makes FC stop compilingabdullah wrote:OK. This diff effectively activates the HAVE_TBB preprocesor macro in FC:
Code: Select all
[ 62%] Building CXX object src/Mod/Spreadsheet/Gui/CMakeFiles/SpreadsheetGui.dir/AppSpreadsheetGui.cpp.o
src/Mod/Import/App/CMakeFiles/Import.dir/build.make:251: recipe for target 'Mod/Import/Import.so' failed
CMakeFiles/Makefile2:3648: recipe for target 'src/Mod/Import/App/CMakeFiles/Import.dir/all' failed
CMakeFiles/Import.dir/ImportOCAF.cpp.o: In function `tbb::task_group_context::task_group_context(tbb::task_group_context::kind_type, unsigned long)':
/usr/include/tbb/task.h:450: undefined reference to `tbb::task_group_context::init()'
CMakeFiles/Import.dir/ImportOCAF.cpp.o: In function `tbb::task::task()':
/usr/include/tbb/task.h:556: undefined reference to `vtable for tbb::task'
Code: Select all
#ifdef HAVE_TBB
#include <tbb/parallel_for.h>
#include <tbb/blocked_range.h>
#include <tbb/task_group.h>
#endif
Thanks abdullah for continuing to pursue this. I'm am in the process of repeating on windows. Maybe a too old version of tbb on linux is a problem? I sure hope not and would be surprised that occ compile didn't fail because of it.abdullah wrote:It is intended as an example only, as I guess we should:
1. Fix the CMake so that the cmake from OCC are loaded and whether HAVE_TBB was used when compiling OCC extracted from there.
2. Find a solution for OCAF. I am not sure what.
3. Decided what we want to show and how.
I think that we cannot invent information we do not have. If we fall back to path finding, then probably the HAVE_TBB macro should not be set and (TBB) should not appear (regardless of how it was compiled). I mean, if cmake does not find what OCC should have put in its path when installing, then the "mistake" is in the OCC compilation/installing/packaging, not in FC.sgrogan wrote:For 1. we probably need to consider what happens if the information can't be found and FreeCAD falls back to finding paths to specific files.
I guess that in part is why cmake exists and allows to do so many things. If it would be straightforward we would not need it.sgrogan wrote:Dependencies of dependencies gives me a headache. Pull the thread on the blanket and soon we have a ball of yarn and no blanket
Agreed, we can not invent it. It should be reported as unknown (look at About FreeCAD info for build type).abdullah wrote:I think that we cannot invent information we do not have. If we fall back to path finding, then probably the HAVE_TBB macro should not be set and (TBB) should not appear (regardless of how it was compiled). I mean, if cmake does not find what OCC should have put in its path when installing, then the "mistake" is in the OCC compilation/installing/packaging, not in FC.
Agreed againabdullah wrote:I guess that in part is why cmake exists and allows to do so many things. If it would be straightforward we would not need it.
I am not sure we can report it as unknown. I mean we can report a TBB version of the system as unknown. However:sgrogan wrote: abdullah wrote:
I think that we cannot invent information we do not have. If we fall back to path finding, then probably the HAVE_TBB macro should not be set and (TBB) should not appear (regardless of how it was compiled). I mean, if cmake does not find what OCC should have put in its path when installing, then the "mistake" is in the OCC compilation/installing/packaging, not in FC.
Agreed, we can not invent it. It should be reported as unknown (look at About FreeCAD info for build type).
This is slightly another thing but related. If TBB is enabled in FC (so if there is a MACRO defining that FreeCAD shall be built with TBB support, for example for the OCAF, for example for the OCC bindings, for any of those), then we can also report the TBB version:sgrogan wrote:Agreed, we can not invent it. It should be reported as unknown (look at About FreeCAD info for build type).