-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opencv4: cuda: fix libstdc++ errors downstream, plus upkeep #265070
Conversation
@@ -37,7 +37,7 @@ | |||
, blas | |||
, enableContrib ? true | |||
|
|||
, enableCuda ? config.cudaSupport && stdenv.hostPlatform.isx86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I dropped this without thinking. Why do we ignore config
on non-x86_64 in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.cudaSupport can be true and cudatoolkit doesn't work with i686,
which can happen inside pkgsi686Linux wrapping.
OK, so this wasn't about aarch64 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, why would anyone set config.cudaSupport = true
on an i686 device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should move this to a separate commit though
i686 isn't in the meta.platforms for cudaPackages anyway
5aa2b1f
to
866daf5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff LGTM!
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1207 |
Description of changes
Closes #258327
Adds a test for and fixes the following libstdc++ mismatch error:
...observed when importing
cv2
(built with cuda support and the older nvcc-compatible gcc) before importing a native python extension from nixpkgs (which uses the newer libstdc++) like so: https://github.com/iago-suarez/pytlsd/blob/81e0fee35f1fdaf546ec73c71ad3ed488c8ee83b/tests/tests.py#L3-L7The test passes for the opencv3 attribute because it's just built with the newer gcc(12). I decided not to touch it further, but my expectation is that
opencv3
with CUDA will start failing once we bump gcc.The tests can be run as follows:
You can check out the first commit and verify that
opencv4.no-libstdcxx-errors
fails until it's updated in the next commitIn the longer run we should kill
backendStdenv
and instead implement #226165Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)@NixOS/cuda-maintainers