pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/61067: glib2 build failure (segv) on macOS
>Number: 61067
>Category: pkg
>Synopsis: glib2 build failure (segv) on macOS
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Nov 25 00:50:00 +0000 2026
>Originator: hubertf
>Release: pkgsrc-current as of Wed Nov 25 00:27:39 UTC 2026
>Organization:
hubert.de
>Environment:
neuland% uname -a
Darwin neuland 25.6.0 Darwin Kernel Version 25.6.0: Sat Jul 11 15:26:29 PDT 2026; root:xnu-12377.161.13~4/RELEASE_ARM64_T8132 arm64
neuland% gcc -v
Apple clang version 21.0.0 (clang-2100.4.1.1)
Target: arm64-apple-darwin25.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
neuland%
>Description:
Building glib2 from pkgsrc on macOS fails: cd .../pkgsrc/devel/glib2; make
Details see "how to repeat the problem".
Analysis:
macOS has the pipe() function as weak link, i.e. it may not be linked at runtime, resulting in "pipe" being a NULL pointer, resulting in a segfault when called. As in the glib2 build.
Remediation: see "fix to the problem"
>How-To-Repeat:
neuland% ( cd /Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2 ; bmake )
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Skipping vulnerability checks.
WARNING: No /Volumes/pkgsrc23/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/Volumes/pkgsrc23/pkg/sbin/pkg_admin -K /Volumes/pkgsrc23/pkgdb fetch-pkg-vulnerabilities'.
===> Building for glib2-2.90.1
ninja: Entering directory `output'
[1/1065] Generating gio/tests/test.gre...m command (wrapped by meson to set env)
FAILED: [code=139] gio/tests/test.gresource
env LC_ALL=en_US.UTF-8 DYLD_LIBRARY_PATH=/Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/output/glib:/Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/output/gio:/Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/output/gobject:/Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/output/gmodule /Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/output/gio/glib-compile-resources --compiler=clang --target=gio/tests/test.gresource --sourcedir=/Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/gio/tests --sourcedir=/Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2/work.neuland/glib-2.90.1/output/gio/tests --internal ../gio/tests/test.gresource.xml
Segmentation fault
ninja: build stopped: subcommand failed.
*** Error code 139
Stop.
bmake[1]: stopped making "all" in /Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/glib2
*** Error code 1
>Fix:
neuland% cat patches/patch-glib_glib-unixprivate.h
$NetBSD$
--- glib/glib-unixprivate.h.orig 2026-11-25 00:43:40.158669469 +0000
+++ glib/glib-unixprivate.h
@@ -45,6 +45,7 @@ g_unix_open_pipe_internal (int *fds,
gboolean nonblock)
{
#ifdef HAVE_PIPE2
+ if (pipe2) // may be NULL on macOS
do
{
int ecode;
neuland% cvs diff
? patches/patch-glib_glib-unixprivate.h
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/glib2/distinfo,v
retrieving revision 1.353
diff -u -r1.353 distinfo
--- distinfo 14 Oct 2026 09:34:25 -0000 1.353
+++ distinfo 25 Nov 2026 00:45:41 -0000
@@ -19,6 +19,7 @@
SHA1 (patch-glib_gatomic.h) = d1c39c3594a5c89d196349e5eafb5512795f55f8
SHA1 (patch-glib_genviron.c) = 45e382a4b5412c69b310fd26482eff6faffa2c0d
SHA1 (patch-glib_glib-unix.c) = 1c7ef6437680317f5e28c3e75bca26cfec48351f
+SHA1 (patch-glib_glib-unixprivate.h) = fce7fd5a0835c05ed3b664f4d3e7a0189ac0ce0f
SHA1 (patch-glib_gspawn-posix.c) = 1d043689954b222a87243ddf61754b8fb1b50bc1
SHA1 (patch-glib_gthread.c) = 52cedcf40ad82af9b9f45315aacf63a8abd93fd5
SHA1 (patch-glib_tests_hash.c) = a7e19ca55fcbbc0b188c34755cae5b6b65b67f1a
Home |
Main Index |
Thread Index |
Old Index