pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/go122



Module Name:    pkgsrc
Committed By:   gdt
Date:           Sun May 31 13:25:27 UTC 2026

Modified Files:
        pkgsrc/lang/go122: Makefile

Log Message:
lang/go122: Merge MAKE_JOBS fix with unrelated workaround

This commit merges the recent change in go126 (already applied to
other go versions) to respect MAKE_JOBS.

go122 (and only go122) had a change to force GOMAXPROCS to 1,
unconditionally.  This turns out to be a workaround for a bug in
go122, which is not a MAKE_JOBS type of unsynchronized dependency.  It
is instead a more complicated bug, not clearly understood.
Keep this change, with an explanation for why it's present instead of
the standard approach.

Retroactively document the bug workaround based on email explanations
from tnn@ about why I should not simply replace the GOMAXPROCS=1,
which I guessed was about avoiding excessive parallelism, with the
standard approach.

In the end, this is comment-only change.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/go122/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/go122/Makefile
diff -u pkgsrc/lang/go122/Makefile:1.2 pkgsrc/lang/go122/Makefile:1.3
--- pkgsrc/lang/go122/Makefile:1.2      Thu Apr  2 11:37:22 2026
+++ pkgsrc/lang/go122/Makefile  Sun May 31 13:25:27 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2026/04/02 11:37:22 tnn Exp $
+# $NetBSD: Makefile,v 1.3 2026/05/31 13:25:27 gdt Exp $
 
 .include "../../lang/go/version.mk"
 GO_BOOTSTRAP_REQD=     120
@@ -97,6 +97,19 @@ PRINT_PLIST_AWK+=    /^bin\/gofmt${GOVERSSU
 post-extract:
        ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836*
 
+# By default, go build invokes unreasonable parallelism.  Rather than
+# ${MAKE_JOBS} of 1 thread as with make, we run just "go build" (1
+# job) and tell it to not exceed ${MAKE_JOBS} threads.  This is sound
+# because there is no make with -jN args also.
+#
+# go122 is buggy on some systems, at least NetBSD, and the build fails
+# (probababilistically) if GOMAXPROCS is above 1.   This might be
+#   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278953
+# in which case the scope of failure is more or less *BSD.
+# To work around this, we set GOMAXPROCS to 1, unconditionally,
+# rather than the proper "GOMAXPROCS=${MAKE_JOBS:U1}".
+# \todo File/fix upstream.
+# \todo Limit workaround to necessary platforms.
 do-build:
        cd ${WRKSRC}/src && \
                env \



Home | Main Index | Thread Index | Old Index