Detected mismatched Qt dependencies with buildImage for aarch64-linux

Hi,

I am building a docker image for both x86 and arm64 linux using pkgs.dockerTools.buildImage

The build works perfectly fine for x86_64-linux but it failed for aarch64-linux

I was getting below error

Error: detected mismatched Qt dependencies:
    /nix/store/0yj5jq8j5xzzd8gzqzf58zy0sqpkplj0-qtbase-5.15.14-dev
    /nix/store/az7f61hgqkwwaq5902r5jljxfk3p9sa5-qtbase-5.15.14-dev

with a simple config like this.

pkgs.dockerTools.buildImage {
  name = imageName;
  tag = "${imageTag}-${archSuffix}";
  runAsRoot = ''
    mkdir -p /data
  '';
  copyToRoot = pkgs.buildEnv {
    name = "image-root";
    paths = [
      pkgs.bashInteractive
      pkgs.zsh
    ];
    pathsToLink = [ "/bin" ];
  };
};

This appears to be related to the runAsRoot section. when I comment out this part, it builds successfully.

Does anyone know what I can do to solve this issue?

Thanks

1 Like

When I see

I expect to some something related to qt in the code. But I don’t. So I’m confused.