NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.45k stars 13.65k forks source link

Build failure with latest Ghidra (11.1.2) on Nix - existing files in the project directory? #341382

Open victorhooi opened 1 week ago

victorhooi commented 1 week ago

Describe the bug

Ghidra 11.1.2 is failing to build on Nix

I am on macOS, using Nix with home-manager and nix-darwin (via this template)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run nix run ./#build-switch to update

The above errors out whilst trying to build Ghidra, with the below output:

❯ nix run ./#build-switch
warning: Git tree '/Users/foobar/nixos-config' is dirty
Running build-switch for aarch64-darwin
Starting build...
warning: Git tree '/Users/foobar/nixos-config' is dirty
error: builder for '/nix/store/hd6wbk86arc844k9vcp1635a58zv21p9-ghidra-11.1.2.drv' failed with exit code 1;
       last 10 log lines:
       > > Get more help at https://help.gradle.org.
       >
       > Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
       >
       > You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
       >
       > For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
       >
       > BUILD FAILED in 42s
       > 1 actionable task: 1 executed
       For full logs, run 'nix log /nix/store/hd6wbk86arc844k9vcp1635a58zv21p9-ghidra-11.1.2.drv'.
error: 1 dependencies of derivation '/nix/store/g5qqcfy030ypw9f8pvav5wqmah1yxjnf-ghidra-11.1.2-fish-completions.drv' failed to build
error: 1 dependencies of derivation '/nix/store/d9572jg1x8nr0ma7mvscbcnfa193xqpb-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7qpykn15li1581s6h0glvvip5yqdvgym-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cz9n4lxf5x51pcqnv2k269mlv51mfsy9-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/m0hfxfhcc5h9n9nca842h3f4wc2xlpzy-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8prrcmqk2az6pdzzn4lnz6bmpdjdjyqi-system-applications.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-swift-5.8.drv-1/src/llvm-project': Directory not empty
error: 1 dependencies of derivation '/nix/store/0zr90wyrqn4dh0fhazxpgncri795rgza-darwin-system-24.11.20240910.1355a0c+darwin4.f4f18f3.drv' failed to build

I've included the output of nix log /nix/store/hd6wbk86arc844k9vcp1635a58zv21p9-ghidra-11.1.2.drv here:

https://gist.github.com/victorhooi/352c69a9015172fc1d0d7b90bdcf7bb3

Expected behavior

Ghidra should build without errors.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Notify maintainers

@roblabla @vringar @xeniarose @afh @stuebinm @MikaelFangel @tpwrules @erdnaxe

Metadata

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

❯ nix-shell -p nix-info --run "nix-info -m"
error:
       … while calling the 'import' builtin
         at «string»:1:18:
            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
             |                  ^

       … while realising the context of a path

       … while calling the 'findFile' builtin
         at «string»:1:25:
            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
             |                         ^

       error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

nixos-config on  main [!?] 

Add a :+1: reaction to issues you find important.

sawshep commented 1 week ago

Gradle might need to be pinned to an earlier version in the build

roblabla commented 1 week ago

Isn't this a dupe of https://github.com/NixOS/nixpkgs/issues/340883 ? Can you reproduce on master?