Re: Cross-build on macOS fails
"Greg A. Woods" <[email protected]>
| Newsgroups | gmane.os.netbsd.current |
|---|---|
| Organization | Planix, Inc. |
| Message-ID | <[email protected]> |
At Fri, 19 Dec 2025 11:55:13 +0100, Adam <[email protected]> wrote: Subject: Cross-build on macOS fails > > In file included from /dist/src/lib/libc/time/zic.c:9: In file > included from > /dist/tools.aarch64/include/compat/nbtool_config.h:987: > /dist/src/tools/compat/compat_defs.h:620:7: warning: incompatible > redeclaration of library function 'mempcpy' > [-Wincompatible-library-redeclaration] 620 | char *mempcpy(void > *, const void *, size_t); > | ^ I just saw PR toolchain/59848 -- which is fixed and closed, and that might fix it. However I'm curious why the declaration needs to be there, or rather to be exposed, if the compiler seems to have a built-in idea of what it should be. Perhaps the next error reveals the root of the problem being in whatever configure check is used to set up nbtool_config.h. > /dist/src/tools/compat/compat_defs.h:620:7: note: 'mempcpy' is a > builtin with type 'void *(void *, const void *, unsigned long)' In > file included from /dist/src/lib/libc/time/zic.c:35: > /dist/src/lib/libc/time/private.h:858:1: error: static declaration > of 'mempcpy' follows non-static declaration 858 | mempcpy(void > *restrict s1, void const *restrict s2, size_t n) > | ^ > /dist/src/tools/compat/compat_defs.h:620:7: note: previous > declaration is here 620 | char *mempcpy(void *, const void *, > size_t); > | ^ > 1 warning and 1 error generated. > --- zic.lo --- > > *** Failed target: zic.lo In directory: /dist/src/tools/zic Failed > *** commands: > ${_MKTARGET_COMPILE} => @# "compile " zic/zic.lo ${HOST_COMPILE.c} > -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} > ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} => /usr/bin/clang -O2 > -fno-stack-protector -no-cpp-precomp -DHAVE_GETTEXT=0 > -I/dist/tools.aarch64/include/compat -I/dist/src/tools/compat > -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 > -DREPORT_BUGS_TO=\"[email protected]\" -DPKGVERSION='"(tzcode) "' > -DTZVERSION='"2025c"' -DZIC_BLOAT_DEFAULT='"slim"' -D_KERNTYPES -c > -o zic.lo.o -Wno-format-nonliteral /dist/src/lib/libc/time/zic.c > ${MV} ${.TARGET}.o ${.TARGET} => mv -f zic.lo.o zic.lo > *** [zic.lo] Error code 1 > -- Greg A. Woods <[email protected]> Kelowna, BC +1 250 762-7675 RoboHack <[email protected]> Planix, Inc. <[email protected]> Avoncote Farms <[email protected]>
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRuK6dmwVAucmRxuh9mfXG3eL/0fwUCaUX9RgAKCRBmfXG3eL/0 f8xlAKDtm3Mw9wLmHI+K8g8FdhlX/p9g9wCdHfQlo7DjsLho8RMXLiiG3MpWPF0= =2UgW -----END PGP SIGNATURE-----