Adds support for building on Solaris-derived systems#23746
Adds support for building on Solaris-derived systems#23746alexey-milovidov merged 3 commits intoClickHouse:masterfrom
Conversation
This commit adds a number of changes to platform-detection and compile-time directives required to support building ClickHouse on Solaris-derived systems, most notably illumos.
| ::rusage rusage {}; | ||
| #if !defined(__APPLE__) | ||
| #if defined(OS_SUNOS) | ||
| ::getrusage(RUSAGE_LWP, &rusage); |
There was a problem hiding this comment.
For reference, LWP refers to a "light-weight process", and is functionally analogous to a thread on modern illumos systems.
|
A small typo: |
|
Good catch, thank you. |
|
@bnaecker I heard that Illumos has Linux compatibility layer and can run Linux binaries, https://www.youtube.com/watch?v=TrfD3pC0VSs is that true? |
|
@alexey-milovidov Yes, that's right! Zones are a general tool on illumos for isolating runtime environments and resources, and LX zones allow running a Linux kernel without a full VM. It works by translating the system calls, and is a convenient way to get Linux-only applications running. It does have some drawbacks though, which is minimal support for lots of the nice features of illumos itself related to debugging, ZFS, and service management. |
|
@bnaecker Also we need a pull request that updates every affected submodule to commits with changes. |
|
@alexey-milovidov Thanks for the reminder. I'm still waiting on two PRs against ClickHouse extra repos, one to RocksDB and one to gRPC. Once those are integrated, I'll add another patch to Let me know if there's anything else I can do to move things along, and thanks! |
|
Ok. I've missed the notifications somehow. |
|
No problem, I'll put together a patch to the submodules today. Thanks! |
|
@alexey-milovidov Oops, I forgot about this PR against BoringSSL as well! |
|
Also, I'm not sure anything needs to be updated in So it seems no PR against ClickHouse itself should be required. Of course, please let me know if that's incorrect! Thanks. |
|
@alexey-milovidov Ahh, disregard my earlier comment. I haven't worked with submodules much, and I see now that the changes in each have to be merged so that the superproject records a new commit ID as the submodule's commit. I'll work on that now, and put up a new PR with the required changes. Thanks! |
|
@alexey-milovidov While updating the submodules, I've also discovered that one of my earlier PRs was incorrect, missing an |
|
@bnaecker, have you had the practice of building ClickHouse for operating system Solaris 11.* based on SPARC processor? Thanks! |
|
@eugene-vodyanko No, I've not built ClickHouse for Solaris 11 or any SPARC system. This pull request was geared towards building ClickHouse on illumos systems, such as OmniOS. Based on this issue, it seems like ClickHouse plans to support x86, ARM, and PowerPC architectures, but I don't see anything that indicates SPARC support. Given the very different architecture, I'd be a bit surprised if ClickHouse could be successfully built on SPARC, but @alexey-milovidov will probably be able to provide more information. |
|
@bnaecker, thank you very much for you answer. |
This commit adds a number of changes to platform-detection and
compile-time directives required to support building ClickHouse on
Solaris-derived systems, most notably illumos.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Adds support for building on Solaris-derived operating systems.
Detailed description / Documentation draft:
This commit adds support for building on Solaris-derived systems, most notably illumos. Most changes are non-functional, consisting of compile-time directives, inclusions, and defines in order to get the existing code to build. A few changes are to variable declarations or names, and are done to satisfy Solaris's include file structure and contents.