Archived issue #0032891
Coding Rules - eliminating TBB deprecation warning on Ubuntu 20.04
Description
Warnings c++11
[ 1%] [32mBuilding CXX object src/TKernel/CMakeFiles/TKernel.dir/__/OSD/OSD_Timer.cxx.o
In file included from /disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx:29:
/usr/include/tbb/task_scheduler_init.h:21:154: : '#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.'
/disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx: In static member function 'static void OSD_Parallel::forEachExternal(OSD_Parallel::UniversalIterator&, OSD_Parallel::UniversalIterator&, const OSD_Parallel::FunctorInterface&, Standard_Integer)':
/disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx:56:35: warning: 'captured_exception' is deprecated [K-Wdeprecated-declarations]
56 | catch (tbb::captured_exception& KanException)
In file included from /usr/include/tbb/task_arena.h:24,
from /usr/include/tbb/partitioner.h:52,
from /usr/include/tbb/parallel_for.h:25,
from /disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx:25:
/usr/include/tbb/tbb_exception.h:191:24: : declared here
191 | class __TBB_DEPRECATED captured_exception : public tbb_exception
Warning 1
[ 13%] Building CXX object src/TKBestFit/CMakeFiles/TKBestFit.dir/__/BestFitAlgo/BestFitAlgo_Projector.cxx.o
/disk1/builds/CR0-WEEK-10/Products_SRC/src/AcisData/AcisData_AcisModel.cxx: In member function 'void AcisData_AcisModel::ReadStream(Standard_IStream&)':
/disk1/builds/CR0-WEEK-10/Products_SRC/src/AcisData/AcisData_AcisModel.cxx:372:21: warning: 'pipeline' is deprecated: tbb::pipeline is deprecated, use tbb::parallel_pipeline [-Wdeprecated-declarations]
372 | tbb::pipeline pl;
| ^~
In file included from /disk1/builds/CR0-WEEK-10/Products_SRC/src/AcisData/AcisData_AcisModel.cxx:47:
/usr/include/tbb/pipeline.h:235:87: note: declared here
235 | class __TBB_DEPRECATED_MSG("tbb::pipeline is deprecated, use tbb::parallel_pipeline") pipeline {
| ^~~~~~~~
[ 1%] [32mBuilding CXX object src/TKernel/CMakeFiles/TKernel.dir/__/OSD/OSD_Timer.cxx.o
In file included from /disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx:29:
/usr/include/tbb/task_scheduler_init.h:21:154: : '#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.'
/disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx: In static member function 'static void OSD_Parallel::forEachExternal(OSD_Parallel::UniversalIterator&, OSD_Parallel::UniversalIterator&, const OSD_Parallel::FunctorInterface&, Standard_Integer)':
/disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx:56:35: warning: 'captured_exception' is deprecated [K-Wdeprecated-declarations]
56 | catch (tbb::captured_exception& KanException)
In file included from /usr/include/tbb/task_arena.h:24,
from /usr/include/tbb/partitioner.h:52,
from /usr/include/tbb/parallel_for.h:25,
from /disk1/builds/CR0-WEEK-10/OCCT_SRC/src/OSD/OSD_Parallel_TBB.cxx:25:
/usr/include/tbb/tbb_exception.h:191:24: : declared here
191 | class __TBB_DEPRECATED captured_exception : public tbb_exception
Warning 1
[ 13%] Building CXX object src/TKBestFit/CMakeFiles/TKBestFit.dir/__/BestFitAlgo/BestFitAlgo_Projector.cxx.o
/disk1/builds/CR0-WEEK-10/Products_SRC/src/AcisData/AcisData_AcisModel.cxx: In member function 'void AcisData_AcisModel::ReadStream(Standard_IStream&)':
/disk1/builds/CR0-WEEK-10/Products_SRC/src/AcisData/AcisData_AcisModel.cxx:372:21: warning: 'pipeline' is deprecated: tbb::pipeline is deprecated, use tbb::parallel_pipeline [-Wdeprecated-declarations]
372 | tbb::pipeline pl;
| ^~
In file included from /disk1/builds/CR0-WEEK-10/Products_SRC/src/AcisData/AcisData_AcisModel.cxx:47:
/usr/include/tbb/pipeline.h:235:87: note: declared here
235 | class __TBB_DEPRECATED_MSG("tbb::pipeline is deprecated, use tbb::parallel_pipeline") pipeline {
| ^~~~~~~~
Public activity
1 archived note
Participants are labeled by their role within this record.
This deprecation warning comes from TBB library, and I guess this functionality has been already removed from oneTBB (e.g. warning will go away after upgrading to newer TBB library).
Related records
- #0032697 · related to · closedConfiguration - fix compilation errors with oneTBB 2021
- #0032851 · related to · newOCCT algorithms create/destroy a large number of threads when Intel TBB enabled
- #0033117 · related to · closedCoding, Configuration - migration to intel oneTBB 2021.5.0 (c++20 ready)
- #0032889 · child of · newConfiguration - Ubuntu 20.04 gcc 10 bugs
- #0030573 · child of · closedOSD_Parallel_TBB: limit number of execution threads using settings of OSD_ThreadPool::DefaultPool()