Skip to content

Conversation

@alexrp
Copy link
Member

@alexrp alexrp commented Oct 26, 2025

There is no straightforward way for the Zig team to access the Solaris system headers; to do this, one has to create an Oracle account, accept their EULA to download the installer ISO, and finally install it on a machine or VM. We do not have to jump through hoops like this for any other OS that we support, and no one on the team has expressed willingness to do it.

As a result, we cannot audit any Solaris contributions to std.c or other similarly sensitive parts of the standard library. The best we would be able to do is assume that Solaris and illumos are 100% compatible with no way to verify that assumption. But at that point, the solaris and illumos OS tags would be functionally identical anyway.

For Solaris especially, any contributions that involve APIs introduced after the OS was made closed-source would also be inherently more risky than equivalent contributions for other proprietary OSs due to the case of Google LLC v. Oracle America, Inc., wherein Oracle clearly demonstrated its willingness to pursue legal action against entities that merely copy API declarations.

Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in maintenance mode since, presumably to be retired completely sometime in the 2030s.

For these reasons, this commit removes all Oracle Solaris support.

Anyone who still wishes to use Zig on Solaris can try their luck by simply using illumos instead of solaris in target triples - chances are it'll work. But -- assuming this is merged without objection -- there will be no effort from the Zig team to support this use case; we recommend that people move to illumos instead.

There is no straightforward way for the Zig team to access the Solaris system
headers; to do this, one has to create an Oracle account, accept their EULA to
download the installer ISO, and finally install it on a machine or VM. We do not
have to jump through hoops like this for any other OS that we support, and no
one on the team has expressed willingness to do it.

As a result, we cannot audit any Solaris contributions to std.c or other
similarly sensitive parts of the standard library. The best we would be able to
do is assume that Solaris and illumos are 100% compatible with no way to verify
that assumption. But at that point, the solaris and illumos OS tags would be
functionally identical anyway.

For Solaris especially, any contributions that involve APIs introduced after the
OS was made closed-source would also be inherently more risky than equivalent
contributions for other proprietary OSs due to the case of Google LLC v. Oracle
America, Inc., wherein Oracle clearly demonstrated its willingness to pursue
legal action against entities that merely copy API declarations.

Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in
maintenance mode since, presumably to be retired completely sometime in the 2030s.

For these reasons, this commit removes all Oracle Solaris support.

Anyone who still wishes to use Zig on Solaris can try their luck by simply using
illumos instead of solaris in target triples - chances are it'll work. But there
will be no effort from the Zig team to support this use case; we recommend that
people move to illumos instead.
.openbsd => try define(w, "__OpenBSD__"),
.dragonfly => try define(w, "__DragonFly__"),
.solaris => try defineStd(w, "sun", is_gnu),
.illumos => try defineStd(w, "sun", is_gnu),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @Vexu note the replacement of solaris with illumos rather than outright removal of the prong. I'm assuming a lot of this code mirrors Clang frontend code and therefore never properly handled illumos because LLVM/Clang lump them together in a single solaris tag.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The illumos compilers patch gcc/clang to also use __illumos__ the platforms have diverged enough that this matters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zig/src/Compilation.zig

Lines 6868 to 6870 in dba1bf9

// LLVM doesn't distinguish between Solaris and illumos, but the illumos GCC fork
// defines this macro.
.illumos => try argv.append("__illumos__"),

I think this should be picked up by translate-c as well, though obviously Aro will want to add that macro independently too.

@andrewrk andrewrk merged commit dba1bf9 into ziglang:master Oct 27, 2025
7 of 9 checks passed
@andrewrk
Copy link
Member

andrewrk commented Oct 27, 2025

To clarify Zig project policy on supporting operating systems, the equation goes something like this:

  • Is it a Free, Libre, and Open Source Software project?
    • Yes -> Is it somewhat popular?
      • Yes -> Support it
      • No -> Does supporting it incur nontrivial maintenance burden?
        • Yes -> sorry, not worth the trouble
        • No -> Contributor-maintained (core team makes no promises about breakage, amount of testing, etc)
    • No -> Is it so popular that ignoring it would harm the Zig project?
      • Yes -> Support it
      • No -> lol fuck off

@alexrp alexrp deleted the rip-solaris branch October 27, 2025 14:55
@The-King-of-Toasters
Copy link
Contributor

rip, but not unexpected. It could work if the standard library migrated away from flock and just used fcntl. If that happens I expect things to just work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants