Any known fix for this?

MacOS 26.2
MacMini M4

1090_ gcc --version 
Apple clang version 17.0.0 (clang-1700.6.3.2)
Target: arm64-apple-darwin25.2.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

1091_ clang --version
clang version 21.1.8
Target: arm64-apple-darwin25.2.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-21/bin

 David

I’m getting the following.

Attempting to fetch 
https://packages.macports.org/bazel/bazel-7.1.2_0.darwin_25.arm64.tbz2
Attempting to fetch 
http://mirror.fcix.net/macports/packages/bazel/bazel-7.1.2_0.darwin_25.arm64.tbz2
Attempting to fetch 
https://bos.us.packages.macports.org/bazel/bazel-7.1.2_0.darwin_25.arm64.tbz2
--->  Archive not available for bazel, building locally
--->  Fetching distfiles for bazel
--->  Verifying checksums for bazel
--->  Extracting bazel
--->  Configuring bazel
--->  Building bazel
Error: Failed to build bazel: command execution failed

Error: See 
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bazel/bazel/main.log
 for details.

The log shows the error in zlib/zutil.h

:info:build In file included from third_party/zlib/zutil.c:8:
:info:build third_party/zlib/zutil.h:170:11: warning: 'OS_CODE' macro redefined 
[-Wmacro-redefined]
:info:build   170 | #  define OS_CODE 19
:info:build       |           ^
:info:build third_party/zlib/zutil.h:141:11: note: previous definition is here
:info:build   141 | #  define OS_CODE  7
:info:build       |           ^
:info:build In file included from third_party/zlib/zutil.c:10:
:info:build In file included from third_party/zlib/gzguts.h:20:
:info:build In file included from 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
:info:build 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:322:7:
 error: expected identifier or '('
:info:build   322 | FILE    *fdopen(int, const char *) 
__DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
:info:build       |          ^
:info:build third_party/zlib/zutil.h:147:33: note: expanded from macro 'fdopen'
:info:build   147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
:info:build       |                                 ^
:info:build 
Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:16:
 note: expanded from macro 'NULL'
:info:build    26 | #define NULL ((void*)0)
:info:build       |                ^

The relevant section of the file is:

#if defined(MACOS) || defined(TARGET_OS_MAC)
#  define OS_CODE  7
#  ifndef Z_SOLO
#    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
#      include <unix.h> /* for fdopen */
#    else
#      ifndef fdopen
#        define fdopen(fd,mode) NULL /* No fdopen() */
#      endif
#    endif
#  endif
#endif

#ifdef __acorn
#  define OS_CODE 13
#endif

#if defined(WIN32) && !defined(__CYGWIN__)
#  define OS_CODE  10
#endif

#ifdef _BEOS_
#  define OS_CODE  16
#endif

#ifdef __TOS_OS400__
#  define OS_CODE 18
#endif

#ifdef __APPLE__
#  define OS_CODE 19
#endif

Reply via email to