-
Notifications
You must be signed in to change notification settings - Fork 237
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
ENH Fix musl64 bzip2 #2176
ENH Fix musl64 bzip2 #2176
Conversation
@luispedro which nixpkgs verison are you using? I'm a bit confused as to the conditional check not holding. While I will say that I've encountered the same issue before. |
This is using the version of nixpkgs that is used by haskell.nix. The relevant code is sources = {
haskellNix = builtins.fetchTarball {
name = "haskell-nix-snap";
url = "https://github.com/input-output-hk/haskell.nix/archive/c689f01730e5b6c6c16d3947a15689569844c38c.tar.gz";
sha256 = "09lw2419a5dd9g0ja31hjfqf6d4bzcgr5mrqx0vrvlksmp7a1kzk";
};
};
haskellNix = import sources.haskellNix { };
# Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
pkgs = import
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
haskellNix.sources.nixpkgs-unstable
# These arguments passed to nixpkgs, include some patches and also
# the haskell.nix functionality itself as an overlay.
haskellNix.nixpkgsArgs; This works well for standard (dynamic link) packages, but is failing for static link (except when I add that patch) |
@luispedro after quite a bit of prodding this with @hamishmack, can you try building your static component with
instead of
Because (on x86_64-linux) musl can be dynamic it defaults to dynamic in nixpkgs, unless you explicitly request |
Thanks for the suggestion. I cannot get it to work, though:
does not exist: error: attribute 'pkgsStatic' in selection path 'projectCross.musl64.pkgsStatic.hsPkgs.NGLess.components.exes.ngless' not found There is |
This PR will revert #2117 I think maybe the cut-off version in #2117 was set to If you are using nixpkgs 23.05. Does changing:
to
Work? I think that might be the correct change. CC @jonringer |
We should fix that. For now you might need refactor your code to use
|
Should we deprecate |
Correct, at the time, the breaking change was on unstable roughly half way between releases. We can bump it now that 23.11 has been released. |
overlays/musl.nix
Outdated
@@ -9,6 +9,7 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({ | |||
zlib = prev.zlib.override { splitStaticOutput = false; }; | |||
|
|||
# and a few more packages that need their static libs explicitly enabled | |||
bzip2 = prev.bzip2.override { enableStatic = true; }; |
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.
now it's in both?
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.
Well //
would have replaced bzip2
, but I have refactored it to make it clearer and added a comment.
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.
LGTM
I think we need #2156 to fix the failing tests. |
I'm still super impressed by the granularity of your hydra CI 👀 |
you want it less granular? I with GH would allow filtering of succeeded/failed builds. Btw, all of our hydra modifications are open. The ci.zw3rk.com is still running the legacy from https://github.com/zw3rk/hydra-tools (just bare bones), |
I think he's maybe just impressed by the 5.7k derivations that get built 😂 |
I'm impressed that the number of checks scale in proportion to the downstream builds. Still stuck in docker-based CI land for other things 😢 |
2e2b43f
into
input-output-hk:master
Without this patch, I get build errors related to -lbz2 not being found when building NGLess in static mode: