From 23153eeb1f980bef0be7446271fe658dbecf69d392f83b98879f875c53ea5642 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 28 Sep 2024 22:36:42 +0000 Subject: [PATCH] Accepting request 1204404 from home:cabelo:intel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update to version 2021.13.0: * Extended the parallel_reduce and parallel_deterministic_reduce functional form APIs to better support rvalues reduction (GitHub* #1299). * Removed use-FORTIFY_SOURCE-from-distribution patch, because of MATCHES "_FORTIFY_SOURCE" condition on line 75 - Update to version 2021.12.0: * Fixed parallel_for_each algorithm behavior for iterators defining iterator_concept trait instead of iterator_category. * Fixed the incorrect binary search order in TBBConfig.cmake. - Fix build to handle changes in (open)SUSE specific cmake macros, no user visible changes - Update to version 2021.11.0: * Fixed tbb::this_task_arena() behavior for specific tbb::task_arena{1,0}. * Restored performance on the high-core count systems that support _tpause. - Refresh patches to apply cleanly: * use-FORTIFY_SOURCE-from-distribution.patch * add-cmake-check-for-libatomic-requirement-when-build.patch - Update Summary and description tags to be consistent with upstream's TBB -> oneTBB renaming. - Avoid stuck build/tests * Add use-FORTIFY_SOURCE-from-distribution.patch and use FS settings from distribution (we use either =2 or =3). - Update to 2021.10.0: * Since C++17, parallel algorithms and Flow Graph nodes are allowed to accept pointers to the member functions and member objects as the user-provided callables. * Added missed member functions, such as assignment operators and swap function, to the concurrent_queue and concurrent_bounded_queue containers. - Update to 2021.9.0: * Hybrid CPU support is now a fully supported feature. * Fixed the issue reported by the Address Sanitizer. * Fixed the input_type alias exposed by flow_graph::join_node. - Drop 917.patch (patch was upstreamed). - Drop retry-pthread_create.patch (upstream fixed it by using a similar approach). - Update to v2021.8.0 * Fixed oneapi::tbb::concurrent_bounded_queue::pop return type (GitHub* #807). * Fixed oneapi::tbb::concurrent_queue and oneapi::tbb::concurrent_bounded_queue with non-default constructible value types (GitHub* #885). * Fixed incorrect splitting of iteration space in case there is no support for proportional splitting in custom ranges. - Add patch to link against libatomic where necessary * add-cmake-check-for-libatomic-requirement-when-build.patch - Drop 5cb212d44732947396abdd39eae1229c7cd51644.patch, merged upstream - Use correct changelog entries for v2021.7.0 - update to v2021.7.0: * Memory allocator crash when allocating ~1TB on 64-bit systems (GitHub* #838). * Thread Distribution over NUMA Nodes on Windows OS systems. * For oneapi::tbb::suspend it is now guaranteed that the user-specified callable object is executed by the calling thread. - update to 2021.6.0: * Improved support and use of the latest C++ standards for parallel_sort that allows using this algorithm with user-defined and standard library-defined objects with modern semantics. * The following features are now fully functional: task_arena extensions, collaborative_call_once, adaptive mutexes, heterogeneous overloads for concurrent_hash_map, and task_scheduler_handle. * Added support for Windows* Server 2022 and Python 3.10. * Memory allocator crash on a system with an incomplete /proc/meminfo * Incorrect blocking of task stealing * Hang due to incorrect decrement of a limiter_node * Memory corruption in some rare cases when passing big messages in a flow graph * Possible deadlock in a throwable flow graph node with a lightweight policy. The lightweight policy is now ignored for functors that can throw exceptions * Crash when obtaining a range from empty ordered and unordered containers * Deadlock in a concurrent_vector resize() that could happen when the new size is less than the previous size - drop tbb-pr609-32bit-mwaitpkg.patch (upstream) - add 5cb212d44732947396abdd39eae1229c7cd51644.patch, 917.patch: build on riscv64, hppa, s390x - Add retry-pthread_create.patch that fixes gh#oneapi-src/oneTBB#824. - update to 2021.1.5: * Reworked synchronization mechanism to reduce contention when multiple task_arena’s are used concurrently. * Fixed sporadic memory corruption. * Enabled Microsoft Visual Studio* 2022 and Python 3.9 support. * Extended task_group interface with a new run_and_wait overload to accept task_handle. * Fixed possible correctness issue in queuing_rw_mutex on non-Intel platforms. * Fixed sporadic memory corruption. - For 32-bit systems, rename tbb32.pc (default upstream for 32-bit) to tbb.pc (same as 64-bit) so that applications depending on tbb do not have to call different pkgconfig modules based on arch. - Allow gcc11 - Add tbb-pr609-32bit-mwaitpkg.patch gh#oneapi-src/oneTBB#609 * fixes 32-bit build with gcc11 - Only run ctest when --with test is given - Update to version 2021.4 * Large release notes since 2020.3: https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-threading-building-blocks-release-notes.html - Drop python2 package - Drop patches: * disable-irml.patch -- install the library * optflags.patch -- build system change * reproducible.patch -- build system change - Refresh cmake-remove-include-path.patch - Add libirml subpackage for python module - Add libtbbbind library package for NUMA support - Rework the building of python bindings * Fix egg info version * Remove shebang lines * fix lining issue by setting TBBROOT and tbbvars in install phase * Run python tests with irml library built (but not installed) * Build bindings packages for all existing python3 flavors gh#openSUSE/python-rpm-macros#66 - Update to version 2020.3 * Changed body type concept of the flow::input_node. Set TBB_DEPRECATED_INPUT_NODE_BODY to 1 to compile with the previous concept of the body type. * Fixed compilation errors in C++20 mode due to ambiguity of comparison operators. Inspired by Barry Revzin (https://github.com/oneapi-src/oneTBB/pull/251). * Fixed an issue in TBBBuild.cmake that causes the build with no arguments to fail (https://github.com/oneapi-src/oneTBB/pull/233) - Update to version 2020.2 * Cross-allocator copying constructor and copy assignment operator for concurrent_vector are deprecated. * Added input_node to the flow graph API. It acts like a source_node except for being inactive by default; source_node is deprecated. * Allocator template parameter for flow graph nodes is deprecated. Set TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to 1 to avoid compilation errors. * Flow graph preview hetero-features are deprecated. * Fixed the task affinity mechanism to prevent unlimited memory consumption in case the number of threads is explicitly decreased. * Fixed memory leak related NUMA support functionality in task_arena. - Update to version 2020.1 * Fixed the issue of task_arena constraints not propagated on copy construction. * Fixed TBBGet.cmake script broken by TBB package name changes (https://github.com/intel/tbb/issues/209). - Update to version 2020.0 * Extended task_arena interface to simplify development of NUMA-aware applications. * Added warning notifications when the deprecated functionality is used. - Update to version 2019_u9 * Multiple APIs are deprecated. For details, please see Deprecated Features appendix in the TBB reference manual. * Added C++17 deduction guides for flow graph nodes. Preview Features * Added isolated_task_group class that allows multiple threads to add and execute tasks sharing the same isolation. * Extended the flow graph API to simplify connecting nodes. * Added erase() by heterogeneous keys for concurrent ordered containers. * Added a possibility to suspend task execution at a specific point and resume it later. Bugs fixed * Fixed the emplace() method of concurrent unordered containers to destroy a temporary element that was not inserted. * Fixed a bug in the merge() method of concurrent unordered containers. * Fixed behavior of a continue_node that follows buffering nodes. * Added support for move-only types to tbb::parallel_pipeline * Fixed detection of clang version when CUDA toolkit is installed - Refresh patches: * cmake-remove-include-path.patch * disable-irml.patch * optflags.patch - Add cmake-remove-include-path.patch to remove setting include path since we already install under /usr/include and this fixes idiot OpenCV trying to do -isystem $TBB_INCLUDE_DIR - Update to version 2019_U8 * Fixed a bug in TBB 2019 Update 7 that could lead to incorrect memory reallocation on Linux (https://github.com/intel/tbb/issues/148). * Fixed enqueuing tbb::task into tbb::task_arena not to fail on threads with no task scheduler initialized (https://github.com/intel/tbb/issues/116). - Update to version 2019_U7 * Added TBBMALLOC_SET_HUGE_SIZE_THRESHOLD parameter to set the lower bound for allocations that are not released back to OS unless a cleanup is explicitly requested. * Added zip_iterator::base() method to get the tuple of underlying iterators. * Improved async_node to never block a thread that sends a message through its gateway. * Extended decrement port of the tbb::flow::limiter_node to accept messages of integral types. * Removed the number_of_decrement_predecessors parameter from the constructor of flow::limiter_node. To allow its usage, set TBB_DEPRECATED_LIMITER_NODE_CONSTRUCTOR macro to 1. * Added ordered associative containers: concurrent_{map,multimap,set,multiset} (requires C++11). - Update to version 2019_U6 * Added support for enqueuing tbb::task into tbb::task_arena (https://github.com/01org/tbb/issues/116). * Improved support for allocator propagation on concurrent_hash_map assigning and swapping. * Improved scalable_allocation_command cleanup operations to release more memory buffered by the calling thread. * Separated allocation of small and large objects into distinct memory regions, which helps to reduce excessive memory caching inside the TBB allocator. - Disable python2 support - Update to version 2019_U5 * Too many changes to list, please see the included CHANGES file. - Install TBBConfig*.cmake - Extend reproducible.patch to not capture build kernel version (boo#1101107) - Extend reproducible.patch to override build date (boo#1047218) - Add conditions to build with py2 and py3 respectively in order to allow us disable one based on codestream - Add disable-irml.patch to disable linking to libirml - Actually update to tarball to 2018_U2 release - Update to version 2018_U2 * lambda-friendly overloads for parallel_scan. * support of static and simple partitioners in parallel_deterministic_reduce. * initial support for Flow Graph Analyzer to do parallel_for. * reservation support in overwrite_node and write_once_node. * Fixed a potential deadlock scenario in the flow graph that affected Intel® TBB 2018 Initial Release. * Fixed constructors of concurrent_hash_map to be exception-safe. * Fixed auto-initialization in the main thread to be cleaned up at shutdown. * Fixed a crash when tbbmalloc_proxy is used together with dbghelp. * Fixed static_partitioner to assign tasks properly in case of nested parallelism. - Build python2 and python3 bindings - Do not bundle python bindings with shared library - Update to version 2018 release * Now fully supports this_task_arena::isolate() function. * Parallel STL, an implementation of the C++ standard library algorithms with support for execution policies, has been introduced. * Fixed a bug preventing use of streaming_node and opencl_node with Clang. * Fixed this_task_arena::isolate() function to work correctly with parallel_invoke and parallel_do algorithms. * Fixed a memory leak in composite_node. * Fixed an assertion failure in debug tbbmalloc binaries when TBBMALLOC_CLEAN_ALL_BUFFERS is used. - Add reproducible.patch to not add build hostname+kernel to binary - Update to version 2017_20170412 release * Added a blocking terminate extension to the task_scheduler_init class that allows an object to wait for termination of worker threads. - Add missing include files boo#1034842 - Update to 2017_20170226 release * Added support for C++11 move semantics in parallel_do. * Constructors for many classes, including graph nodes, concurrent containers, thread-local containers, etc., are declared explicit and cannot be used for implicit conversions anymore. * Added a workaround for bug 16657 in the GNU C Library (glibc) affecting the debug version of tbb::mutex. * Fixed a crash in pool_identify() called for an object allocated in another thread. - Update to 2017_20161128 release * Added template class gfx_factory to the flow graph API. It implements the Factory concept for streaming_node to offload computations to Intel processor graphics. * Fixed a possible deadlock caused by missed wakeup signals in task_arena::execute(). - Update to version 2017_20161004 * Fixed the issue with task_arena::execute() not being processed when the calling thread cannot join the arena. - Updated to version 2017_20160722 * static_partitioner class is now a fully supported feature. * async_node class is now a fully supported feature. * For 64-bit platforms, quadrupled the worst-case limit on the amount of memory the Intel TBB allocator can handle. * Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU libstdc++ when it cannot be properly recognized, e.g. when used with Clang on Linux* OS. Inspired by a contribution from David A. * Added graph/stereo example to demostrate tbb::flow::async_msg. * Removed a few cases of excessive user data copying in the flow graph. * Reworked split_node to eliminate unnecessary overheads. * Added support for C++11 move semantics to the argument of tbb::parallel_do_feeder::add() method. * Added C++11 move constructor and assignment operator to tbb::combinable template class. * Added tbb::this_task_arena::max_concurrency() function and max_concurrency() method of class task_arena returning the maximal number of threads that can work inside an arena. * Deprecated tbb::task_arena::current_thread_index() static method; use tbb::this_task_arena::current_thread_index() function instead. - License changed to Apache-2.0 - Please see included CHANGES file for all changes. - Update to version 44_20160526 * Added a Python module which is able to replace Python's thread pool class with the implementation based on Intel TBB task scheduler. * Fixed the implementation of 64-bit tbb::atomic for IA-32 architecture to work correctly with GCC 5.2 in C++11/14 mode. * Fixed a possible crash when tasks with affinity (e.g. specified via affinity_partitioner) are used simultaneously with task priority changes. - Update group, and description of tbbmalloc. - Update to version 44_20160128: * Lots of changes, see the CHANGES file. - Drop tbb-4.0-cas.patch, fixed upstream. - Update to version 41_20130116: * See CHANGES file for news. - Removed tbb package which included only doc files (moved them to tbb-devel). - Updated optflags.patch to make it apply correctly and also fix "File is compiled without RPM_OPT_FLAGS" rpm post build check warning. - Added a patch "tbb-4.0-cas.patch" to fix build on PowerPC (taken from Fedora). - Remove redundant tags/sections per specfile guideline suggestions - Parallel building using %_smp_mflags - Update to version tbb30_20110704 - Reimport from Andi Kleens directory. - update to 22_20090809oss, install machine/* includes - update to snapshot 21_20080825 (for details see CHANGES file in package) - remove obsolete patch tbb-build.patch - split off libtbb2 and libtbbmalloc2 subpackages - add ExclusiveArch - update to source version tbb20_20080408oss_src - fix buildrequires - initial package from version 2.0, source version tbb20_20080122oss_src OBS-URL: https://build.opensuse.org/request/show/1204404 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tbb?expand=0&rev=98 --- .gitattributes | 23 + .gitignore | 1 + _constraints | 8 + ...for-libatomic-requirement-when-build.patch | 38 ++ cmake-remove-include-path.patch | 13 + tbb-2021.12.0.tar.gz | 3 + tbb-2021.13.0.tar.gz | 3 + tbb-rpmlintrc | 2 + tbb.changes | 527 ++++++++++++++++++ tbb.spec | 312 +++++++++++ use-FORTIFY_SOURCE-from-distribution.patch | 11 + 11 files changed, 941 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 add-cmake-check-for-libatomic-requirement-when-build.patch create mode 100644 cmake-remove-include-path.patch create mode 100644 tbb-2021.12.0.tar.gz create mode 100644 tbb-2021.13.0.tar.gz create mode 100644 tbb-rpmlintrc create mode 100644 tbb.changes create mode 100644 tbb.spec create mode 100644 use-FORTIFY_SOURCE-from-distribution.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..de049ba --- /dev/null +++ b/_constraints @@ -0,0 +1,8 @@ + + + + 8000 + + 4 + + diff --git a/add-cmake-check-for-libatomic-requirement-when-build.patch b/add-cmake-check-for-libatomic-requirement-when-build.patch new file mode 100644 index 0000000..3535fb4 --- /dev/null +++ b/add-cmake-check-for-libatomic-requirement-when-build.patch @@ -0,0 +1,38 @@ +From faea2c59a95ff609d23a4e4f859edef83d02f417 Mon Sep 17 00:00:00 2001 +From: John Paul Adrian Glaubitz +Date: Fri, 9 Dec 2022 12:36:11 +0100 +Subject: [PATCH] Add cmake check for libatomic requirement when building with + gcc (#980) + +Signed-off-by: John Paul Adrian Glaubitz +--- + cmake/compilers/GNU.cmake | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +Index: oneTBB-2021.11.0/cmake/compilers/GNU.cmake +=================================================================== +--- oneTBB-2021.11.0.orig/cmake/compilers/GNU.cmake ++++ oneTBB-2021.11.0/cmake/compilers/GNU.cmake +@@ -42,6 +42,22 @@ endif() + + set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS}) + ++# Check whether code with full atomics can be built without libatomic ++# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 ++include(CheckCXXSourceCompiles) ++check_cxx_source_compiles("#include ++int main() { ++ std::atomic w1; ++ std::atomic w2; ++ std::atomic w4; ++ std::atomic w8; ++ return ++w1 + ++w2 + ++w4 + ++w8; ++}" TBB_BUILDS_WITHOUT_LIBATOMIC) ++ ++if(NOT TBB_BUILDS_WITHOUT_LIBATOMIC) ++ set(TBB_COMMON_LINK_LIBS ${TBB_COMMON_LINK_LIBS} atomic) ++endif() ++ + # Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled. + if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag) + tbb_remove_compile_flag(-Werror) diff --git a/cmake-remove-include-path.patch b/cmake-remove-include-path.patch new file mode 100644 index 0000000..1a5f18e --- /dev/null +++ b/cmake-remove-include-path.patch @@ -0,0 +1,13 @@ +Index: oneTBB-2021.11.0/cmake/templates/TBBConfig.cmake.in +=================================================================== +--- oneTBB-2021.11.0.orig/cmake/templates/TBBConfig.cmake.in ++++ oneTBB-2021.11.0/cmake/templates/TBBConfig.cmake.in +@@ -80,8 +80,6 @@ foreach (_tbb_component ${TBB_FIND_COMPO + add_library(TBB::${_tbb_component} SHARED IMPORTED) + + get_filename_component(_tbb_include_dir "${_tbb_root}/@TBB_INC_REL_PATH@" ABSOLUTE) +- set_target_properties(TBB::${_tbb_component} PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${_tbb_include_dir}"@TBB_COMPILE_DEFINITIONS@) + unset(_tbb_current_realpath) + unset(_tbb_include_dir) + diff --git a/tbb-2021.12.0.tar.gz b/tbb-2021.12.0.tar.gz new file mode 100644 index 0000000..a907ee3 --- /dev/null +++ b/tbb-2021.12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f +size 2617255 diff --git a/tbb-2021.13.0.tar.gz b/tbb-2021.13.0.tar.gz new file mode 100644 index 0000000..ed2d308 --- /dev/null +++ b/tbb-2021.13.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3353772c2e257591e4e046d7458284b327fb3a5c4a64129553d1b5ba89b7aa2d +size 2724433 diff --git a/tbb-rpmlintrc b/tbb-rpmlintrc new file mode 100644 index 0000000..3a18a87 --- /dev/null +++ b/tbb-rpmlintrc @@ -0,0 +1,2 @@ +# loaded with ctypes by python package +addFilter("explicit-lib-dependency libirml1") \ No newline at end of file diff --git a/tbb.changes b/tbb.changes new file mode 100644 index 0000000..9d9fe05 --- /dev/null +++ b/tbb.changes @@ -0,0 +1,527 @@ +------------------------------------------------------------------- +Wed Sep 25 19:40:22 UTC 2024 - Alessandro de Oliveira Faria + +- Update to version 2021.13.0: + * Extended the parallel_reduce and parallel_deterministic_reduce functional form APIs to better support rvalues reduction (GitHub* #1299). + * Removed use-FORTIFY_SOURCE-from-distribution patch, because of MATCHES "_FORTIFY_SOURCE" condition on line 75 + +------------------------------------------------------------------- +Fri Apr 19 03:16:09 UTC 2024 - Alessandro de Oliveira Faria + +- Update to version 2021.12.0: + * Fixed parallel_for_each algorithm behavior for iterators defining + iterator_concept trait instead of iterator_category. + * Fixed the incorrect binary search order in TBBConfig.cmake. + +------------------------------------------------------------------- +Thu Jan 25 16:31:59 UTC 2024 - Ana Guerrero + +- Fix build to handle changes in (open)SUSE specific cmake macros, + no user visible changes + +------------------------------------------------------------------- +Fri Dec 1 08:24:32 UTC 2023 - Atri Bhattacharya + +- Update to version 2021.11.0: + * Fixed tbb::this_task_arena() behavior for specific + tbb::task_arena{1,0}. + * Restored performance on the high-core count systems that + support _tpause. +- Refresh patches to apply cleanly: + * use-FORTIFY_SOURCE-from-distribution.patch + * add-cmake-check-for-libatomic-requirement-when-build.patch +- Update Summary and description tags to be consistent with + upstream's TBB -> oneTBB renaming. + +------------------------------------------------------------------- +Thu Nov 23 09:53:18 UTC 2023 - Bernhard Wiedemann + +- Avoid stuck build/tests + +------------------------------------------------------------------- +Tue Aug 1 19:25:15 UTC 2023 - Martin Liška + +* Add use-FORTIFY_SOURCE-from-distribution.patch and use FS settings from distribution +(we use either =2 or =3). + +------------------------------------------------------------------- +Tue Aug 1 01:27:35 UTC 2023 - Alessandro de Oliveira Faria + +- Update to 2021.10.0: + * Since C++17, parallel algorithms and Flow Graph nodes are allowed to accept + pointers to the member functions and member objects as the user-provided + callables. + * Added missed member functions, such as assignment operators and swap function, + to the concurrent_queue and concurrent_bounded_queue containers. + +------------------------------------------------------------------- +Thu Jun 15 08:34:01 UTC 2023 - Paolo Stivanin + +- Update to 2021.9.0: + * Hybrid CPU support is now a fully supported feature. + * Fixed the issue reported by the Address Sanitizer. + * Fixed the input_type alias exposed by flow_graph::join_node. +- Drop 917.patch (patch was upstreamed). +- Drop retry-pthread_create.patch (upstream fixed it by using a similar + approach). + +------------------------------------------------------------------- +Wed Jan 4 20:08:08 UTC 2023 - John Paul Adrian Glaubitz + +- Update to v2021.8.0 + * Fixed oneapi::tbb::concurrent_bounded_queue::pop return type (GitHub* #807). + * Fixed oneapi::tbb::concurrent_queue and oneapi::tbb::concurrent_bounded_queue + with non-default constructible value types (GitHub* #885). + * Fixed incorrect splitting of iteration space in case there is no + support for proportional splitting in custom ranges. +- Add patch to link against libatomic where necessary + * add-cmake-check-for-libatomic-requirement-when-build.patch +- Drop 5cb212d44732947396abdd39eae1229c7cd51644.patch, merged upstream +- Use correct changelog entries for v2021.7.0 + +------------------------------------------------------------------- +Sun Dec 11 18:37:06 UTC 2022 - Dirk Müller + +- update to v2021.7.0: + * Memory allocator crash when allocating ~1TB on 64-bit systems (GitHub* #838). + * Thread Distribution over NUMA Nodes on Windows OS systems. + * For oneapi::tbb::suspend it is now guaranteed that the user-specified + callable object is executed by the calling thread. + +------------------------------------------------------------------- +Sat Sep 24 12:16:41 UTC 2022 - Dirk Müller + +- update to 2021.6.0: + * Improved support and use of the latest C++ standards for parallel_sort that + allows using this algorithm with user-defined and standard library-defined + objects with modern semantics. + * The following features are now fully functional: task_arena extensions, + collaborative_call_once, adaptive mutexes, heterogeneous overloads for + concurrent_hash_map, and task_scheduler_handle. + * Added support for Windows* Server 2022 and Python 3.10. + * Memory allocator crash on a system with an incomplete /proc/meminfo + * Incorrect blocking of task stealing + * Hang due to incorrect decrement of a limiter_node + * Memory corruption in some rare cases when passing big messages in a flow graph + * Possible deadlock in a throwable flow graph node with a lightweight policy. + The lightweight policy is now ignored for functors that can throw + exceptions + * Crash when obtaining a range from empty ordered and unordered containers + * Deadlock in a concurrent_vector resize() that could happen when the new + size is less than the previous size +- drop tbb-pr609-32bit-mwaitpkg.patch (upstream) +- add 5cb212d44732947396abdd39eae1229c7cd51644.patch, 917.patch: + build on riscv64, hppa, s390x + +------------------------------------------------------------------- +Fri Aug 5 19:04:35 UTC 2022 - Martin Liška + +- Add retry-pthread_create.patch that fixes + gh#oneapi-src/oneTBB#824. + +------------------------------------------------------------------- +Sat May 7 12:51:47 UTC 2022 - Dirk Müller + +- update to 2021.1.5: + * Reworked synchronization mechanism to reduce contention when multiple + task_arena’s are used concurrently. + * Fixed sporadic memory corruption. + * Enabled Microsoft Visual Studio* 2022 and Python 3.9 support. + * Extended task_group interface with a new run_and_wait overload to accept + task_handle. + * Fixed possible correctness issue in queuing_rw_mutex on non-Intel platforms. + * Fixed sporadic memory corruption. + +------------------------------------------------------------------- +Tue Apr 5 14:34:05 UTC 2022 - Atri Bhattacharya + +- For 32-bit systems, rename tbb32.pc (default upstream for + 32-bit) to tbb.pc (same as 64-bit) so that applications + depending on tbb do not have to call different pkgconfig modules + based on arch. + +------------------------------------------------------------------- +Fri Oct 8 08:11:54 UTC 2021 - Ben Greiner + +- Allow gcc11 +- Add tbb-pr609-32bit-mwaitpkg.patch gh#oneapi-src/oneTBB#609 + * fixes 32-bit build with gcc11 +- Only run ctest when --with test is given + +------------------------------------------------------------------- +Tue Oct 5 09:41:04 UTC 2021 - Ben Greiner + +- Update to version 2021.4 + * Large release notes since 2020.3: + https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-threading-building-blocks-release-notes.html +- Drop python2 package +- Drop patches: + * disable-irml.patch -- install the library + * optflags.patch -- build system change + * reproducible.patch -- build system change +- Refresh cmake-remove-include-path.patch +- Add libirml subpackage for python module +- Add libtbbbind library package for NUMA support + +------------------------------------------------------------------- +Fri Dec 25 11:10:11 UTC 2020 - Benjamin Greiner + +- Rework the building of python bindings + * Fix egg info version + * Remove shebang lines + * fix lining issue by setting TBBROOT and tbbvars in install phase + * Run python tests with irml library built (but not installed) + * Build bindings packages for all existing python3 flavors + gh#openSUSE/python-rpm-macros#66 + +------------------------------------------------------------------- +Mon Aug 3 05:52:53 UTC 2020 - Ismail Dönmez + +- Update to version 2020.3 + * Changed body type concept of the flow::input_node. + Set TBB_DEPRECATED_INPUT_NODE_BODY to 1 to compile with the previous + concept of the body type. + * Fixed compilation errors in C++20 mode due to ambiguity of comparison + operators. Inspired by Barry Revzin + (https://github.com/oneapi-src/oneTBB/pull/251). + * Fixed an issue in TBBBuild.cmake that causes the build with no arguments + to fail (https://github.com/oneapi-src/oneTBB/pull/233) + +------------------------------------------------------------------- +Mon Mar 30 15:50:42 UTC 2020 - Ismail Dönmez + +- Update to version 2020.2 + * Cross-allocator copying constructor and copy assignment operator + for concurrent_vector are deprecated. + * Added input_node to the flow graph API. It acts like a source_node + except for being inactive by default; source_node is deprecated. + * Allocator template parameter for flow graph nodes is deprecated. Set + TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to 1 to avoid compilation errors. + * Flow graph preview hetero-features are deprecated. + * Fixed the task affinity mechanism to prevent unlimited memory + consumption in case the number of threads is explicitly decreased. + * Fixed memory leak related NUMA support functionality in task_arena. + +------------------------------------------------------------------- +Tue Jan 21 15:25:51 UTC 2020 - Ismail Dönmez + +- Update to version 2020.1 + * Fixed the issue of task_arena constraints not propagated on + copy construction. + * Fixed TBBGet.cmake script broken by TBB package name changes + (https://github.com/intel/tbb/issues/209). + +------------------------------------------------------------------- +Wed Dec 18 16:28:51 UTC 2019 - Ismail Dönmez + +- Update to version 2020.0 + * Extended task_arena interface to simplify development of + NUMA-aware applications. + * Added warning notifications when the deprecated functionality is + used. + +------------------------------------------------------------------- +Thu Oct 10 12:45:32 UTC 2019 - Ismail Dönmez + +- Update to version 2019_u9 + * Multiple APIs are deprecated. For details, please see + Deprecated Features appendix in the TBB reference manual. + * Added C++17 deduction guides for flow graph nodes. + + Preview Features + * Added isolated_task_group class that allows multiple threads to add + and execute tasks sharing the same isolation. + * Extended the flow graph API to simplify connecting nodes. + * Added erase() by heterogeneous keys for concurrent ordered containers. + * Added a possibility to suspend task execution at a specific point + and resume it later. + + Bugs fixed + * Fixed the emplace() method of concurrent unordered containers to + destroy a temporary element that was not inserted. + * Fixed a bug in the merge() method of concurrent unordered + containers. + * Fixed behavior of a continue_node that follows buffering nodes. + * Added support for move-only types to tbb::parallel_pipeline + * Fixed detection of clang version when CUDA toolkit is installed +- Refresh patches: + * cmake-remove-include-path.patch + * disable-irml.patch + * optflags.patch + +------------------------------------------------------------------- +Fri Jun 7 10:44:30 UTC 2019 - Ismail Dönmez + +- Add cmake-remove-include-path.patch to remove setting include + path since we already install under /usr/include and this fixes + idiot OpenCV trying to do -isystem $TBB_INCLUDE_DIR + +------------------------------------------------------------------- +Thu Jun 6 12:22:31 UTC 2019 - Ismail Dönmez + +- Update to version 2019_U8 + * Fixed a bug in TBB 2019 Update 7 that could lead to incorrect memory + reallocation on Linux (https://github.com/intel/tbb/issues/148). + * Fixed enqueuing tbb::task into tbb::task_arena not to fail on threads + with no task scheduler initialized + (https://github.com/intel/tbb/issues/116). + +------------------------------------------------------------------- +Tue Jun 4 14:54:09 UTC 2019 - Ismail Dönmez + +- Update to version 2019_U7 + * Added TBBMALLOC_SET_HUGE_SIZE_THRESHOLD parameter to set the + lower bound for allocations that are not released back to OS + unless a cleanup is explicitly requested. + * Added zip_iterator::base() method to get the tuple of underlying + iterators. + * Improved async_node to never block a thread that sends a message + through its gateway. + * Extended decrement port of the tbb::flow::limiter_node to accept + messages of integral types. + * Removed the number_of_decrement_predecessors parameter from the + constructor of flow::limiter_node. To allow its usage, set + TBB_DEPRECATED_LIMITER_NODE_CONSTRUCTOR macro to 1. + * Added ordered associative containers: + concurrent_{map,multimap,set,multiset} (requires C++11). + +------------------------------------------------------------------- +Tue May 14 07:53:56 UTC 2019 - Ismail Dönmez + +- Update to version 2019_U6 + * Added support for enqueuing tbb::task into tbb::task_arena + (https://github.com/01org/tbb/issues/116). + * Improved support for allocator propagation on concurrent_hash_map + assigning and swapping. + * Improved scalable_allocation_command cleanup operations to release + more memory buffered by the calling thread. + * Separated allocation of small and large objects into distinct memory + regions, which helps to reduce excessive memory caching inside the + TBB allocator. +- Disable python2 support + +------------------------------------------------------------------- +Thu Apr 25 07:56:20 UTC 2019 - Ismail Dönmez + +- Update to version 2019_U5 + * Too many changes to list, please see the included CHANGES file. +- Install TBBConfig*.cmake + +------------------------------------------------------------------- +Fri Aug 24 04:10:21 UTC 2018 - bwiedemann@suse.com + +- Extend reproducible.patch to not capture build kernel version (boo#1101107) + +------------------------------------------------------------------- +Wed Aug 1 04:32:27 UTC 2018 - bwiedemann@suse.com + +- Extend reproducible.patch to override build date (boo#1047218) + +------------------------------------------------------------------- +Mon Jan 8 09:41:48 UTC 2018 - tchvatal@suse.com + +- Add conditions to build with py2 and py3 respectively in order + to allow us disable one based on codestream + +------------------------------------------------------------------- +Thu Dec 21 12:20:59 UTC 2017 - idonmez@suse.com + +- Add disable-irml.patch to disable linking to libirml +- Actually update to tarball to 2018_U2 release + +------------------------------------------------------------------- +Sat Dec 16 15:29:08 UTC 2017 - idonmez@suse.com + +- Update to version 2018_U2 + * lambda-friendly overloads for parallel_scan. + * support of static and simple partitioners in + parallel_deterministic_reduce. + * initial support for Flow Graph Analyzer to do parallel_for. + * reservation support in overwrite_node and write_once_node. + * Fixed a potential deadlock scenario in the flow graph that + affected Intel® TBB 2018 Initial Release. + * Fixed constructors of concurrent_hash_map to be exception-safe. + * Fixed auto-initialization in the main thread to be cleaned up at shutdown. + * Fixed a crash when tbbmalloc_proxy is used together with dbghelp. + * Fixed static_partitioner to assign tasks properly in case of nested parallelism. + +------------------------------------------------------------------- +Wed Nov 1 17:31:14 UTC 2017 - mpluskal@suse.com + +- Build python2 and python3 bindings +- Do not bundle python bindings with shared library + +------------------------------------------------------------------- +Thu Sep 21 12:03:27 UTC 2017 - idonmez@suse.com + +- Update to version 2018 release + * Now fully supports this_task_arena::isolate() function. + * Parallel STL, an implementation of the C++ standard library + algorithms with support for execution policies, has been + introduced. + * Fixed a bug preventing use of streaming_node and opencl_node + with Clang. + * Fixed this_task_arena::isolate() function to work correctly + with parallel_invoke and parallel_do algorithms. + * Fixed a memory leak in composite_node. + * Fixed an assertion failure in debug tbbmalloc binaries when + TBBMALLOC_CLEAN_ALL_BUFFERS is used. + +------------------------------------------------------------------- +Tue May 30 09:11:27 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to not add build hostname+kernel to binary + +------------------------------------------------------------------- +Wed May 24 12:21:12 UTC 2017 - idonmez@suse.com + +- Update to version 2017_20170412 release + * Added a blocking terminate extension to the task_scheduler_init + class that allows an object to wait for termination of worker + threads. + +------------------------------------------------------------------- +Wed Apr 19 08:07:44 UTC 2017 - idonmez@suse.com + +- Add missing include files boo#1034842 + +------------------------------------------------------------------- +Sun Mar 5 19:42:50 UTC 2017 - idonmez@suse.com + +- Update to 2017_20170226 release + * Added support for C++11 move semantics in parallel_do. + * Constructors for many classes, including graph nodes, concurrent + containers, thread-local containers, etc., are declared explicit + and cannot be used for implicit conversions anymore. + * Added a workaround for bug 16657 in the GNU C Library (glibc) + affecting the debug version of tbb::mutex. + * Fixed a crash in pool_identify() called for an object allocated in + another thread. + +------------------------------------------------------------------- +Mon Dec 12 09:04:36 UTC 2016 - idonmez@suse.com + +- Update to 2017_20161128 release + * Added template class gfx_factory to the flow graph API. It + implements the Factory concept for streaming_node to offload + computations to Intel processor graphics. + * Fixed a possible deadlock caused by missed wakeup signals in + task_arena::execute(). + +------------------------------------------------------------------- +Thu Nov 3 07:52:18 UTC 2016 - idonmez@suse.com + +- Update to version 2017_20161004 + * Fixed the issue with task_arena::execute() not being processed + when the calling thread cannot join the arena. + +------------------------------------------------------------------- +Sat Sep 17 13:02:18 UTC 2016 - idonmez@suse.com + +- Updated to version 2017_20160722 + * static_partitioner class is now a fully supported feature. + * async_node class is now a fully supported feature. + * For 64-bit platforms, quadrupled the worst-case limit on the amount + of memory the Intel TBB allocator can handle. + * Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU + libstdc++ when it cannot be properly recognized, e.g. when used + with Clang on Linux* OS. Inspired by a contribution from David A. + * Added graph/stereo example to demostrate tbb::flow::async_msg. + * Removed a few cases of excessive user data copying in the flow graph. + * Reworked split_node to eliminate unnecessary overheads. + * Added support for C++11 move semantics to the argument of + tbb::parallel_do_feeder::add() method. + * Added C++11 move constructor and assignment operator to + tbb::combinable template class. + * Added tbb::this_task_arena::max_concurrency() function and + max_concurrency() method of class task_arena returning the maximal + number of threads that can work inside an arena. + * Deprecated tbb::task_arena::current_thread_index() static method; + use tbb::this_task_arena::current_thread_index() function instead. +- License changed to Apache-2.0 +- Please see included CHANGES file for all changes. + +------------------------------------------------------------------- +Wed Jun 8 10:50:50 UTC 2016 - idonmez@suse.com + +- Update to version 44_20160526 + * Added a Python module which is able to replace Python's thread pool + class with the implementation based on Intel TBB task scheduler. + * Fixed the implementation of 64-bit tbb::atomic for IA-32 architecture + to work correctly with GCC 5.2 in C++11/14 mode. + * Fixed a possible crash when tasks with affinity (e.g. specified via + affinity_partitioner) are used simultaneously with task priority + changes. + +------------------------------------------------------------------- +Wed May 4 12:21:36 UTC 2016 - jengelh@inai.de + +- Update group, and description of tbbmalloc. + +------------------------------------------------------------------- +Wed May 4 10:53:51 UTC 2016 - idonmez@suse.com + +- Update to version 44_20160128: + * Lots of changes, see the CHANGES file. +- Drop tbb-4.0-cas.patch, fixed upstream. + +------------------------------------------------------------------- +Sun Feb 17 19:42:08 UTC 2013 - asterios.dramis@gmail.com + +- Update to version 41_20130116: + * See CHANGES file for news. +- Removed tbb package which included only doc files (moved them to tbb-devel). +- Updated optflags.patch to make it apply correctly and also fix "File is + compiled without RPM_OPT_FLAGS" rpm post build check warning. +- Added a patch "tbb-4.0-cas.patch" to fix build on PowerPC (taken from + Fedora). + +------------------------------------------------------------------- +Sun Jan 29 01:33:25 UTC 2012 - jengelh@medozas.de + +- Remove redundant tags/sections per specfile guideline suggestions +- Parallel building using %_smp_mflags + +------------------------------------------------------------------- +Sun Aug 14 23:35:15 UTC 2011 - crrodriguez@opensuse.org + +- Update to version tbb30_20110704 + +------------------------------------------------------------------- +Wed Sep 16 11:09:37 CEST 2009 - meissner@suse.de + +- Reimport from Andi Kleens directory. + +------------------------------------------------------------------- +Sat Sep 5 00:00:00 UTC 2009 - andi@firstfloor.org + +- update to 22_20090809oss, install machine/* includes + +------------------------------------------------------------------- +Thu Sep 11 00:00:00 UTC 2008 - skh@suse.de + +- update to snapshot 21_20080825 (for details see CHANGES file in + package) +- remove obsolete patch tbb-build.patch +- split off libtbb2 and libtbbmalloc2 subpackages + +------------------------------------------------------------------- +Wed Aug 13 00:00:00 UTC 2008 - ro@suse.de + +- add ExclusiveArch + +------------------------------------------------------------------- +Mon Apr 28 00:00:00 UTC 2008 - skh@suse.de + +- update to source version tbb20_20080408oss_src + +------------------------------------------------------------------- +Wed Feb 13 00:00:00 UTC 2008 - dmueller@suse.de + +- fix buildrequires + +------------------------------------------------------------------- +Fri Feb 8 00:00:00 UTC 2008 - skh@suse.de + +- initial package from version 2.0, source version + tbb20_20080122oss_src diff --git a/tbb.spec b/tbb.spec new file mode 100644 index 0000000..9bc5629 --- /dev/null +++ b/tbb.spec @@ -0,0 +1,312 @@ +# +# spec file for package tbb +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2023 Alessandro de Oliveira Faria (A.K.A. CABELO) +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define so_ver 12 +%define so_ver_malloc 2 +%define so_ver_irml 1 +%define so_ver_bind 3 +%if %{pkg_vcmp hwloc-devel >= 2.5} +%define tbbbind_suffix _2_5 +%else +%if %{pkg_vcmp hwloc-devel >= 2} +%define tbbbind_suffix _2_0 +%else +%define tbbbind_suffix %{nil} +%endif +%endif +# by default, don't compile all the tests +%bcond_with test + +%if 0%{suse_version} >= 1500 +%{?!python_module:%define python_module() python3-%{**}} +%bcond_without python3 +%define skip_python2 1 +%else +%bcond_with python3 +%endif +Name: tbb +Version: 2021.13.0 +Release: 0 +Summary: oneAPI Threading Building Blocks (oneTBB) +License: Apache-2.0 +Group: Development/Libraries/C and C++ +URL: https://oneapi-src.github.io/oneTBB/ +Source0: https://github.com/oneapi-src/oneTBB/archive/v%{version}.tar.gz#/tbb-%{version}.tar.gz +Source99: tbb-rpmlintrc +# PATCH-FIX-OPENSUSE cmake-remove-include-path.patch -- openCV include error +Patch2: cmake-remove-include-path.patch +Patch4: add-cmake-check-for-libatomic-requirement-when-build.patch +BuildRequires: cmake +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: hwloc-devel +%if %{with python3} +BuildRequires: %{python_module devel >= 3.5} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +BuildRequires: swig >= 3.0.6 +%endif +%if 0%{?suse_version} > 1500 +# if python multiflavor is available (Tumbleweed), use it to generate subpackages +%define python_subpackage_only 1 +%python_subpackages +%else +# unified defaults for the package file list +%define pycache_only %{nil} +%define python_sitearch %{python3_sitearch} +%define python_files() -n python3-%{**} +%endif + +%description +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +%package -n libtbb%{so_ver} +Summary: Threading Building Blocks (TBB) +Group: System/Libraries +Provides: %{name} = %{version} +Obsoletes: %{name} < %{version} + +%description -n libtbb%{so_ver} +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +This package provides the core shared library corresponding to oneTBB. + +%package -n libtbbmalloc%{so_ver_malloc} +Summary: Threading Building Blocks (TBB) +Group: System/Libraries +Provides: %{name} = %{version} +Obsoletes: %{name} < %{version} + +%description -n libtbbmalloc%{so_ver_malloc} +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +This package provides the oneTBB memory allocator shared library. + +%package -n libirml%{so_ver_irml} +Summary: Threading Building Blocks (TBB) - IPC Library +Group: System/Libraries + +%description -n libirml%{so_ver_irml} +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +This subpackage provides the library required in order to enable inter-process +(IPC) coordination between oneTBB schedulers for the oneTBB python module. + +%package -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} +Summary: NUMA support library for oneAPI Threading Building Blocks (oneTBB) +Group: System/Libraries + +%description -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +The NUMA support library for oneTBB. + +%if 0%{?python_subpackage_only} +%package -n python-%{name} +Summary: Python %{python_version} support for oneAPI Threading Building Blocks (oneTBB) +Group: Development/Languages/Python +Requires: libirml%{so_ver_irml} + +%description -n python-%{name} +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +This package contains python %{python_version} bindings for oneTBB. + +%else + +%package -n python3-%{name} +Summary: Python 3 support for oneAPI Threading Building Blocks (oneTBB) +Group: Development/Languages/Python +Requires: libirml%{so_ver_irml} + +%description -n python3-%{name} +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +This package contains python 3 bindings for oneAPI Threading Building Blocks +(oneTBB). +%endif + +%package devel +Summary: Development Files for oneAPI Threading Building Blocks (oneTBB) +Group: Development/Libraries/C and C++ +Requires: c++_compiler +Requires: libirml%{so_ver_irml} = %{version} +Requires: libtbb%{so_ver} = %{version} +Requires: libtbbbind%{tbbbind_suffix}-%{so_ver_bind} = %{version} +Requires: libtbbmalloc%{so_ver_malloc} = %{version} + +%description devel +oneTBB (previously known as TBB) is a flexible C++ library that simplifies the +work of adding parallelism to complex applications. The library lets you easily +write parallel programs that take full advantage of the multi-core performance. +oneTBB provides you with functions, interfaces, and classes to parallelize and +scale the code. + +This package contains the header files needed for development with oneTBB. + +%prep +%setup -q -n oneTBB-%{version} +%autopatch -p1 + +# fix python version +sed -i 's/version\s*="0.2"/version = "%{version}"/' python/setup.py +sed -i '1{/^#!.*env python/ d}' python/TBB.py python/tbb/*.py + +%build +# HWLOC: no automatic find on SLE-12 (older cmake) +# TBB_TEST: don't compile by default +# TBB4PY: use cmake build system to build libirml in the python tree +%cmake \ +%if 0%{suse_version} < 1500 + -DCMAKE_HWLOC_2_LIBRARY_PATH=%{_libdir}/libhwloc.so \ + -DCMAKE_HWLOC_2_INCLUDE_PATH=%{_includedir}/hwloc \ +%endif +%if ! %{with test} + -DTBB_TEST:BOOL=OFF \ +%endif +%if %{with python3} + -DTBB4PY_BUILD:BOOL=ON \ +%endif + +# Leap 15.2 encounters oom during compilation +%cmake_build \ +%if 0%{?sle_version} == 150200 + -j 4 +%endif + +source */vars.sh +cd .. + +# rebuild for every python flavor +%if %{with python3} +pushd python +%python_build +popd +%endif + +%install +# create empty python build dir (?) +mkdir -p build/python/build +%cmake_install + +source build/*/vars.sh + +%if %{with python3} +pushd python +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} +popd +%endif + +# we install it into the devel package docdir +rm -rf %{buildroot}%{_datadir}/doc/ + +# Rename tbb32.pc to tbb.pc (same as 64-bit) so that applications depending on tbb +# do not have to call different pkgconfig modules based on arch +test -f %{buildroot}%{_libdir}/pkgconfig/tbb32.pc && mv %{buildroot}%{_libdir}/pkgconfig/tbb32.pc %{buildroot}%{_libdir}/pkgconfig/tbb.pc + +%check +%if %{with test} +%ctest --exclude-regex python_test +%endif +# always test python modules, if they are built +%if %{with python3} +# avoid shuffling the existing build dir +mkdir python-test +pushd python-test +export LD_LIBRARY_PATH="%{buildroot}%{_libdir}" +%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} timeout 5m $python -m tbb test -v +popd +%endif + +%post -n libtbb%{so_ver} -p /sbin/ldconfig +%postun -n libtbb%{so_ver} -p /sbin/ldconfig +%post -n libtbbmalloc%{so_ver_malloc} -p /sbin/ldconfig +%postun -n libtbbmalloc%{so_ver_malloc} -p /sbin/ldconfig +%post -n libirml%{so_ver_irml} -p /sbin/ldconfig +%postun -n libirml%{so_ver_irml} -p /sbin/ldconfig +%post -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} -p /sbin/ldconfig +%postun -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} -p /sbin/ldconfig + +%files -n libtbb%{so_ver} +%{_libdir}/libtbb.so.%{so_ver}* + +%files -n libtbbmalloc%{so_ver_malloc} +%{_libdir}/libtbbmalloc.so.%{so_ver_malloc}* +%{_libdir}/libtbbmalloc_proxy.so.%{so_ver_malloc}* + +%files -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} +%{_libdir}/libtbbbind%{tbbbind_suffix}.so.%{so_ver_bind}* + +%files devel +%license LICENSE.txt +%doc README.md +%{_includedir}/tbb/ +%{_includedir}/oneapi/ +%{_libdir}/cmake/TBB +%{_libdir}/pkgconfig/tbb.pc +%{_libdir}/libtbb.so +%{_libdir}/libtbbmalloc.so +%{_libdir}/libtbbmalloc_proxy.so +%{_libdir}/libtbbbind%{tbbbind_suffix}.so +%if %{with python3} +%{_libdir}/libirml.so +%endif + +%if %{with python3} +%files -n libirml%{so_ver_irml} +%{_libdir}/libirml.so.%{so_ver_irml}* + +%files %{python_files %{name}} +%{python_sitearch}/tbb +%{python_sitearch}/TBB.py +%{python_sitearch}/TBB-*py3* +%{python_sitearch}/TBB-%{version}*-info +%pycache_only %{python_sitearch}/__pycache__/TBB* +%endif + +%changelog diff --git a/use-FORTIFY_SOURCE-from-distribution.patch b/use-FORTIFY_SOURCE-from-distribution.patch new file mode 100644 index 0000000..850d034 --- /dev/null +++ b/use-FORTIFY_SOURCE-from-distribution.patch @@ -0,0 +1,11 @@ +diff -uNr oneTBB-2021.12.0.orig/cmake/compilers/GNU.cmake oneTBB-2021.12.0/cmake/compilers/GNU.cmake +--- oneTBB-2021.12.0.orig/cmake/compilers/GNU.cmake 2024-02-13 08:49:20.000000000 -0300 ++++ oneTBB-2021.12.0/cmake/compilers/GNU.cmake 2024-04-19 03:55:56.178055557 -0300 +@@ -75,7 +75,6 @@ + if (NOT APPLE AND NOT MINGW) + set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now,-z,noexecstack) + endif() +-set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$>:-D_FORTIFY_SOURCE=2> ) + + + # TBB malloc settings