mupdf: actually build and install the shared libraries version#237199
mupdf: actually build and install the shared libraries version#237199delroth merged 1 commit intoNixOS:stagingfrom
Conversation
The current version of the derivation builds in shared libraries mode, but then the "shared" flag is not passed to the "make install" invocation. This causes "make install" to perform a whole second build from scratch, in static mode, and install this to $out instead. Instead pass shared=yes as part of the makeFlags -- this is basically the only thing that the "shared" build target does anyway, and I don't think there is a similar target for "make install". This issue was detected because the .pc shipped with mupdf doesn't work with the static libraries currently shipped (it doesn't include recursive dependencies like zlib).
|
Incidental closure size savings: |
|
I wonder how all those dependents consume mupdf if it was broken... |
The answer to that seems to be "via a dependency on cups-filters, which depends on the binaries only": The good news is that this means this PR should translate to a pretty nice closure size decrease on cups itself. |
|
Before: |
|
And for completion's sake, I built the commit from Oct 2020 which removed the previously used custom patch for shared libraries building (e13120b): So when dropping the custom patch and trying to use upstream's mechanism to use shared libraries, a regression was introduced and never noticed until now... :( |
|
Successfully created backport PR for |
|
Feel free to revert this commit, I didn't realize that so many people had written workarounds around what is an obvious bug in the derivation (it was literally unusable unless you went and duplicated all its build inputs into your own build inputs). Frankly I don't have that much motivation to clean up other people's mess. Thanks for tracking down these Hydra failures. If it had taken less than 2 weeks for a breakage to get noticed perhaps I'd still have some interest in fixing this, but I'm not about to dive back into this now. |
This reverts commit 3d4769a. This broke many packages; let's revert until that's resolved. #237199 (comment)
This reverts commit 3d4769a. This broke many packages; let's revert until that's resolved. #237199 (comment) (cherry picked from commit 597d5f8)
This reverts commit 3d4769a. This broke many packages; let's revert until that's resolved. NixOS#237199 (comment)
|
Second attempt at this PR is in #261113 (with all reverse regressions that I could (on aarch64-linux) find fixed) |
Description of changes
The current version of the derivation builds in shared libraries mode, but then the "shared" flag is not passed to the "make install" invocation. This causes "make install" to perform a whole second build from scratch, in static mode, and install this to $out instead.
Instead pass shared=yes as part of the makeFlags -- this is basically the only thing that the "shared" build target does anyway, and I don't think there is a similar target for "make install".
This issue was detected because the .pc shipped with mupdf doesn't work with the static libraries currently shipped (it doesn't include recursive dependencies like zlib).
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)