NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.61k stars 13.09k forks source link

Build failure: llm-ls for aarch64-darwin #273596

Open JackSullivan opened 7 months ago

JackSullivan commented 7 months ago

darwin is currently in badPlatforms for llm-ls, but it does build fine on aarch64-darwin outside of nixpkgs.

Steps To Reproduce

On aarch64-darwin nix build nixpkgs/nixos-23.11#llm-ls fails to build with 'not available on the requested host platform' (This is expected). When I remove darwin from badPlatforms it says it can't find the Security framework (I believe needed by the rust package security-framework-sys:2.9.1).

When I alter the llm-ls build script to add buildInputs = lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];, it fails with a bunch of Undefined symbols for architecture arm64 errors (see full log below). However, If I just clone the relevant checkpoint of the llm-ls repo and run nix run nixpkgs/nixos-23.11#cargo -- build, it builds and runs fine.

Build log

Build Log Gist

Notify maintainers

@jfvillablanca

Metadata

λ nix-shell -p nix-info --run "nix-info -m"
these 2 paths will be fetched (0.01 MiB download, 0.11 MiB unpacked):
  /nix/store/22dzjqjrxlhl0ba23f8f66w51hbhgz14-nix-info
  /nix/store/7mc6vch4s76ynwihxck33gy5pz4fpq13-DarwinTools-1
copying path '/nix/store/7mc6vch4s76ynwihxck33gy5pz4fpq13-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/22dzjqjrxlhl0ba23f8f66w51hbhgz14-nix-info' from 'https://cache.nixos.org'...
 - system: `"aarch64-darwin"`
 - host os: `Darwin 22.6.0, macOS 13.5.2`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.10.3`
 - nixpkgs: `/nix/store/mpsjbqbyzcdjbgf2phj0yik4nk8dp1xv-mbz4hixfgxq5b6vc0k3pp2iglcd4c353-source`

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

jfvillablanca commented 7 months ago

would you be willing to make a PR to unbreak llm-ls for darwin? i don't have a mac to test out your suggestion.

JackSullivan commented 7 months ago

I'm happy to make the PR for llm-ls on darwin and to do the testing for it, though I don't have the knowledge to debug the problems in the log I posted, so I'll need some help

JackSullivan commented 7 months ago

Is this issue potentially related to #19098? It appears to be of the same form.