Skip to content
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

e2fsprogs-1.44.4 fails to build under musl #46923

Closed
endgame opened this issue Sep 20, 2018 · 6 comments
Closed

e2fsprogs-1.44.4 fails to build under musl #46923

endgame opened this issue Sep 20, 2018 · 6 comments
Labels
6.topic: musl Running or building packages with musl libc

Comments

@endgame
Copy link
Contributor

endgame commented Sep 20, 2018

Issue description

Reported upstream by someone else at https://www.spinics.net/lists/linux-ext4/msg62290.html , essential information quoted here:

Commit fddc423dc6353 [in musl, not nixpkgs] (Fix compile error and warnings for old gcc versions) introduced usage of __GNUC_PREREQ. musl libc does not provide this macro. So build with musl is broken.

Steps to reproduce

This nix expression will fail to build:

let
  nixpkgs = import (builtins.fetchTarball {
    url = "https://github.com/NixOS/nixpkgs/archive/18.09-beta.tar.gz";
    sha256 = "147xyn8brvkfgz1z3jbk13w00h6camnf6z0bz0r21g9pn1vv7sb0";
  }) {};
in
  nixpkgs.pkgsMusl.e2fsprogs

pkgsMusl only runs on linux systems, and the above expression took a long time to run as it had to first build a musl toolchain.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.67, NixOS, 18.03.133235.305f13d3d73 (Impala)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.0.4
  • channels(root): "nixos-18.03.133235.305f13d3d73, nixos-unstable-18.03pre124947.33a4de2941d"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@endgame
Copy link
Contributor Author

endgame commented Sep 20, 2018

I can confirm that e2fsprogs-1.44.3 is unaffected. This expression builds:

let
  e2fsprogs-old = import (builtins.fetchurl {
    url = "https://raw.githubusercontent.com/NixOS/nixpkgs/2a5d7d7727a03bf852ea81ce5e2bded04211dedd/pkgs/tools/filesystems/e2fsprogs/default.nix";
    sha256 = "0aw4cs31wahky71cx5sxh26wr9qbmx6vvadhymw2ip55hkzd119p";
  });

  e2fsprogs-overlay = self: super: {
    e2fsprogs = e2fsprogs-old {
      inherit (self)
        stdenv
        buildPackages
        fetchurl
        pkgconfig
        libuuid
        gettext
        texinfo
        perl;
    };
  };

  nixpkgs = import (builtins.fetchTarball {
    url = "https://github.com/NixOS/nixpkgs/archive/18.09-beta.tar.gz";
    sha256 = "147xyn8brvkfgz1z3jbk13w00h6camnf6z0bz0r21g9pn1vv7sb0";
  }) {
    overlays = [
      e2fsprogs-overlay
    ];
  };
in
  nixpkgs.pkgsMusl.e2fsprogs

@dtzWill
Copy link
Member

dtzWill commented Sep 20, 2018

I fixed this some time ago, but it's been a long cycle for staging and apparently hasn't made it to master yet.

#45703

Almost a month ago :(. Hopefully makes it to master soon, if not perhaps folks will be okay if we pick it-- this has caused me some pain as well.

Hooray for using pkgsMusl and hopefully we'll get this working for you soon.

@endgame
Copy link
Contributor Author

endgame commented Sep 20, 2018

That's really good to know. I'm using the 18.09-beta nixpkgs just because it seemed convenient, but if that change has made it to some other recent nixpkgs branch then I'm happy to use that instead.

@endgame
Copy link
Contributor Author

endgame commented Sep 24, 2018

Given there's a fix already in-tree, when is it appropriate to close this issue?

@dtzWill
Copy link
Member

dtzWill commented Sep 24, 2018

I was waiting for it to reach 'master', which has happened. Thanks, and good question :).

@dtzWill dtzWill closed this as completed Sep 24, 2018
@dtzWill
Copy link
Member

dtzWill commented Sep 24, 2018

FWIW I just submitted a PR for a more complete fix (so things building against e2fsprogs still work): #47278 .

@tomodachi94 tomodachi94 added the 6.topic: musl Running or building packages with musl libc label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: musl Running or building packages with musl libc
Projects
None yet
Development

No branches or pull requests

3 participants