diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index 929b169a254d3..dd149014ae990 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -27,7 +27,7 @@ opencascade-occt_7_6_1, openvdb, qhull, - tbb_2021, + tbb_2022, wxGTK32, xorg, libbgcode, @@ -54,7 +54,7 @@ let hash = "sha256-WNdAYu66ggpSYJ8Kt57yEA4mSTv+Rvzj9Rm1q765HpY="; }; }); - openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021; }; + openvdb_tbb_2022 = openvdb.override { tbb = tbb_2022; }; wxGTK-override' = if wxGTK-override == null then wxGTK32 else wxGTK-override; opencascade-override' = if opencascade-override == null then opencascade-occt_7_6_1 else opencascade-override; @@ -122,9 +122,9 @@ stdenv.mkDerivation (finalAttrs: { nanosvg-fltk nlopt opencascade-override' - openvdb_tbb_2021_8 + openvdb_tbb_2022 qhull - tbb_2021 + tbb_2022 wxGTK-override' xorg.libX11 libbgcode diff --git a/pkgs/by-name/au/autotier/package.nix b/pkgs/by-name/au/autotier/package.nix index bf044574432b0..ffd7a0679cd93 100644 --- a/pkgs/by-name/au/autotier/package.nix +++ b/pkgs/by-name/au/autotier/package.nix @@ -8,7 +8,7 @@ boost, fuse3, lib45d, - tbb_2021, + tbb_2022, liburing, installShellFiles, }: @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { boost fuse3 lib45d - tbb_2021 + tbb_2022 liburing ]; diff --git a/pkgs/by-name/ba/bambu-studio/package.nix b/pkgs/by-name/ba/bambu-studio/package.nix index 6a0b15c2e750a..4efb631789db6 100644 --- a/pkgs/by-name/ba/bambu-studio/package.nix +++ b/pkgs/by-name/ba/bambu-studio/package.nix @@ -34,7 +34,7 @@ opencv, pcre, systemd, - tbb_2021, + tbb_2022, webkitgtk_4_1, wxGTK31, xorg, @@ -101,7 +101,7 @@ stdenv.mkDerivation (finalAttrs: { opencascade-occt_7_6 openvdb pcre - tbb_2021 + tbb_2022 webkitgtk_4_1 wxGTK' xorg.libX11 diff --git a/pkgs/by-name/bl/blender/package.nix b/pkgs/by-name/bl/blender/package.nix index e2606a869b682..972b702ce6638 100644 --- a/pkgs/by-name/bl/blender/package.nix +++ b/pkgs/by-name/bl/blender/package.nix @@ -257,7 +257,7 @@ stdenv'.mkDerivation (finalAttrs: { libsndfile libtiff libwebp - (manifold.override { tbb_2021 = tbb; }) + manifold opencolorio openexr openimageio diff --git a/pkgs/by-name/ca/cabinpkg/package.nix b/pkgs/by-name/ca/cabinpkg/package.nix index 31d35851dcf8a..d8144db6aa423 100644 --- a/pkgs/by-name/ca/cabinpkg/package.nix +++ b/pkgs/by-name/ca/cabinpkg/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - tbb_2021, + tbb_2022, libgit2, curl, fmt, @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { buildInputs = [ libgit2 fmt - tbb_2021 + tbb_2022 nlohmann_json curl ]; diff --git a/pkgs/by-name/li/libblake3/package.nix b/pkgs/by-name/li/libblake3/package.nix index ec149e70c6960..ada016a4383e0 100644 --- a/pkgs/by-name/li/libblake3/package.nix +++ b/pkgs/by-name/li/libblake3/package.nix @@ -4,7 +4,7 @@ cmake, fetchFromGitHub, fetchpatch, - tbb_2021, + tbb_2022, useTBB ? true, }: @@ -45,8 +45,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; propagatedBuildInputs = lib.optionals useTBB [ - # 2022.0 crashes on macOS at the moment - tbb_2021 + tbb_2022 ]; cmakeFlags = [ diff --git a/pkgs/by-name/li/libloot/package.nix b/pkgs/by-name/li/libloot/package.nix index c73045bca47ef..898b59d43b1f7 100644 --- a/pkgs/by-name/li/libloot/package.nix +++ b/pkgs/by-name/li/libloot/package.nix @@ -18,7 +18,7 @@ gtest, icu, spdlog, - tbb_2021, + tbb_2022, yaml-cpp, }: @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { gtest icu (spdlog.override { fmt = fmt_11; }) - tbb_2021 + tbb_2022 finalAttrs.passthru.yaml-cpp # has merge-key support finalAttrs.passthru.libloadorder diff --git a/pkgs/by-name/ma/manifold/package.nix b/pkgs/by-name/ma/manifold/package.nix index 50c41e0bbdf9a..10a3dd62ae49c 100644 --- a/pkgs/by-name/ma/manifold/package.nix +++ b/pkgs/by-name/ma/manifold/package.nix @@ -6,7 +6,7 @@ clipper2, gtest, glm, - tbb_2021, + tbb_2022, python3Packages, }: @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ gtest glm - tbb_2021 + tbb_2022 ]; propagatedBuildInputs = [ clipper2 ]; @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { - tbb = tbb_2021; + tbb = tbb_2022; tests = { python = python3Packages.manifold3d; }; diff --git a/pkgs/by-name/mo/mold/package.nix b/pkgs/by-name/mo/mold/package.nix index 9a74b99d55a46..ebba33550537e 100644 --- a/pkgs/by-name/mo/mold/package.nix +++ b/pkgs/by-name/mo/mold/package.nix @@ -127,7 +127,6 @@ stdenv.mkDerivation (finalAttrs: { changelog = "https://github.com/rui314/mold/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; platforms = lib.platforms.unix; - broken = stdenv.hostPlatform.isDarwin; mainProgram = "mold"; maintainers = with lib.maintainers; [ azahi ]; }; diff --git a/pkgs/by-name/na/naja/package.nix b/pkgs/by-name/na/naja/package.nix index 2995a40892673..9dcf95e287526 100644 --- a/pkgs/by-name/na/naja/package.nix +++ b/pkgs/by-name/na/naja/package.nix @@ -11,7 +11,7 @@ pkg-config, python3, sphinx, - tbb_2021, + tbb_2022, buildPackages, nix-update-script, }: @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { boost capnproto # cmake modules flex # include dir - tbb_2021 + tbb_2022 python3 ]; diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix index 763b957d7835c..b8c2e79c6b3ed 100644 --- a/pkgs/by-name/or/orca-slicer/package.nix +++ b/pkgs/by-name/or/orca-slicer/package.nix @@ -34,7 +34,7 @@ opencv, pcre, systemd, - tbb_2021, + tbb_2022, webkitgtk_4_1, wxGTK31, xorg, @@ -111,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: { opencascade-occt_7_6 openvdb pcre - tbb_2021 + tbb_2022 webkitgtk_4_1 wxGTK' xorg.libX11 diff --git a/pkgs/by-name/pd/pdf4qt/package.nix b/pkgs/by-name/pd/pdf4qt/package.nix index 174140744327a..94b114e535bf2 100644 --- a/pkgs/by-name/pd/pdf4qt/package.nix +++ b/pkgs/by-name/pd/pdf4qt/package.nix @@ -8,7 +8,7 @@ qt6, wrapGAppsHook3, openjpeg, - tbb_2021, + tbb_2022, blend2d, }: @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { qt6.qtspeech lcms openjpeg - tbb_2021 + tbb_2022 blend2d ]; diff --git a/pkgs/by-name/sa/salmon/package.nix b/pkgs/by-name/sa/salmon/package.nix index 0d2250c77f072..8cc252a4ba825 100644 --- a/pkgs/by-name/sa/salmon/package.nix +++ b/pkgs/by-name/sa/salmon/package.nix @@ -13,7 +13,7 @@ libiconv, libstaden-read, pkg-config, - tbb_2021, + tbb_2022, xz, zlib, }: @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { jemalloc libgff libstaden-read - tbb_2021 + tbb_2022 xz zlib ] diff --git a/pkgs/by-name/sc/scipopt-papilo/package.nix b/pkgs/by-name/sc/scipopt-papilo/package.nix index ea38ed196a9a4..71c1daf2189aa 100644 --- a/pkgs/by-name/sc/scipopt-papilo/package.nix +++ b/pkgs/by-name/sc/scipopt-papilo/package.nix @@ -6,7 +6,7 @@ boost, blas, gmp, - tbb_2021, + tbb_2022, gfortran, }: @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { gmp gfortran boost - tbb_2021 + tbb_2022 ]; cmakeFlags = [ diff --git a/pkgs/by-name/sc/scipopt-scip/package.nix b/pkgs/by-name/sc/scipopt-scip/package.nix index f6a2efe88a67c..0665343dd0896 100644 --- a/pkgs/by-name/sc/scipopt-scip/package.nix +++ b/pkgs/by-name/sc/scipopt-scip/package.nix @@ -11,7 +11,7 @@ scipopt-papilo, scipopt-zimpl, ipopt, - tbb_2021, + tbb_2022, boost, gfortran, criterion, @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { gmp readline zlib - tbb_2021 + tbb_2022 boost gfortran criterion diff --git a/pkgs/by-name/su/supercell-wx/package.nix b/pkgs/by-name/su/supercell-wx/package.nix index 76e9b05dc7b0a..2a6c1aa148f65 100644 --- a/pkgs/by-name/su/supercell-wx/package.nix +++ b/pkgs/by-name/su/supercell-wx/package.nix @@ -24,7 +24,7 @@ gtest, glm, qt6, - tbb_2021, + tbb_2022, tracy, replaceVars, python3, @@ -130,7 +130,7 @@ stdenv.mkDerivation (finalAttrs: { aws-sdk-cpp howard-hinnant-date boost - tbb_2021 + tbb_2022 glew geos spdlog diff --git a/pkgs/by-name/tb/tbb_2021/package.nix b/pkgs/by-name/tb/tbb_2021/package.nix deleted file mode 100644 index 6b6b57cda1454..0000000000000 --- a/pkgs/by-name/tb/tbb_2021/package.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - fetchpatch, - cmake, - ninja, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "tbb"; - version = "2021.12.0"; - - outputs = [ - "out" - "dev" - ]; - - src = fetchFromGitHub { - owner = "oneapi-src"; - repo = "oneTBB"; - tag = "v${finalAttrs.version}"; - hash = "sha256-yG/Fs+3f9hNKzZ8le+W7+JDZk9hMzPsVAzbq0yTcUTc="; - }; - - nativeBuildInputs = [ - cmake - ninja - ]; - - patches = [ - # Fix musl build from https://github.com/oneapi-src/oneTBB/pull/899 - (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch"; - hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU="; - }) - # Fix tests on FreeBSD and Windows - (fetchpatch { - name = "fix-tbb-freebsd-and-windows-tests.patch"; - url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch"; - hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4="; - }) - # Fix 32-bit PowerPC build - (fetchpatch { - url = "https://github.com/uxlfoundation/oneTBB/pull/987/commits/c828ae47b8f4bea7736d2f9d05460e2b529c9d7d.patch"; - hash = "sha256-faNiVdHRIkmavufDHQQ8vHppvdahZ7yhJVL3bOwNTFg="; - }) - ]; - - patchFlags = [ - "-p1" - "--ignore-whitespace" - ]; - - # Fix build with modern gcc - # In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]', - NIX_CFLAGS_COMPILE = - lib.optionals stdenv.cc.isGNU [ - "-Wno-error=array-bounds" - "-Wno-error=stringop-overflow" - ] - ++ - # error: variable 'val' set but not used - lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ] - ++ - # Workaround for gcc-12 ICE when using -O3 - # https://gcc.gnu.org/PR108854 - lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isx86_32) [ "-O2" ]; - - # Fix undefined reference errors with version script under LLVM. - NIX_LDFLAGS = lib.optionalString ( - stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17" - ) "--undefined-version"; - - # Disable failing test on musl - # test/conformance/conformance_resumable_tasks.cpp:37:24: error: ‘suspend’ is not a member of ‘tbb::v1::task’; did you mean ‘tbb::detail::r1::suspend’? - postPatch = lib.optionalString stdenv.hostPlatform.isMusl '' - substituteInPlace test/CMakeLists.txt \ - --replace-fail 'tbb_add_test(SUBDIR conformance NAME conformance_resumable_tasks DEPENDENCIES TBB::tbb)' "" - ''; - - enableParallelBuilding = true; - - meta = { - description = "Intel Thread Building Blocks C++ Library"; - homepage = "http://threadingbuildingblocks.org/"; - license = lib.licenses.asl20; - longDescription = '' - Intel Threading Building Blocks offers a rich and complete approach to - expressing parallelism in a C++ program. It is a library that helps you - take advantage of multi-core processor performance without having to be a - threading expert. Intel TBB is not just a threads-replacement library. It - represents a higher-level, task-based parallelism that abstracts platform - details and threading mechanisms for scalability and performance. - ''; - platforms = lib.platforms.all; - maintainers = with lib.maintainers; [ - silvanshade - thoughtpolice - tmarkus - ]; - }; -}) diff --git a/pkgs/by-name/tb/tbb_2022/fix-32-bit-powerpc-build.patch b/pkgs/by-name/tb/tbb_2022/fix-32-bit-powerpc-build.patch new file mode 100644 index 0000000000000..7cc8216153d0e --- /dev/null +++ b/pkgs/by-name/tb/tbb_2022/fix-32-bit-powerpc-build.patch @@ -0,0 +1,38 @@ +From c828ae47b8f4bea7736d2f9d05460e2b529c9d7d 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(+) + +diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake +index cd76acfe1e..59f4e6934f 100644 +--- a/cmake/compilers/GNU.cmake ++++ b/cmake/compilers/GNU.cmake +@@ -44,6 +44,22 @@ if (NOT MINGW) + set(TBB_COMMON_LINK_LIBS dl) + endif() + ++# 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/pkgs/by-name/tb/tbb_2022/fix-libtbbmalloc-dlopen.patch b/pkgs/by-name/tb/tbb_2022/fix-libtbbmalloc-dlopen.patch new file mode 100644 index 0000000000000..e7377b36ef2e0 --- /dev/null +++ b/pkgs/by-name/tb/tbb_2022/fix-libtbbmalloc-dlopen.patch @@ -0,0 +1,69 @@ +From 791d42ddacad829d19a4f66b77dc9ca410008db9 Mon Sep 17 00:00:00 2001 +From: Emily +Date: Sat, 13 Sep 2025 03:16:16 +0100 +Subject: [PATCH] Use `dladdr` to keep `libtbbmalloc` loaded on POSIX + +This fixes issues that arise when `libtbbmalloc` cannot be loaded by +relative path, makes the behaviour consistent with the Windows code +path, and eliminates the duplication of `MALLOCLIB_NAME`. +--- + src/tbbmalloc/tbbmalloc.cpp | 34 +++++++++------------------------- + 1 file changed, 9 insertions(+), 25 deletions(-) + +diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp +index b72e03a74f..12d62445aa 100644 +--- a/src/tbbmalloc/tbbmalloc.cpp ++++ b/src/tbbmalloc/tbbmalloc.cpp +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2005-2023 Intel Corporation ++ Copyright (c) 2005-2025 Intel Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. +@@ -32,25 +32,6 @@ + namespace rml { + namespace internal { + +-#if TBB_USE_DEBUG +-#define DEBUG_SUFFIX "_debug" +-#else +-#define DEBUG_SUFFIX +-#endif /* TBB_USE_DEBUG */ +- +-// MALLOCLIB_NAME is the name of the oneTBB memory allocator library. +-#if _WIN32||_WIN64 +-#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll" +-#elif __APPLE__ +-#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".2.dylib" +-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ +-#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so" +-#elif __unix__ +-#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.2) +-#else +-#error Unknown OS +-#endif +- + void init_tbbmalloc() { + #if __TBB_USE_ITT_NOTIFY + MallocInitializeITT(); +@@ -92,11 +73,14 @@ struct RegisterProcessShutdownNotification { + RegisterProcessShutdownNotification() { + // prevents unloading, POSIX case + +- // We need better support for the library pinning +- // when dlopen can't find TBBmalloc library. +- // for example: void *ret = dlopen(MALLOCLIB_NAME, RTLD_NOW); +- // MALLOC_ASSERT(ret, "Allocator can't load itself."); +- dlopen(MALLOCLIB_NAME, RTLD_NOW); ++ Dl_info dlinfo; ++ int ret = dladdr((void*)&init_tbbmalloc, &dlinfo); ++ MALLOC_ASSERT(ret && dlinfo.dli_fname, "Allocator can't find itself."); ++ tbb::detail::suppress_unused_warning(ret); ++ ++ void* lib = dlopen(dlinfo.dli_fname, RTLD_NOW); ++ MALLOC_ASSERT(lib, "Allocator can't load itself."); ++ tbb::detail::suppress_unused_warning(lib); + } + + RegisterProcessShutdownNotification(RegisterProcessShutdownNotification&) = delete; diff --git a/pkgs/by-name/tb/tbb_2022/fix-musl-build.patch b/pkgs/by-name/tb/tbb_2022/fix-musl-build.patch new file mode 100644 index 0000000000000..5a6700a86a240 --- /dev/null +++ b/pkgs/by-name/tb/tbb_2022/fix-musl-build.patch @@ -0,0 +1,24 @@ +From 493774eb57f9c424fc8907d137665e687861ad94 Mon Sep 17 00:00:00 2001 +From: Ismael Luceno +Date: Fri, 9 Sep 2022 16:18:18 +0200 +Subject: [PATCH] Fix build against musl libc + +Probably MALLOC_UNIXLIKE_OVERLOAD_ENABLED only works with glibc, so use +__GLIBC__ in addition to __linux__ to define it. +--- + src/tbbmalloc_proxy/proxy.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tbbmalloc_proxy/proxy.h b/src/tbbmalloc_proxy/proxy.h +index 5f0133f9e0..ba1a07c396 100644 +--- a/src/tbbmalloc_proxy/proxy.h ++++ b/src/tbbmalloc_proxy/proxy.h +@@ -17,7 +17,7 @@ + #ifndef _TBB_malloc_proxy_H_ + #define _TBB_malloc_proxy_H_ + +-#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__ ++#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED (__linux__ && __GLIBC__) + #define MALLOC_ZONE_OVERLOAD_ENABLED __APPLE__ + + // MALLOC_UNIXLIKE_OVERLOAD_ENABLED depends on MALLOC_CHECK_RECURSION stuff diff --git a/pkgs/by-name/tb/tbb_2022/package.nix b/pkgs/by-name/tb/tbb_2022/package.nix index af24d66d1fdef..807ca45e90380 100644 --- a/pkgs/by-name/tb/tbb_2022/package.nix +++ b/pkgs/by-name/tb/tbb_2022/package.nix @@ -2,14 +2,14 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, cmake, ninja, + ctestCheckHook, }: stdenv.mkDerivation (finalAttrs: { pname = "tbb"; - version = "2022.1.0"; + version = "2022.2.0"; outputs = [ "out" @@ -20,52 +20,39 @@ stdenv.mkDerivation (finalAttrs: { owner = "oneapi-src"; repo = "oneTBB"; tag = "v${finalAttrs.version}"; - hash = "sha256-DqJkNlC94cPJSXnhyFcEqWYGCQPunMfIfb05UcFGynw="; + hash = "sha256-ASQPAGm5e4q7imvTVWlmj5ON4fGEao1L5m2C5wF7EhI="; }; + patches = [ + # + ./fix-musl-build.patch + + # + ./fix-32-bit-powerpc-build.patch + + # Fix an assumption that `libtbbmalloc` can pass a relative path to + # `dlopen(3)` to find itself. This caused mysterious crashes on + # macOS, where we do not use run paths by default. + # + # + ./fix-libtbbmalloc-dlopen.patch + ]; + nativeBuildInputs = [ cmake ninja + ctestCheckHook ]; - patches = [ - # Fix musl build from https://github.com/oneapi-src/oneTBB/pull/899 - (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch"; - hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU="; - }) - # Fix tests on FreeBSD and Windows - (fetchpatch { - name = "fix-tbb-freebsd-and-windows-tests.patch"; - url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch"; - hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4="; - }) - # Fix 32-bit PowerPC build - (fetchpatch { - url = "https://github.com/uxlfoundation/oneTBB/pull/987/commits/c828ae47b8f4bea7736d2f9d05460e2b529c9d7d.patch"; - hash = "sha256-faNiVdHRIkmavufDHQQ8vHppvdahZ7yhJVL3bOwNTFg="; - }) - ]; + doCheck = true; - # Fix build with modern gcc - # In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]', - NIX_CFLAGS_COMPILE = - lib.optionals stdenv.cc.isGNU [ - "-Wno-error=array-bounds" - "-Wno-error=stringop-overflow" - ] - ++ - # error: variable 'val' set but not used - lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ] - ++ - # Workaround for gcc-12 ICE when using -O3 - # https://gcc.gnu.org/PR108854 - lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isx86_32) [ "-O2" ]; + dontUseNinjaCheck = true; - # Fix undefined reference errors with version script under LLVM. - NIX_LDFLAGS = lib.optionalString ( - stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17" - ) "--undefined-version"; + # The memory leak test fails on static Linux, despite passing on + # dynamic Musl. + disabledTests = lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [ + "test_arena_constraints" + ]; # Disable failing test on musl # test/conformance/conformance_resumable_tasks.cpp:37:24: error: ‘suspend’ is not a member of ‘tbb::v1::task’; did you mean ‘tbb::detail::r1::suspend’? @@ -74,7 +61,16 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'tbb_add_test(SUBDIR conformance NAME conformance_resumable_tasks DEPENDENCIES TBB::tbb)' "" ''; - enableParallelBuilding = true; + env = { + # Fix build with modern gcc + # In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]', + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=stringop-overflow"; + + # Fix undefined reference errors with version script under LLVM. + NIX_LDFLAGS = lib.optionalString ( + stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17" + ) "--undefined-version"; + }; meta = { description = "Intel Thread Building Blocks C++ Library"; diff --git a/pkgs/by-name/to/todds/package.nix b/pkgs/by-name/to/todds/package.nix index f6d0a9baca64f..9712ba56802e8 100644 --- a/pkgs/by-name/to/todds/package.nix +++ b/pkgs/by-name/to/todds/package.nix @@ -9,7 +9,7 @@ fmt, hyperscan, opencv, - tbb_2021, + tbb_2022, fetchFromGitHub, }: stdenv.mkDerivation (finalAttrs: { @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { fmt hyperscan opencv - tbb_2021 + tbb_2022 ]; strictDeps = true; diff --git a/pkgs/by-name/ue/ueberzugpp/package.nix b/pkgs/by-name/ue/ueberzugpp/package.nix index 8cf7a044fbf6d..419f16eb7c4d1 100644 --- a/pkgs/by-name/ue/ueberzugpp/package.nix +++ b/pkgs/by-name/ue/ueberzugpp/package.nix @@ -7,7 +7,7 @@ openssl, zeromq, cppzmq, - tbb_2021, + tbb_2022, spdlog, libsodium, fmt, @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { openssl zeromq cppzmq - tbb_2021 + tbb_2022 spdlog libsodium fmt diff --git a/pkgs/development/libraries/embree/2.x.nix b/pkgs/development/libraries/embree/2.x.nix index 6ec8f1040769d..d8adcf7df8a2c 100644 --- a/pkgs/development/libraries/embree/2.x.nix +++ b/pkgs/development/libraries/embree/2.x.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ ispc - # tbb_2021 is not backward compatible + # tbb_2022 is not backward compatible tbb_2020 glfw openimageio diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e3f64a8458c08..21ce3e841052a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -2323,6 +2323,7 @@ mapAliases { taplo-lsp = taplo; # Added 2022-07-30 targetcli = targetcli-fb; # Added 2025-03-14 taro = taproot-assets; # Added 2023-07-04 + tbb_2021 = throw "tbb_2021 has been removed because it is unmaintained upstream and had no remaining users; use tbb_2022"; # Added 2025-09-13 tcl-fcgi = tclPackages.tcl-fcgi; # Added 2024-10-02 tclcurl = tclPackages.tclcurl; # Added 2024-10-02 tcllib = tclPackages.tcllib; # Added 2024-10-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aadbbeac1b37a..2d888141b13c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -283,7 +283,7 @@ with pkgs; cve = with python3Packages; toPythonApplication cvelib; basalt-monado = callPackage ../by-name/ba/basalt-monado/package.nix { - tbb = tbb_2021; + tbb = tbb_2022; cereal = cereal_1_3_2; opencv = opencv.override { enableGtk3 = true; }; }; @@ -6878,7 +6878,7 @@ with pkgs; ikos = callPackage ../development/tools/analysis/ikos { inherit (llvmPackages_14) stdenv clang llvm; - tbb = tbb_2021; + tbb = tbb_2022; }; include-what-you-use = callPackage ../development/tools/analysis/include-what-you-use { @@ -7348,7 +7348,7 @@ with pkgs; cctag = callPackage ../development/libraries/cctag { stdenv = clangStdenv; - tbb = tbb_2021; + tbb = tbb_2022; }; ceedling = callPackage ../development/tools/ceedling { };