pkgsrc-Bugs archive

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

pkg/60769: pkgsrc/devel/scmcvs breaks on Darwin due to C23



>Number:         60769
>Category:       pkg
>Synopsis:       pkgsrc/devel/scmcvs breaks on Darwin due to C23
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 22 20:55:00 +0000 2026
>Originator:     hubertf
>Release:        pkgsrc-current from Tue Sep 22 22:47:15 CEST 2026
>Organization:
netbsd
>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.1.1.101)
Target: arm64-apple-darwin25.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
neuland% xcode-select -v
xcode-select version 2416.
>Description:
building pkgsrc/devel/scmcvs breaks as getopt() is declared wrongly as K&R, but clang's default C23 doesn't like that.

>How-To-Repeat:
neuland% cd $cvs/pkgsrc/devel/scmcvs/
neuland% make install
=> 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 cvs-1.12.13nb9
/Volumes/pkgsrc23/pkg/bin/bmake  all-recursive
Making all in lib
/Volumes/pkgsrc23/pkg/bin/bmake  all-am
if clang -std=gnu23 -DHAVE_CONFIG_H -I. -I. -I..    -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.5.sdk/usr/include  -O2 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.5.sdk/usr/include -MT getopt.o -MD -MP -MF ".deps/getopt.Tpo" -c -o getopt.o getopt.c;  then mv -f ".deps/getopt.Tpo" ".deps/getopt.Po"; else rm -f ".deps/getopt.Tpo"; exit 1; fi
getopt.c:127:14: error: conflicting types for 'getenv'
  127 | extern char *getenv ();
      |              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdlib.h:167:18: note:
      previous declaration is here
  167 | char *_LIBC_CSTR        getenv(const char *);
      |                         ^
1 error generated.
*** Error code 1

Stop.
bmake[3]: stopped making "all-am" in /Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/scmcvs/work.neuland/cvs-1.12.13/lib
*** Error code 1

Stop.
bmake[2]: stopped making "all" in /Users/feyrer/work/NetBSD/cvs/pkgsrc/devel/scmcvs/work.neuland/cvs-1.12.13/lib
neuland%
>Fix:
Forcing a downgrade of GCC feels wrong, but it works 
No idea if/how CVS can be convinced to work properly with a recent C compiler.

The patch below works but there may be a better solution.

Someone more knowledgeable please take over.

 - Hubert



neuland% cvs diff Makefile
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/scmcvs/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile	4 Jul 2026 12:56:29 -0000	1.24
+++ Makefile	22 Sep 2026 20:47:02 -0000
@@ -27,6 +27,12 @@

 CONFIGURE_ARGS.Darwin+=	--enable-case-sensitivity

+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+FORCE_C_STD=		gnu17
+.endif
+
 .include "options.mk"

 AUTOCONF_REQD=		2.50




Home | Main Index | Thread Index | Old Index