Skip to content

llvm-binutils links llvm-diff to diff #93523

@DavidTruby

Description

@DavidTruby

Describe the bug
The LLVM binutils package sets diff in the path to be llvm-diff. However, llvm-diff is not a replacement for POSIX diff, it's intended for diffing two LLVM IR files while ignoring non-semantic differences between the two. It doesn't operate as a drop in replacement for diff, so when trying to use a llvm-based stdenv to build anything that relies on diff the build will fail.

To Reproduce
Steps to reproduce the behavior:

  1. Install llvmPackages.bintools (affects 7, 8, 9 and 10)
  2. Observe that diff now points to llvm-binutils-${VERSION}/bin/diff

Expected behavior
diff should continue to point to GNU diff which has the expected POSIX diff behaviour.

Additional context
There may be other tools in llvm-binutils that shouldn't be being linked without their llvm- prefix. as also gets linked, and llvm-as is an LLVM IR -> LLVM bitcode assembler not a system assembler.

Notify maintainers
@ggreif

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

  • system: "x86_64-linux"
  • host os: Linux 5.4.0-40-generic, Ubuntu, 20.04 LTS (Focal Fossa)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • channels(davtru01): "home-manager, nixpkgs-20.09pre235189.d7e20ee25ed"
  • nixpkgs: /home/davtru01/.nix-defexpr/channels/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: 
# a list of nixos modules affected by the problem
module:

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and related
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions