Skip to content

Conversation

emilazy
Copy link
Member

@emilazy emilazy commented Aug 5, 2025

It seems something changed about LLVM’s CMake dependency handling in 21, and at least the bootstrap ld64 now passes -lxml2 during the build.

Hopefully this also means static is also fixed, so I’ve optimistically dropped that without testing.


It would be good if someone could test pkgsStatic.llvm_21. It also probably needs conditionalizing, although I wouldn’t be surprised if the comment was already outdated…

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

It seems something changed about LLVM’s CMake dependency handling
in 21, and at least the bootstrap `ld64` now passes `-lxml2` during
the build.

Hopefully this also means static is also fixed, so I’ve
optimistically dropped that without testing.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels Aug 5, 2025
@alyssais
Copy link
Member

So you think LLVM's CMake files are telling other packages to always link libxml2?

@emilazy
Copy link
Member Author

emilazy commented Aug 10, 2025

That or llvm-config(1), yes. Or rather I think they switched from passing an absolute path to using -lxml2 or something. Not totally sure. I saw a recent LLVM commit that looked relevant but I can’t immediately find it again.

@emilazy
Copy link
Member Author

emilazy commented Aug 10, 2025

Hmm. Okay there’s actually additional context here in that ld64 is linking against the static LLVM libraries. But I’m not sure exactly what changed in 21.

@emilazy
Copy link
Member Author

emilazy commented Aug 16, 2025

So I think this is probably the wrong thing: it only matters when using static LLVM libraries in a non‐pkgsStatic context, and in that case of course you need to pull in more libraries than you otherwise would. I’ve amended #430774 appropriately, but I haven’t bootstrapped the rest of the package set yet to see if things linking against LLVM as a dynamic library cause any issues. What do you think?

@alyssais
Copy link
Member

alyssais commented Aug 17, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants