Open Neved4 opened 3 months ago
note to self, fails to crosscompile as well with the same looking errors, from running zig build -Dtarget=x86_64-macos-none -Doptimize=ReleaseSafe -Dcpu=x86_64_v2
in my linux host
this is a regression from #1, CI should be added to prevent it in the future, as well as bumping to zig 0.13
/home/luna/.cache/zig/p/12202b523979650f48ed9d6a7ed263a28772f12b6c552cf72011fc6b979fb15e9090/src/strlcpy.c:31:1: error: expected parameter declarator
strlcpy(char *dst, const char *src, size_t siz)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_string.h:112:47: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
# define _USE_FORTIFY_LEVEL 2
^
/home/luna/.cache/zig/p/12202b523979650f48ed9d6a7ed263a28772f12b6c552cf72011fc6b979fb15e9090/src/strlcpy.c:31:1: error: expected ')'
strlcpy(char *dst, const char *src, size_t siz)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_string.h:112:47: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
# define _USE_FORTIFY_LEVEL 2
^
/home/luna/.cache/zig/p/12202b523979650f48ed9d6a7ed263a28772f12b6c552cf72011fc6b979fb15e9090/src/strlcpy.c:31:1: note: to match this '('
strlcpy(char *dst, const char *src, size_t siz)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_string.h:112:47: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/home/luna/.cache/zig/p/12202b523979650f48ed9d6a7ed263a28772f12b6c552cf72011fc6b979fb15e9090/src/strlcpy.c:31:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int
strlcpy(char *dst, const char *src, size_t siz)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_string.h:112:47: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/home/luna/.cache/zig/p/12202b523979650f48ed9d6a7ed263a28772f12b6c552cf72011fc6b979fb15e9090/src/strlcpy.c:31:1: error: conflicting types for '__builtin___strlcpy_chk'
strlcpy(char *dst, const char *src, size_t siz)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_string.h:112:3: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/home/luna/.cache/zig/p/12202b523979650f48ed9d6a7ed263a28772f12b6c552cf72011fc6b979fb15e9090/src/strlcpy.c:31:1: note: '__builtin___strlcpy_chk' is a builtin with type 'unsigned long (char *, const char *, unsigned long, unsigned long)'
strlcpy(char *dst, const char *src, size_t siz)
^
/home/luna/.zvm/0.12.0/lib/libc/include/any-macos-any/secure/_string.h:112:3: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
awtfdb
fails tozig build
on macOS.Errors raised point to system headers and several macros (
strlcpy
,__darwin_obsz
,_USE_FORTIFY_LEVEL
) as well as conflicting types:System details
macOS
14.6
2408
12.1
arm64
0.3.0