-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm_11: build from git #114828
Comments
In upstream (and in some Linux distros) there are already LLVM 12 ( NixOS does not have to provide them out-of-the-box. Just switching to them by |
related (attempt to customize LLVM): #101786 |
Also +1 for this btw. I'd be in favor of merging such an implementation as e.g. Documentation and references: |
i don't want to hijack this, but i think it's relevant: i arrived here while looking for a way to get a bleeding edge LLVM/Clang for a project that i'm trying to build (https://github.com/clasp-developers/clasp). it would be very helpful for us if there were new hydra builds of llvm HEAD every couple of weeks. sometimes we even need an LLVM with a patch of ours, and i'm looking into setting up a local nix cache for that, but it's not a pressing issue right now (we have no pending LLVM patches at the moment). shall i hold my breath for an llvmPackages_git? :) or llvmPackages_13 that gets updated every once in a while to follow LLVM's git head? |
Likely not, we're unfortunately lacking LLVM maintainers. It would certainly be nice though.
An additional issue is to decide when to update
That way it would be clear when and to which revision to update LLVM and that revision should already be well tested (known-good). See https://github.com/NixOS/nixpkgs/pull/101786/files#diff-8f208f3301c344e2c9bc9020c2b20c6585c642e8a9601a25669b2998da1c1247R43 for an example to extract this information and there are regular Chromium Dev releases: https://chromiumdash.appspot.com/releases?platform=Linux I guess I could even get |
@primeos what's wrong with just pushing it, and then whenever bitrot happens wait for the opensource fairies to open a PR? i'm rather new to nix, but i'd certainly keep an eye on it while working on clasp, and do my best to fix things if they break. is there a way to mark a package "non-essential", or "optional"? i.e. failing to build shouldn't cause any blockage. |
It's an option but the probability to get problematic regressions is much higher, people might disagree on which revisions to pick, when / how often to update, etc. That's why I'd prefer to stick to a clear plan (also e.g. our
It would be non-essential by default so it should be fine. It might even be best to add the attribute via |
The purpose of this package is to continuously improve the LLVM packaging in Nixpkgs without causing a lot of rebuilds and provide more recent LLVM builds for users. For more details see: NixOS#114828
I've drafted a PR for It's far from perfect and a clean slate approach would be nicer but so far it doesn't seem realistic that someone will put in the effort. Therefore it seems like a better idea to start by copying |
I absolutely agree we should have a derivation to track HEAD, but i think it should be built in the manner of the others. Until we are using CA derivations (NixOS/rfcs#62) in Nixpkgs, we have no good way to filter stuff out of sources without polluting downstream hashes, so the current approach, as cumbersome as it is, is necessary to ensure individual packages can be patched whatnot nicely with minimal rebuilds. (And to be clear, somehow filtering the source is a must because otherwise we could accidentally rebuild parts of old packages. The LLVM build system is pretty intense, and I absolutely don't trust it to ignore source code it shouldn't care about.) I'm sorry if that's a bit of a bummer, it's precisely cause these things are annoying that I worked on NixOS/rfcs#62 in the first place! |
@Ericson2314 no sure what you mean here - could you e.g. give an example?
AFAIK that's not possible (the tarballs are release assets, so we'd have to generate them manually for non-releases - which is of course possible but I don't see how this would be a good idea).
Upstream switched to the mono repository layout so I don't see why we should continue using our hacks for combining individual tarballs to fix builds. IMO we should avoid patches as much as possible and I don't really see the rebuilds problem (we can still use the patch phase as usual).
Maybe that's the actual problem (i.e. that we wouldn't know which packages we need to patch)? With upstream transitioning more and more to the mono repository layout I don't see how this'll be easily avoidable. Anyway, should I read this as a veto against #120780 or not? |
It's possible to delete stuff at fetch time in
but that's quiet annoying, and I can't think of a time we bumped the fetched sources individually. So I relent, it's fine to fetch everything at once and then split up.
We can do Maybe we should also apply patches in the source post-processing derivations too.
Yes, per project patching is good.
Upstream still aims to support separate builds. I think they CI for it too. If we whitelist the source subdirs as described above to replicate how individual tarballs were combined previously, it should be fine.
Well I think there's still good stuff in there even if you do change to this approach? I'm thinking let's land #111487 next and then redo #120780 in light of this and matching the general normalization I did in that. I'm happy to help out. |
That seems like a feasible option. No sure if it's really worth it but at least it would require few extra effort.
I didn't have that impression so far (they seem to increasingly hard-code paths according to the mono repository layout) but maybe it'll get better?
Yeah, that should remain fine.
Not sure - db1ce99 is the relevant diff and might indeed safe some time. I guess we should then replace
Sounds good.
Thanks! That would be useful as I'm currently low on time and don't have much motivation to try out different approaches. Tbh I'm already thinking about removing myself as LLVM maintainer as I was hoping to heavily refactor/modernize (/ incrementally rewrite) |
I still see lots of conditional "is this a separate project" code and the beginning of CMake files and whatnot. I do fear most of the devs mainly do everything builds (even before the monorepo), so there is a bit of a bias for that, but as long as the official policy isn't changing we're good.
Sorry to hear that, but I do empathize. I would be nice if we could retire old versions after. I think Darwin is supposed to finally leave 7 behind, which should help with that? (It was stuck there a while.) |
The purpose of this package is to continuously improve the LLVM packaging in Nixpkgs without causing a lot of rebuilds and provide more recent LLVM builds for users. For more details see: NixOS#114828
this is somewhat offtopic here, sorry about that! but is there a way to get llvmPackages_git binaries from hydra, without local recompilation? this is what i'm doing in my
|
Indeed, aliases aren't built on Hydra and there doesn't seem to be an existing way to bypass that in nixpkgs/pkgs/top-level/aliases.nix Lines 6 to 18 in 4138713
This may or may not be desirable but in any case |
llvm
is currenly built from individual tarballs instead of upstream monorepoThe flaws of this approach are:
nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix
Lines 14 to 20 in 9ddb9c0
fetchpatch
from upstream git repo: https://github.com/NixOS/nixpkgs/tree/9ddb9c0021ede97e981c3dee2250bbd1abc50c6f/pkgs/development/compilers/llvm/11master
but not yet in the latest tarballed release.chromiumDev
often needs them. With git repo,llvm_11.override{src = ...}
would work.The text was updated successfully, but these errors were encountered: