Re: Failure to build zig-HEAD on -current aarch64
ci4ic4 <[email protected]> Fri, 20 Feb 2026 16:40:49 +0000
| Newsgroups | gmane.os.netbsd.current |
|---|---|
| Message-ID | <2A_tp8QQWYboLrqWUOctnCps_1EgL8yJx4Ezv1B8AuF8GC-ICHzt74lqAoxWiD6gStlr6j4mBtabfTkvZARZ9TFzD4Hic4YzR7bgoxPwMEA=@proton.me> |
Sent with Proton Mail secure email. On Thursday, 19 February 2026 at 7:29 PM, ci4ic4 <[email protected]> wrote: > > > > > Sent with Proton Mail secure email. > > On Wednesday, 18 February 2026 at 10:14 PM, Thomas Klausner <[email protected]> wrote: > > > On Wed, Feb 18, 2026 at 04:08:58PM +0100, ci4ic4 wrote: > > > I build zig from time to time on -current, both on amd64 and aarch64. Lately, my aarch64 builds do not complete - the second stage compiler zig2 is in parked state, not doing anything (obviously). There appears on resource shortage of any kind. This is on today's -current. The same zig version on the same NetBSD-current on amd64 builds just fine (on a smaller VM). The traces are as follows: > > > > I have no particular idea about the trace, but I posted an llvm update > > to tech-pkg mailing list which includes a zig update. You could try if > > the problem persists in that version. > > It won't help me much - my llvm version is now 21.1.8... > > I noticed that llvm on my aarch64 box was a bit older than on my amd64 one; 21.1.5 vs. 21.1.8, so I built 21.1.8 on aarch64 and tried again - to no avail. Your patch ups llvm to 20.1.8, which is too old for the (codeberg) HEAD zig version, which I build. My llvm/clang/lld builds are from wip, I build zig following the standard procedure suggested, which usually works on -current, but breaks from time to time; if I decide that the reason is in some bitrot in the bsd support in zig, I may submit an issue there, which is usually dealt with reasonably fast. In this particular occasion I am stumped by the fact that I have identical NetBSD versions (clean build scripts after a cvs update) and identical llvm versions, and the result is different - failure on aarch64. > > After an initial checkout from https://codeberg.org/ziglang/zig, it is: > > mkdir build > cd build > cmake -DCMAKE_BUILD_TYPE=Release -GNinja .. > ninja install > > I just keep ${HOME}/src/zig/build/stage3/bin/ in the PATH to test and try it. Also, before a rebuild, I always > > rm -r .zig-cache/* ~/.cache/zig/* build > > while in the top zig directory. > Apparently some resource exhaustion - if I run the command actually building the third stage compiler after cancelling the 'ninja install' process, it completes and creates a working compiler. It also completes if I use gmake instead of ninja... I don't know which resource is insufficient, it is not memory - the vm has 12GB and 2 CPUs. A bit weird... > > Thomas > > > > > Chavdar > >