-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
python3Packages.pyopencl: fix build #56082
Conversation
Why are both needed? That seems a bit weird. |
|
||
propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ]; | ||
propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako pybind11 ]; |
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.
The Python pybind11
should go into nativeBuildInputs
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.
No, wait, this is non-native because it will be linked to, so buildInputs
. @dotlambda seems we have a case here where setup_requires
does not map to nativeBuildInputs
.
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.
But shouldn't that linking be covered by pkgs.pybind11
? Maybe it's our pybind11 packaging that needs fixing.
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.
The Python version of the package essentially has the same data, the headers. We have to use the Python version because it's added in setup_requires
, but other then that, we should be able to use any of the two in buildInputs
.
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 see. How about we just patch it out of setup_requires
?
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.
@Ma27 pybind11
should be moved to buildInputs
, shouldn't it?
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.
you're right. Updated the patch accordingly.
WIthout
If I get this right, we want to patch the |
Correct. |
Hmm I'm afraid that this isn't that easy: we need
Admittedly I'm not that experienced with the |
That probably comes from https://github.com/inducer/pyopencl/blob/0faf48a10edd086c783f794a6decdf85e8dc625b/aksetup_helper.py#L894. We'd need to patch that function to return |
I see. If @FRidh prefers the latter solution you proposed, I'd implement this, otherwise I'd vote for merging this :) |
|
Cross-referencing #56826 (the build is broken on the new release as well). |
See also pybind/pybind11#1426 for a request to fix get_include. |
@Ma27 we might use that PR as a patch. |
@FRidh applied the |
It seems as the `pybind11` build code returns the Python headers directory (where the `pybind11` headers are stored as well on traditional setups) rather than returning the dedicated prefix[1]. An exemplary fallout is the broken build of `pyopencl`[2]. [1] pybind/pybind11#1425 [2] NixOS#56082
@dotlambda anything else to do? :) |
Fix the recently broken build by adding `pybind11` to the build. Also set $HOME to a temporary directory during the build to avoid "Permission denied" errors in the build script. This also unbreaks `sasview` and `pybitmessage`. See also NixOS#56826 See also https://hydra.nixos.org/build/89037506
It seems as the `pybind11` build code returns the Python headers directory (where the `pybind11` headers are stored as well on traditional setups) rather than returning the dedicated prefix[1]. An exemplary fallout is the broken build of `pyopencl`[2]. [1] pybind/pybind11#1425 [2] #56082 (cherry picked from commit 94c3ac2)
Motivation for this change
Fix the recently broken build by adding
pybind11
andpkgs.pybind11
to the build. Also set $HOME to a temporary directory during the build
to avoid "Permission denied" errors in the build script.
This also unbreaks
sasview
andpybitmessage
.See also https://hydra.nixos.org/build/89037506
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)