Problem to install HDF5 / GDAL

Hi all,
Maybe there is someone there that could help me with my recent update of nixos. Just recently I tried

nixos-rebuild switch --upgrade --show-trace

with the following error:

The following tests FAILED:
130 - MFHDF_TEST-cdftest (Failed)
133 - MFHDF_TEST-cdftest-shared (Failed)
Errors while running CTest
builder for ‘/nix/store/4fsvgkgbn0jpayan4l8q0sr7k7zgqr3y-hdf-4.2.14.drv’ failed with exit code 8
cannot build derivation ‘/nix/store/cbp17y6qkka74v9lhx71j0bbshlj7si2-gdal-2.4.0.drv’: 1 dependencies couldn’t be built
cannot build derivation ‘/nix/store/w83ljg4qjm0izw8sgk7406k0hha47jr4-gdal-2.4.0.drv’: 1 dependencies couldn’t be built
cannot build derivation ‘/nix/store/kss81jn38dpjgna0ifnn9szy6yvd1s72-system-path.drv’: 1 dependencies couldn’t be built
cannot build derivation ‘/nix/store/19k3bjrp73shpm7d97p1wp1k1jsvgjzf-nixos-system-nixos-19.03.173553.6420e2649fa.drv’: 1 dependencies couldn’t be built
error: build of ‘/nix/store/19k3bjrp73shpm7d97p1wp1k1jsvgjzf-nixos-system-nixos-19.03.173553.6420e2649fa.drv’ failed

and I don’t know were could by my error updating nixos. Here is the main info of my installation:

nix run nixpkgs.nix-info -c nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.74, NixOS, 19.03.173522.021d733ea3f (Koi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.0.4`
 - channels(ramiro): `""`
 - channels(root): `"nixos-19.03"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Thanks!

Oh. hdf4 build is broken on 19.03, I didn’t realize that. We probably will have to disable these failing tests. I’ll try to have a look tomorrow.

1 Like

I’m looking into it. FYI: Thanks to the power of nix you should be able to work around the issue by disabling the tests on hdf4 manually in your configuration.nix using something like this.

nixpkgs.overlays = let
  workaroundBrokenHDF4 = self: super: {
    hdf4 = super.hdf4.overrideAttrs(o: {
      doCheck = false;
    });
  };
in [
  workaroundBrokenHDF4
];
environment.systemPackages = with pkgs; [
  gdal
];
1 Like