Details
- Reviewers
silke - Group Reviewers
Triage Team - Commits
- R5456:4ecc8637c3f2: unbork zig compiler
ncdu should compile now
Diff Detail
- Repository
- R5456 ziglang
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This does not fix the issue with ncdu for me. It looks to me like zig uses instructions from the build environment, and it probably shouldn't.
I can reproduce the issue as follows:
- Build zig on a machine with AVX512 (like the buildserver or my desktop).
- Transfer and install package on a machine without AVX512.
- Run zig and get a crash with 'Illegal instruction'.
Yeah, this is bad.
If it is an option to target x86_64 with the base compiler and then offering a haswell build, that might be the best way forward.
Will probably want to hold off on the haswell part as I know @joebonrichie has some ideas re. glibc hwcaps for the solus 4.5 release once we get this 4.4 release out the door.
I updated the patch which may or may not work, cant say for sure without being able to reproduce the issue.
In order to reproduce it I'll need eopkg from build server, new one, with the patch applied.
Then I can go and fix it properly.
I have a local build of the package with the patch applied for you here. Note that if you install that your zig is probably broken.
I did find this issue, which gives the build option -DZIG_TARGET_MCPU=baseline. That does seem to fix the issue for me (download here). Please check if it's the correct way to do this though 😅.
We ran into known issue, here's the root cause
https://github.com/ziglang/zig/blob/d27007cd7e66df8db72cfaa7e5dcd3de65857ac8/CMakeLists.txt#L121
@joebonrichie would =baseline= be correct value for mcpu?
I can verify this revision solves the issues, and baseline definitely looks right to me. Thanks!