Skip to content

pkgsStatic.onetbb: mark unsupported#471845

Merged
philiptaron merged 2 commits into
NixOS:masterfrom
shelvacu-forks:patch-static-nix
Dec 18, 2025
Merged

pkgsStatic.onetbb: mark unsupported#471845
philiptaron merged 2 commits into
NixOS:masterfrom
shelvacu-forks:patch-static-nix

Conversation

@shelvacu

@shelvacu shelvacu commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

oneTBB can't be staticly linked.

This obsoletes #468506

This isn't a breaking change; pkgsStatic.onetbb already failed to build.

This allows building staticly linked nix! nix build .#pkgsStatic.nix

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 18, 2025
@shelvacu

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review
Commit: 71dc2e7df310d90a3c738e423fdfc13b710a8d67


x86_64-linux

✅ 4 packages built:
  • nixStatic
  • nixStatic.dev
  • nixStatic.doc
  • nixStatic.man

@shelvacu shelvacu added the 6.topic: static Static builds (e.g. pkgsStatic) label Dec 18, 2025
@qzylinra

Copy link
Copy Markdown
Contributor

Perhaps only need to disable TBB_TEST and check.

@shelvacu

Copy link
Copy Markdown
Contributor Author

Perhaps only need to disable TBB_TEST and check.

I don't understand what you mean. Are there tests I can run? What's the command?

@uninsane uninsane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#468552

i'd prefer to rewrite the fix in a way that's eligible for master (i.e. condition the new flags behind isStatic, so as to fix it without triggering any rebuilds for most users), or wait for the next staging -> master merge

@uninsane uninsane dismissed their stale review December 18, 2025 04:41

uxlfoundation/oneTBB#1877

so it seems that linking onetbb statically is possible, but it exhibits different behavior such that applications are liable to crash unless they've specifically considered the case of being built against a static onetbb. so defaulting useTBB to false on static platforms seems like the right call.

setting badPlatforms on onetbb itself seems heavy-handed (that causes nix-build -A pkgsStatic.onetbb itself to complain, even though it can be used legitimately), but i can't think of any way to get better ergonomics that isn't significantly more involved.

so... this PR is at least a step in the right direction, i think

@philiptaron philiptaron added this pull request to the merge queue Dec 18, 2025
Merged via the queue into NixOS:master with commit 3fd88db Dec 18, 2025
35 of 38 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-25.11:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: static Static builds (e.g. pkgsStatic) 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants