NetBSD Problem Report #60408
From www@netbsd.org Sat Jul 4 21:04:42 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id CD06C1A923F
for <gnats-bugs@gnats.NetBSD.org>; Sat, 4 Jul 2026 21:04:42 +0000 (UTC)
Message-Id: <20260704210441.864711A9243@mollari.NetBSD.org>
Date: Sat, 4 Jul 2026 21:04:41 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: lang/zig tries to write to ~user/.cache/zig instead of $HOME/.cache/zig
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>
>Number: 60408
>Category: pkg
>Synopsis: lang/zig tries to write to ~user/.cache/zig instead of $HOME/.cache/zig
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 04 21:05:00 +0000 2026
>Originator: Taylor R Campbell
>Release: netbsd-11, pkgsrc-2026Q2
>Organization:
ZigBSD Home Improvements, Inc.
>Environment:
NetBSD manticore.local 11.0 NetBSD 11.0 (LIBKVER) #0: Tue Jan 19 00:00:00 UTC 2038 root@localhost:/sys/arch/amd64/compile/LIBKVER amd64
(really: NetBSD 11.0_RC5 kernel and userland)
BUILD_START_DIR=20260701.1613
>Description:
===> Installing for zig-0.16.0
=> Generating pre-install file lists
[ 35%] Built target zigcpp
[ 47%] Built target zig-wasm2c
[ 70%] Built target zig1
[100%] Built target zig2
Install the project...
-- Install configuration: "Release"
error: unable to open global cache directory '/pbulk/.cache/zig': ReadOnlyFileSystem
If this location is not writable then consider specifying an alternative with the ZIG_GLOBAL_CACHE_DIR environment variable or the --global-cache-dir option.
::
:: ERROR: 1
:: (execute_process)
::
:: argv: /tmp/pkgbuild/lang/zig/work/zig-0.16.0/cmake-pkgsrc-build/zig2 build --prefix /pkg/2026Q2 --zig-lib-dir /tmp/pkgbuild/lang/zig/work/zig-0.16.0/lib -Dversion-string=0.16.0 -Dtarget=native -Dcpu=baseline -Denable-llvm -Dconfig_h=/tmp/pkgbuild/lang/zig/work/zig-0.16.0/cmake-pkgsrc-build/config.h -Dno-langref -Doptimize=ReleaseFast -Dstrip
>How-To-Repeat:
cd lang/zig && bmake package
>Fix:
Yes, please!
If zig can't easily be patched, perhaps we should set ZIG_GLOBAL_CACHE_DIR.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.