-
Notifications
You must be signed in to change notification settings - Fork 2.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
zig: update to 0.12.0. #49935
base: master
Are you sure you want to change the base?
zig: update to 0.12.0. #49935
Conversation
This should close #45424 |
Did you try building anything with it? Hopefully soon river or waylock will tag a release using zig 0.12.. |
Yeah. I built some of my advent of code stuff which works fine. I also built https://github.com/andrewrk/poop with it and it works without a hitch |
You need to rebuild (aka revbump) packages in the repo which which require zig for building and commit them within this PR. See #49436 as an example for how this workflow. |
Oh, I see what you mean now. So I'll try to bump them now and see, but due to the breaking nature of early zig, this may have to wait a while. |
Did some tests, our |
I'm starting to think I bit off more than I could chew |
@OliveThePuffin are you planning on finishing this up? |
I did, but right now the repo/xbps-src is breaking on me saying that "neither git or chroot-git are available in your system!" which is just false. I zapped and binary-bootstrapped, but nothing is fixing this. If you want to, feel free to take it away. |
update master branch, and rebase this branch against master |
@realcharmer I tried to build against the updates you made but it doesn't seem to be working. I'm getting these errors:
Is there anything you did to make it work? |
river 0.3.0 won't support zig 0.12, we need to wait for 0.4.0, there seems to be some work being done |
New river and waylock are now out, which makes this PR viable. This works for me on x86_64 with static zig 0.12, but it needs some refinement to be included in void's build style:
|
Similarly:
|
since the zig pm scheme behaves similar to cargo we could just configure global cache in the build style and et voila |
makes sense |
Just tested for waylock and river, adding |
Thanks for the heads-up, I'll update both PRs tomorrow. |
Seeing river 0.3.2 uses zig 0.12 now. Also OP, do not get discouraged. Void packaging is not for the faint of heart. You will get fail, many times. The maintainers here have put me through eternal bootcamp with attitude to match. |
I prepared build_style changes that should make package templates not require custom fetch/do_build hacks: common/build-style/zig-build.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common/build-style/zig-build.sh b/common/build-style/zig-build.sh
index 205c4cadf53f8c..e0245e8cd7eb63 100644
--- a/common/build-style/zig-build.sh
+++ b/common/build-style/zig-build.sh
@@ -30,9 +30,11 @@ do_build() {
# prefix used by the zig build system.
DESTDIR="zig-out" zig build \
--sysroot "${XBPS_CROSS_BASE}" \
+ --search-prefix /usr \
+ --global-cache-dir /host/zig \
--libc xbps_zig_libc.txt \
-Dtarget="${zig_target}" -Dcpu="${zig_cpu}" \
- -Drelease-safe --prefix /usr install \
+ --release=safe --prefix /usr install \
${configure_args}
} |
Quote from Andrew:
|
@tranzystorekk Great! I can confirm that works for me, with the trivial update for waylock, and this one for river:
(The reason for removing the xwayland option is that, even if build with it, it can be disabled at runtime.) |
Shouldn't |
i took it from the cargo/rust style, afaiu its |
Testing the changes
Local build testing