Archived issue #0032891

Coding Rules - eliminating TBB deprecation warning on Ubuntu 20.04

Open CASCADEOCCT:Codingnew1 public note

Search issues

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 {
      | ^~~~~~~~

Public activity

1 archived note

Participants are labeled by their role within this record.

01Commenter 3
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