-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
clickhouse: enable for darwin #62843
Conversation
only minor tweaks needed
the trick is that both stdenv and buildPackages.stdenv need to be overridden to get this to work
this requires a couple of patches but also wants to be built with gcc8, requiring us to ensure c++ libraries we link to are also built similarly.
a3784b4
to
5def299
Compare
@risicle do you mind rebasing this? |
Sure, I'll rebase & retest it when I next have access to a darwin machine. |
Hmm, this might be a bit delayed as it looks like upstream have broken building on macos ClickHouse/ClickHouse#6429 |
We support both gcc and clang, but clang generates slightly less efficient code according to our performance test and we use gcc for production builds. PS. Our production releases has migrated to gcc-9. |
Thank you for your contributions.
|
Please resolve the merge conflict. |
I actually think most of the work I did here has made it in by other means 🎉, so I'm going to close this. |
A draft, because this sits on top of #62335 - direct any attention about there2
changes to that PR.Motivation for this change
With a little effort,
clickhouse
builds and appears to work on darwin.The main issue is that it wants to be built with gcc (specifically gcc8) rather than clang, and therefore any c++-linked libraries have to be built with gcc too. This is largely achieved through
stdenv
-overriding, but in the case ofboost
requires a minor alteration. I think this is worth it, though - because a gcc-built boost is a valid thing a user might have need of.The package overrides are only conditionally applied where needed, because I didn't want to cause linux builds to require these packages to be built specifically with gcc 8 rather than the default.
Tested on macos 10.13.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)