tech-pkg archive

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

Yacc Shaving, or, Latest macOS CLT Laccs Something



On my up-to-date Sonoma systems, I accepted the recent update to the Command Line Tools. Now I'm seeing textproc/groff fail like so:

      YACC     src/preproc/eqn/eqn.cpp
xcode-select: Failed to locate 'yacc', requesting installation of command line developer tools.
    gmake[1]: *** [Makefile:8114: src/preproc/eqn/eqn.cpp] Error 72
gmake[1]: Leaving directory '/private/var/tmp/pkgsrc/obj/textproc/groff/work.magnetic-babysitter/groff-1.22.4'
    gmake: *** [Makefile:5600: all] Error 2

Are folks with a full (and up-to-date) Xcode installation experiencing the same problem? If yes, could you confirm or deny that the following patch fixes it for you? Or if no, could you confirm that it at least doesn't seem to cause any new trouble?

I assume the missing yacc will get re-added in a CLT update at some point. If that happens quickly enough, this is moot. But since it probably won't, we'll probably need to paper over the problem for a while.

Thanks,

- Amitai

Index: mk/tools/tools.Darwin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/tools.Darwin.mk,v
retrieving revision 1.63
diff -u -p -r1.63 tools.Darwin.mk
--- mk/tools/tools.Darwin.mk	17 May 2023 19:32:57 -0000	1.63
+++ mk/tools/tools.Darwin.mk	8 Mar 2024 02:18:59 -0000
@@ -14,7 +14,13 @@ TOOLS_PLATFORM.bash?=		/bin/bash
 .if exists(/usr/bin/bsdtar)
 TOOLS_PLATFORM.bsdtar?=		/usr/bin/bsdtar
 .endif
-TOOLS_PLATFORM.byacc?=		/usr/bin/yacc
+# CLT 15.3.0.0.1.1708646388 does not provide yacc. Check whether it's
+# really present before defaulting to it.
+TOOLS_PLATFORM_YACC_CMD= /usr/bin/xcrun --find yacc 2>/dev/null | sed -e 's|^/Library/Developer/CommandLineTools||'
+TOOLS_PLATFORM_YACC_CANDIDATE=	${TOOLS_PLATFORM_YACC_CMD:sh}
+.if ${TOOLS_PLATFORM_YACC_CANDIDATE} != ""
+TOOLS_PLATFORM.byacc?=		${TOOLS_PLATFORM_YACC_CANDIDATE}
+.endif
 .if exists(/usr/bin/bzcat)
 TOOLS_PLATFORM.bzcat?=		/usr/bin/bzcat
 .endif
@@ -142,4 +148,6 @@ TOOLS_PLATFORM.wc?=		/usr/bin/wc
 TOOLS_PLATFORM.wish?=		/usr/bin/wish
 .endif
 TOOLS_PLATFORM.xargs?=		/usr/bin/xargs
-TOOLS_PLATFORM.yacc?=		/usr/bin/yacc
+.if ${TOOLS_PLATFORM_YACC_CANDIDATE} != ""
+TOOLS_PLATFORM.yacc?=		${TOOLS_PLATFORM_YACC_CANDIDATE}
+.endif


Home | Main Index | Thread Index | Old Index