Skip to content

Collision between gcc and binutils despite lib.lowPrio on aarch64-darwin #380

Description

@robbevp

Describe the bug
When creating a devshell on aarch64-darwin with gcc (or clang) and binutils, I get an error even though I'm using lib.lowPrio

pkgs.buildEnv error: two given paths contain a conflicting subpath:
  `/nix/store/bkx74rgg0bxrvbmdp1fzb0qw0qxqj18v-binutils-wrapper-2.46/bin/strings' and
  `/nix/store/r2rxcj66b6jkyzn68pk42frmh8zybzkp-gcc-wrapper-15.3.0/bin/strings'

This occurs when using the ruby language extension,

To Reproduce

Steps to reproduce the behavior:

  1. Define a shell like:
test = pkgs.devshell.mkShell {
   packages = [ pkgs.gcc (pkgs.lib.lowPrio pkgs.binutils) ];
};
  1. Try to load shell and see error

Expected behavior
The shell should be able to load on aarch64-darwin.

System information
OS: macOS 26.6.2
Nix version: nix (Nix) 2.34.8
Using devshell at the current last commit

Additional context
This issue does not occur when defines a simple shell.nix file like:

{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
  nativeBuildInputs = [
    pkgs.gcc
    (pkgs.lib.lowPrio pkgs.binutils)
  ];
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions