You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes please! I just started watching some videos about zig, and I'm super excited about it, but for me portability to some other systems -- especially my favorite - illumos (not that I'm biased or anything!) is important.
Hello @rzezeski, me and @alexrp have been trying to unbreak building Zig on Illumos for the past couple days, and have merged some of your patches to do so. I've set up a new OmniOS VM and built llvm+clang+lld from source with the patches in omnios-extra. When building Zig with that llvm, the stage 3 compiler will fail to link to symbols in libc with the message failed to preempt symbol - relevant log here.
In the past I remember getting around this by building the llvm libs and/or Zig with the -fPIC flag on. Unfortunately this does not work now. So I have two questions:
Do you have any insight into resolving the linking issues?
Why is it that the package in omnios-extra avoids this issue?
And thanks again for keeping Zig on Illumos going.
Build setup for llvm (based on zig-bootstrap flags). This is after merging patches for llvm and clang.
Activity
nektro commentedon Nov 18, 2020
C include headers:
https://github.com/illumos/illumos-gate/tree/master/usr/src/head
[-]add support for targeting x86_64-illumos[/-][+]Tier 1 Support for targeting x86_64-illumos[/+][-]Tier 1 Support for targeting x86_64-illumos[/-][+]Tier 1 Support for x86_64-illumos[/+]gdamore commentedon Jun 3, 2023
Yes please! I just started watching some videos about zig, and I'm super excited about it, but for me portability to some other systems -- especially my favorite - illumos (not that I'm biased or anything!) is important.
[-]Tier 1 Support for x86_64-illumos[/-][+]Tier System: `x86_64-illumos`[/+]The-King-of-Toasters commentedon Oct 26, 2025
Hello @rzezeski, me and @alexrp have been trying to unbreak building Zig on Illumos for the past couple days, and have merged some of your patches to do so. I've set up a new OmniOS VM and built llvm+clang+lld from source with the patches in omnios-extra. When building Zig with that llvm, the stage 3 compiler will fail to link to symbols in
libcwith the messagefailed to preempt symbol- relevant log here.In the past I remember getting around this by building the llvm libs and/or Zig with the
-fPICflag on. Unfortunately this does not work now. So I have two questions:omnios-extraavoids this issue?And thanks again for keeping Zig on Illumos going.
Build setup for llvm (based on zig-bootstrap flags). This is after merging patches for llvm and clang.
Build flags for Zig:
Edit: The solution I've found is to use
ZIG_STATIC_LLVMwhen building zig.The-King-of-Toasters commentedon Nov 1, 2025
This target is broken as of #25592, due to Illumos not implementing a
futexprimitive. Should be unblocked if:Io.Threadedis modified to use an alternative to futexes.Ioimpl is added.Io.Eventedimpl is made to use Solaris event ports.Prior art for event ports:
alexrp commentedon Nov 1, 2025
The relevant issue for that is #25760.