-
Notifications
You must be signed in to change notification settings - Fork 86
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
Current bzip2-sys fails to build with current crane #411
Comments
Switch to |
Are you sure? In the docs it says that "installCargoArtifactsMode will be set to "use-zstd" if not specified." |
This occurs for many libraries at the moment - |
Oh. I thought |
I see, thanks for the additional info! I think that maybe the docs are outdated? I will try it when I have time. |
I'm building openssl in our project every day with |
Here's my reproduction (forked from ISibboI): https://github.com/newAM/crane-bug Have you updated |
@ISibboI this only applies to using |
Thanks @ipetkov ! I updated the flake. Now I am getting the following error: Error log
|
The build script for
|
My first recommendation is to submit a fix for it upstream. My second recommendation (which I hesitate to suggest due to performance penalties) is documented here: https://github.com/ipetkov/crane/blob/581245bf1233d6f621ce3b6cb99224a948c3a37f/docs/faq/sandbox-unfriendly-build-scripts.md |
Thanks! It seems though that the destination of the copy is inside Unless the first argument of fs::copy is the destination? |
Hmm good catch I read the script too fast 🤔 Maybe the Maybe the script should create a symlink to the file instead of copying it... |
Are you building on MacOS or Linux? There are differences in mode preserving behavior between the too (it's basically a bug). |
I am building on Linux. |
|
Thanks, I did that now. What seems to be happening is that the file already exists. May be a problem with the unwanted rebuilds? Anyways, here is the state:
Since it has no write permissions, it probably cannot be overwritten. Maybe the build directory requires a umask that makes all files created in there rwx for everyone? Or at least the artifacts that are copied in before the build starts should be chmodded to ugo+rwx? Edit: Adding the fix for #370 did not help. It builds fine in the buildDepsOnly phase, but fails when rebuilding in the buildPackage phase. Still the same issue. |
Okay, I have a proposal. Here and here, crane sets chmod u+w. But not when Anyways, I will try this out, and make a pull request. |
I don't like changing the permissions. There's a possibility it will cause more problems elsewhere. Are all files This suggest that you are doing a rebuild of this package in the first place, so the root solution would be to fix that. A patch to upstream to |
Symlink mode is doing |
Should I make a separate issue for that? Since I don't like using the complete sandbox, but would hope that with |
Using raw
Not what you want.
should be in |
I disabled everything unnecessary and added:
Then I get:
|
Amazing, thanks @dpc ! Now my build works without rebuilds, even in the more complex project that I created this example from! Thank you so much! |
Interesting, have we narrowed it down to what might be causing the issue? FWIW I did see |
I think |
I created a minimal example here (execute
nix build
in the repo): https://github.com/ISibboI/crane-bug/tree/03ab836782e10dce38425b3c644c9b564b47d729Here is what happens:
The text was updated successfully, but these errors were encountered: