Source: tbb,onetbb
Severity: important
Tags: patch

currently libtbb2 and libtbb12 break each other, making a tbb transition hard. please split out a libtbbmalloc2 package, both in tbb and onetbb, such that the transition can happen smoothly, and the both the old and the new tbb/onetbb can co-exist for a while.

patch for the tbb and onetbb splitouts are attached (please check the final versions for the breaks/replaces).

the onetbb patch also includes the patch from upstream issue #776 to build on other architectures.

For Ubuntu, I'm going to rename the old libtbb-dev and libtbb-doc packages to libtbb2-dev and libtbb2-doc, not sure if that's something you also want to do in Debian, but for the next Ubuntu release we need to ship both versions, or we need to remove packages like numba.
diff -Nru tbb-2020.3/debian/changelog tbb-2020.3/debian/changelog
--- tbb-2020.3/debian/changelog	2020-08-13 02:33:57.000000000 +0200
+++ tbb-2020.3/debian/changelog	2022-03-08 09:38:45.000000000 +0100
@@ -1,3 +1,10 @@
+tbb (2020.3-1ubuntu2) jammy; urgency=medium
+
+  * Split out a libtbbmalloc2 package.
+  * Mark some libtbbmalloc symbols as optional.
+
+ -- Matthias Klose <d...@ubuntu.com>  Tue, 08 Mar 2022 09:38:45 +0100
+
 tbb (2020.3-1) unstable; urgency=medium
 
   * New upstream version 2020.3
diff -Nru tbb-2020.3/debian/control tbb-2020.3/debian/control
--- tbb-2020.3/debian/control	2020-04-05 12:03:19.000000000 +0200
+++ tbb-2020.3/debian/control	2022-03-08 09:38:45.000000000 +0100
@@ -38,13 +38,32 @@
 Package: libtbb2
 Architecture: linux-any
 Multi-Arch: same
-Depends: ${shlibs:Depends},
+Depends: libtbbmalloc2, ${shlibs:Depends},
          ${misc:Depends}
 Pre-Depends: ${misc:Pre-Depends}
 Description: parallelism library for C++ - runtime files
  TBB is a library that helps you leverage multi-core processor
  performance without having to be a threading expert. It represents a
  higher-level, task-based parallelism that abstracts platform details
+ and threading mechanism for performance and scalability.
+ .
+ (Note: if you are a user of the i386 architecture, i.e., 32-bit Intel
+ or compatible hardware, this package only supports Pentium4-compatible
+ and higher processors.)
+ .
+ This package includes the TBB runtime files.
+
+Package: libtbbmalloc2
+Architecture: linux-any
+Multi-Arch: same
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Breaks: libtbb2 (<< 2020.3-1ubuntu2)
+Replaces: libtbb2 (<< 2020.3-1ubuntu2)
+Description: parallelism helper library for C++ - runtime files
+ TBB is a library that helps you leverage multi-core processor
+ performance without having to be a threading expert. It represents a
+ higher-level, task-based parallelism that abstracts platform details
  and threading mechanism for performance and scalability.
  .
  (Note: if you are a user of the i386 architecture, i.e., 32-bit Intel
diff -Nru tbb-2020.3/debian/libtbb2.install tbb-2020.3/debian/libtbb2.install
--- tbb-2020.3/debian/libtbb2.install	2020-04-03 04:45:37.000000000 +0200
+++ tbb-2020.3/debian/libtbb2.install	2022-03-08 09:38:45.000000000 +0100
@@ -1,2 +1,2 @@
 #! /usr/bin/dh-exec
-build/linux_*_release/lib*.so.*	usr/lib/${DEB_HOST_MULTIARCH}
+build/linux_*_release/libtbb.so.*	usr/lib/${DEB_HOST_MULTIARCH}
diff -Nru tbb-2020.3/debian/libtbb2.symbols.amd64 tbb-2020.3/debian/libtbb2.symbols.amd64
--- tbb-2020.3/debian/libtbb2.symbols.amd64	2020-08-11 05:52:00.000000000 +0200
+++ tbb-2020.3/debian/libtbb2.symbols.amd64	2022-03-08 09:38:45.000000000 +0100
@@ -298,65 +298,3 @@
  _ZTVN3tbb8internal21concurrent_queue_baseE@Base 2017~U7
  _ZTVN3tbb8internal24concurrent_queue_base_v3E@Base 2017~U7
  _ZTVN3tbb8pipelineE@Base 2017~U7
-libtbbmalloc.so.2 libtbb2 #MINVER#
- MallocInitializeITT@Base 2017~U7
- _Z9parseFileILi100ELi1EEvPKcRAT0__K13parseFileItem@Base 2018~U6
- _Z9parseFileILi100ELi2EEvPKcRAT0__K13parseFileItem@Base 2018~U6
- _ZN11MallocMutex11scoped_lockD1Ev@Base 2020.3
- _ZN11MallocMutex11scoped_lockD2Ev@Base 2020.3
- _ZN3rml10pool_msizeEPNS_10MemoryPoolEPv@Base 2019~U4
- _ZN3rml10pool_resetEPNS_10MemoryPoolE@Base 2017~U7
- _ZN3rml11pool_createElPKNS_13MemPoolPolicyE@Base 2017~U7
- _ZN3rml11pool_mallocEPNS_10MemoryPoolEm@Base 2017~U7
- _ZN3rml12pool_destroyEPNS_10MemoryPoolE@Base 2017~U7
- _ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm@Base 2017~U7
- _ZN3rml13pool_identifyEPv@Base 2017~U7
- _ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE@Base 2017~U7
- _ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm@Base 2017~U7
- _ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm@Base 2017~U7
- _ZN3rml9pool_freeEPNS_10MemoryPoolEPv@Base 2017~U7
- __TBB_malloc_safer_aligned_msize@Base 2017~U7
- __TBB_malloc_safer_aligned_realloc@Base 2017~U7
- __TBB_malloc_safer_free@Base 2017~U7
- __TBB_malloc_safer_msize@Base 2017~U7
- __TBB_malloc_safer_realloc@Base 2017~U7
- scalable_aligned_free@Base 2017~U7
- scalable_aligned_malloc@Base 2017~U7
- scalable_aligned_realloc@Base 2017~U7
- scalable_allocation_command@Base 2017~U7
- scalable_allocation_mode@Base 2017~U7
- scalable_calloc@Base 2017~U7
- scalable_free@Base 2017~U7
- scalable_malloc@Base 2017~U7
- scalable_msize@Base 2017~U7
- scalable_posix_memalign@Base 2017~U7
- scalable_realloc@Base 2017~U7
-libtbbmalloc_proxy.so.2 libtbb2 #MINVER#
- _ZdaPv@Base 2017~U7
- _ZdaPvRKSt9nothrow_t@Base 2017~U7
- _ZdlPv@Base 2017~U7
- _ZdlPvRKSt9nothrow_t@Base 2017~U7
- _Znam@Base 2017~U7
- _ZnamRKSt9nothrow_t@Base 2017~U7
- _Znwm@Base 2017~U7
- _ZnwmRKSt9nothrow_t@Base 2017~U7
- __TBB_malloc_proxy@Base 2017~U7
- __libc_calloc@Base 2017~U7
- __libc_free@Base 2017~U7
- __libc_malloc@Base 2017~U7
- __libc_memalign@Base 2017~U7
- __libc_pvalloc@Base 2017~U7
- __libc_realloc@Base 2017~U7
- __libc_valloc@Base 2017~U7
- aligned_alloc@Base 2017~U7
- calloc@Base 2017~U7
- free@Base 2017~U7
- mallinfo@Base 2017~U7
- malloc@Base 2017~U7
- malloc_usable_size@Base 2017~U7
- mallopt@Base 2017~U7
- memalign@Base 2017~U7
- posix_memalign@Base 2017~U7
- pvalloc@Base 2017~U7
- realloc@Base 2017~U7
- valloc@Base 2017~U7
diff -Nru tbb-2020.3/debian/libtbbmalloc2.install tbb-2020.3/debian/libtbbmalloc2.install
--- tbb-2020.3/debian/libtbbmalloc2.install	1970-01-01 01:00:00.000000000 +0100
+++ tbb-2020.3/debian/libtbbmalloc2.install	2022-03-08 09:38:45.000000000 +0100
@@ -0,0 +1,2 @@
+#! /usr/bin/dh-exec
+build/linux_*_release/libtbbmalloc*.so.*	usr/lib/${DEB_HOST_MULTIARCH}
diff -Nru tbb-2020.3/debian/libtbbmalloc2.symbols.amd64 tbb-2020.3/debian/libtbbmalloc2.symbols.amd64
--- tbb-2020.3/debian/libtbbmalloc2.symbols.amd64	1970-01-01 01:00:00.000000000 +0100
+++ tbb-2020.3/debian/libtbbmalloc2.symbols.amd64	2022-03-08 09:38:45.000000000 +0100
@@ -0,0 +1,62 @@
+libtbbmalloc.so.2 libtbbmalloc2 #MINVER#
+ MallocInitializeITT@Base 2017~U7
+ _Z9parseFileILi100ELi1EEvPKcRAT0__K13parseFileItem@Base 2018~U6
+ _Z9parseFileILi100ELi2EEvPKcRAT0__K13parseFileItem@Base 2018~U6
+ (optional)_ZN11MallocMutex11scoped_lockD1Ev@Base 2020.3
+ (optional)_ZN11MallocMutex11scoped_lockD2Ev@Base 2020.3
+ _ZN3rml10pool_msizeEPNS_10MemoryPoolEPv@Base 2019~U4
+ _ZN3rml10pool_resetEPNS_10MemoryPoolE@Base 2017~U7
+ _ZN3rml11pool_createElPKNS_13MemPoolPolicyE@Base 2017~U7
+ _ZN3rml11pool_mallocEPNS_10MemoryPoolEm@Base 2017~U7
+ _ZN3rml12pool_destroyEPNS_10MemoryPoolE@Base 2017~U7
+ _ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm@Base 2017~U7
+ _ZN3rml13pool_identifyEPv@Base 2017~U7
+ _ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE@Base 2017~U7
+ _ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm@Base 2017~U7
+ _ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm@Base 2017~U7
+ _ZN3rml9pool_freeEPNS_10MemoryPoolEPv@Base 2017~U7
+ __TBB_malloc_safer_aligned_msize@Base 2017~U7
+ __TBB_malloc_safer_aligned_realloc@Base 2017~U7
+ __TBB_malloc_safer_free@Base 2017~U7
+ __TBB_malloc_safer_msize@Base 2017~U7
+ __TBB_malloc_safer_realloc@Base 2017~U7
+ scalable_aligned_free@Base 2017~U7
+ scalable_aligned_malloc@Base 2017~U7
+ scalable_aligned_realloc@Base 2017~U7
+ scalable_allocation_command@Base 2017~U7
+ scalable_allocation_mode@Base 2017~U7
+ scalable_calloc@Base 2017~U7
+ scalable_free@Base 2017~U7
+ scalable_malloc@Base 2017~U7
+ scalable_msize@Base 2017~U7
+ scalable_posix_memalign@Base 2017~U7
+ scalable_realloc@Base 2017~U7
+libtbbmalloc_proxy.so.2 libtbbmalloc2 #MINVER#
+ _ZdaPv@Base 2017~U7
+ _ZdaPvRKSt9nothrow_t@Base 2017~U7
+ _ZdlPv@Base 2017~U7
+ _ZdlPvRKSt9nothrow_t@Base 2017~U7
+ _Znam@Base 2017~U7
+ _ZnamRKSt9nothrow_t@Base 2017~U7
+ _Znwm@Base 2017~U7
+ _ZnwmRKSt9nothrow_t@Base 2017~U7
+ __TBB_malloc_proxy@Base 2017~U7
+ __libc_calloc@Base 2017~U7
+ __libc_free@Base 2017~U7
+ __libc_malloc@Base 2017~U7
+ __libc_memalign@Base 2017~U7
+ __libc_pvalloc@Base 2017~U7
+ __libc_realloc@Base 2017~U7
+ __libc_valloc@Base 2017~U7
+ aligned_alloc@Base 2017~U7
+ calloc@Base 2017~U7
+ free@Base 2017~U7
+ mallinfo@Base 2017~U7
+ malloc@Base 2017~U7
+ malloc_usable_size@Base 2017~U7
+ mallopt@Base 2017~U7
+ memalign@Base 2017~U7
+ posix_memalign@Base 2017~U7
+ pvalloc@Base 2017~U7
+ realloc@Base 2017~U7
+ valloc@Base 2017~U7
diff -Nru onetbb-2021.5.0/debian/changelog onetbb-2021.5.0/debian/changelog
--- onetbb-2021.5.0/debian/changelog	2022-02-22 18:51:02.000000000 +0100
+++ onetbb-2021.5.0/debian/changelog	2022-03-08 09:55:56.000000000 +0100
@@ -1,3 +1,11 @@
+onetbb (2021.5.0-7ubuntu2) jammy; urgency=medium
+
+  * Split out a libtbbmalloc2 package.
+  * Mark some of the libtbbmalloc symbols as optional.
+  * Build for riscv64.
+
+ -- Matthias Klose <d...@ubuntu.com>  Tue, 08 Mar 2022 09:55:56 +0100
+
 onetbb (2021.5.0-7) experimental; urgency=medium
 
   * Remove fetchadd4-ia64-gcc.patch: generic fallback invalid for IA64.
diff -Nru onetbb-2021.5.0/debian/control onetbb-2021.5.0/debian/control
--- onetbb-2021.5.0/debian/control	2022-02-13 19:04:05.000000000 +0100
+++ onetbb-2021.5.0/debian/control	2022-03-08 09:55:56.000000000 +0100
@@ -41,15 +41,34 @@
 Package: libtbb12
 Architecture: linux-any
 Multi-Arch: same
-Depends: ${shlibs:Depends},
+Depends: libtbbmalloc2 (= ${binary:Version}),
+         ${shlibs:Depends},
          ${misc:Depends}
 Pre-Depends: ${misc:Pre-Depends}
-Breaks: libtbb2 (<< 2021)
-Replaces: libtbb2 (<< 2021)
 Description: parallelism library for C++ - runtime files
  TBB is a library that helps you leverage multi-core processor
  performance without having to be a threading expert. It represents a
  higher-level, task-based parallelism that abstracts platform details
+ and threading mechanism for performance and scalability.
+ .
+ (Note: if you are a user of the i386 architecture, i.e., 32-bit Intel
+ or compatible hardware, this package only supports Pentium4-compatible
+ and higher processors.)
+ .
+ This package includes the TBB runtime files.
+
+Package: libtbbmalloc2
+Architecture: linux-any
+Multi-Arch: same
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Breaks: libtbb2 (<< 2020.3-1ubuntu2), libtbb12 (<< 2021.5-7ubuntu2)
+Replaces: libtbb2 (<< 2020.3-1ubuntu2), libtbb12 (<< 2021.5-7ubuntu2)
+Description: parallelism helper library for C++ - runtime files
+ TBB is a library that helps you leverage multi-core processor
+ performance without having to be a threading expert. It represents a
+ higher-level, task-based parallelism that abstracts platform details
  and threading mechanism for performance and scalability.
  .
  (Note: if you are a user of the i386 architecture, i.e., 32-bit Intel
diff -Nru onetbb-2021.5.0/debian/libtbb12.install onetbb-2021.5.0/debian/libtbb12.install
--- onetbb-2021.5.0/debian/libtbb12.install	2022-02-13 19:04:05.000000000 +0100
+++ onetbb-2021.5.0/debian/libtbb12.install	2022-03-08 09:55:56.000000000 +0100
@@ -1 +1 @@
-usr/lib/*/lib*.so.*
+usr/lib/*/libtbb.so.*
diff -Nru onetbb-2021.5.0/debian/libtbbmalloc2.install onetbb-2021.5.0/debian/libtbbmalloc2.install
--- onetbb-2021.5.0/debian/libtbbmalloc2.install	1970-01-01 01:00:00.000000000 +0100
+++ onetbb-2021.5.0/debian/libtbbmalloc2.install	2022-03-08 09:55:56.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/*/libtbbmalloc*.so.*
diff -Nru onetbb-2021.5.0/debian/libtbbmalloc2.symbols.amd64 onetbb-2021.5.0/debian/libtbbmalloc2.symbols.amd64
--- onetbb-2021.5.0/debian/libtbbmalloc2.symbols.amd64	1970-01-01 01:00:00.000000000 +0100
+++ onetbb-2021.5.0/debian/libtbbmalloc2.symbols.amd64	2022-03-08 09:55:56.000000000 +0100
@@ -0,0 +1,62 @@
+libtbbmalloc.so.2 libtbbmalloc2 #MINVER#
+ MallocInitializeITT@Base 2017~U7
+ (optional)_Z9parseFileILi100ELi1EEvPKcRAT0__K13parseFileItem@Base 2018~U6
+ (optional)_Z9parseFileILi100ELi2EEvPKcRAT0__K13parseFileItem@Base 2018~U6
+ (optional)_ZN11MallocMutex11scoped_lockD1Ev@Base 2020.3
+ (optional)_ZN11MallocMutex11scoped_lockD2Ev@Base 2020.3
+ _ZN3rml10pool_msizeEPNS_10MemoryPoolEPv@Base 2019~U4
+ _ZN3rml10pool_resetEPNS_10MemoryPoolE@Base 2017~U7
+ _ZN3rml11pool_createElPKNS_13MemPoolPolicyE@Base 2017~U7
+ _ZN3rml11pool_mallocEPNS_10MemoryPoolEm@Base 2017~U7
+ _ZN3rml12pool_destroyEPNS_10MemoryPoolE@Base 2017~U7
+ _ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm@Base 2017~U7
+ _ZN3rml13pool_identifyEPv@Base 2017~U7
+ _ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE@Base 2017~U7
+ _ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm@Base 2017~U7
+ _ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm@Base 2017~U7
+ _ZN3rml9pool_freeEPNS_10MemoryPoolEPv@Base 2017~U7
+ __TBB_malloc_safer_aligned_msize@Base 2017~U7
+ __TBB_malloc_safer_aligned_realloc@Base 2017~U7
+ __TBB_malloc_safer_free@Base 2017~U7
+ __TBB_malloc_safer_msize@Base 2017~U7
+ __TBB_malloc_safer_realloc@Base 2017~U7
+ scalable_aligned_free@Base 2017~U7
+ scalable_aligned_malloc@Base 2017~U7
+ scalable_aligned_realloc@Base 2017~U7
+ scalable_allocation_command@Base 2017~U7
+ scalable_allocation_mode@Base 2017~U7
+ scalable_calloc@Base 2017~U7
+ scalable_free@Base 2017~U7
+ scalable_malloc@Base 2017~U7
+ scalable_msize@Base 2017~U7
+ scalable_posix_memalign@Base 2017~U7
+ scalable_realloc@Base 2017~U7
+libtbbmalloc_proxy.so.2 libtbbmalloc2 #MINVER#
+ _ZdaPv@Base 2017~U7
+ _ZdaPvRKSt9nothrow_t@Base 2017~U7
+ _ZdlPv@Base 2017~U7
+ _ZdlPvRKSt9nothrow_t@Base 2017~U7
+ _Znam@Base 2017~U7
+ _ZnamRKSt9nothrow_t@Base 2017~U7
+ _Znwm@Base 2017~U7
+ _ZnwmRKSt9nothrow_t@Base 2017~U7
+ __TBB_malloc_proxy@Base 2017~U7
+ __libc_calloc@Base 2017~U7
+ __libc_free@Base 2017~U7
+ __libc_malloc@Base 2017~U7
+ __libc_memalign@Base 2017~U7
+ __libc_pvalloc@Base 2017~U7
+ __libc_realloc@Base 2017~U7
+ __libc_valloc@Base 2017~U7
+ aligned_alloc@Base 2017~U7
+ calloc@Base 2017~U7
+ free@Base 2017~U7
+ mallinfo@Base 2017~U7
+ malloc@Base 2017~U7
+ malloc_usable_size@Base 2017~U7
+ mallopt@Base 2017~U7
+ memalign@Base 2017~U7
+ posix_memalign@Base 2017~U7
+ pvalloc@Base 2017~U7
+ realloc@Base 2017~U7
+ valloc@Base 2017~U7
diff -Nru onetbb-2021.5.0/debian/patches/776.diff onetbb-2021.5.0/debian/patches/776.diff
--- onetbb-2021.5.0/debian/patches/776.diff	1970-01-01 01:00:00.000000000 +0100
+++ onetbb-2021.5.0/debian/patches/776.diff	2022-03-08 08:36:46.000000000 +0100
@@ -0,0 +1,24 @@
+https://github.com/oneapi-src/oneTBB/issues/776
+
+--- a/src/tbb/tools_api/ittnotify_config.h
++++ b/src/tbb/tools_api/ittnotify_config.h
+@@ -167,6 +167,10 @@
+ #  define ITT_ARCH_HPPA  8
+ #endif /* ITT_ARCH_HPPA */
+ 
++#ifndef ITT_ARCH_GENERIC
++#  define ITT_ARCH_GENERIC 99
++#endif /* ITT_ARCH_GENERIC */
++
+ #ifndef ITT_ARCH
+ #  if defined _M_IX86 || defined __i386__
+ #    define ITT_ARCH ITT_ARCH_IA32
+@@ -184,6 +188,8 @@
+ #    define ITT_ARCH ITT_ARCH_S390X
+ #  elif defined __hppa__
+ #    define ITT_ARCH ITT_ARCH_HPPA
++#  else
++#    define ITT_ARCH ITT_ARCH_GENERIC
+ #  endif
+ #endif
+ 
diff -Nru onetbb-2021.5.0/debian/patches/series onetbb-2021.5.0/debian/patches/series
--- onetbb-2021.5.0/debian/patches/series	2022-02-20 02:58:20.000000000 +0100
+++ onetbb-2021.5.0/debian/patches/series	2022-03-08 08:35:31.000000000 +0100
@@ -4,3 +4,4 @@
 fetchadd4.patch
 link-atomic.patch
 test-less-stress.patch
+776.diff

Reply via email to