Skip to content

androidenv.cmake: use patchelf 0.15.2 to fix bundled ninja - #577949

Merged
numinit merged 1 commit into
NixOS:masterfrom
limwa:androidenv-cmake-patchelf-0.15.2
Oct 26, 2026
Merged

numinit merged 1 commit into
NixOS:masterfrom
limwa:androidenv-cmake-patchelf-0.15.2

Conversation

@limwa

@limwa limwa commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

A couple days ago, an automated job I run to ensure that Nixpkgs' flutter can build an example flutter project started failing (see https://github.com/limwa/nix-registry/actions/runs/39950983412/job/120405086177).

The job fails when executing ninja --version, with a SEGFAULT. This appears to be related to dcd39b0. A tracking issue for related failures is available at #577387. Follows the pattern in #574271.

Things done

Assisted-by: OpenCode 2 (DeepSeek V4.1 Flash Free)
@limwa

limwa commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

I'm still verifying this fix on the example flutter project mentioned in the PR description. I've verified that the example flutter project is building successfuly with this PR.

@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team October 23, 2026 17:03
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs labels Oct 23, 2026
@limwa

limwa commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Before

sdk=$(cat <<'EOF' | nix build --no-link --print-out-paths --impure -f - | sed -n '1p'
let
  flake = builtins.getFlake "github:NixOS/nixpkgs/master";
  pkgs = import flake.outPath {
    system = "x86_64-linux";
    config = {
      allowUnfree = true;
      android_sdk.accept_license = true;
    };
  };

  androidComposition = pkgs.androidenv.composeAndroidPackages {
    buildToolsVersions = [];
    cmakeVersions = [ "3.22.1" ];
    platformVersions = [];
    ndkVersions = [];
  };
in
androidComposition.androidsdk
EOF
)

"$sdk/libexec/android-sdk/cmake/3.22.1/bin/ninja" --version

Fails with segfault.


After

sdk=$(cat <<'EOF' | nix build --no-link --print-out-paths --impure -f - | sed -n '1p'
let
  flake = builtins.getFlake "github:NixOS/nixpkgs/pull/577949/head";
  pkgs = import flake.outPath {
    system = "x86_64-linux";
    config = {
      allowUnfree = true;
      android_sdk.accept_license = true;
    };
  };

  androidComposition = pkgs.androidenv.composeAndroidPackages {
    buildToolsVersions = [];
    cmakeVersions = [ "3.22.1" ];
    platformVersions = [];
    ndkVersions = [];
  };
in
androidComposition.androidsdk
EOF
)

"$sdk/libexec/android-sdk/cmake/3.22.1/bin/ninja" --version

Prints 1.10.2

@nixpkgs-review-gha

Copy link
Copy Markdown

✅ nixpkgs-review result

Generated using nixpkgs-review-gha (710407f)

Command: nixpkgs-review pr 577949
Commit: a5a6ed318377d5626871844cfccc18fb13f5bc70 (subsequent changes)
Merge: 574dc0fd103ff3737ffd9f2389276b501dac3dca

Triggered by @limwa (13498603)
Logs: https://github.com/limwa/nixpkgs-review-gha/actions/runs/39996338127/attempts/1


x86_64-linux

✅ 1 package built:
  • androidenv.test-suite

aarch64-linux

✅ No rebuilds


aarch64-darwin

✅ No rebuilds

@numinit numinit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@numinit
numinit added this pull request to the merge queue Oct 26, 2026
Merged via the queue into NixOS:master with commit c8e3a0f Oct 26, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants