pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/59701: Build failures for cross/arm-none-eabi-gcc on macOS
>Number: 59701
>Category: pkg
>Synopsis: Build failures for cross/arm-none-eabi-gcc on macOS
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 10 12:35:00 +0000 2025
>Originator: Yuri Honegger
>Release: current 10.10.2025
>Organization:
>Environment:
Darwin hostname.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:29 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6030 arm64
macOS Sequoia 15.5
>Description:
Building cross/arm-none-eabi-gcc on macOS fails with a build error:
yuri@yuriLaptop-2 ~/pkgsrc/sysutils/u-boot-a10-olinuxino-lime @ bmake
=> Bootstrap dependency digest>=20211023: found digest-20220214
=> Checksum BLAKE2s OK for u-boot-2018.11.tar.bz2
=> Checksum SHA512 OK for u-boot-2018.11.tar.bz2
===> Installing dependencies for u-boot-a10-olinuxino-lime-2018.11nb4
==========================================================================
The following variables will affect the build process of this package,
u-boot-a10-olinuxino-lime-2018.11nb4. Their current value is shown below:
* PYTHON_VERSION_DEFAULT = 312
Based on these variables, the following variables have been set:
* PYPACKAGE = python27
You may want to abort the process now with CTRL-C and change the value
of variables in the first group before continuing. Be sure to run
`/Users/yuri/pkg/bin/bmake clean' after the changes.
==========================================================================
=> Tool dependency cross-arm-none-eabi-gcc-[0-9]*: NOT found
=> Verifying reinstall for ../../cross/arm-none-eabi-gcc
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Skipping vulnerability checks.
WARNING: No /Users/yuri/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/Users/yuri/pkg/sbin/pkg_admin -K /Users/yuri/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Building for cross-arm-none-eabi-gcc-14.3.0
gmake[1]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build'
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/build-aarch64-apple-darwin24/libiberty'
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libiberty'
gmake[3]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/build-aarch64-apple-darwin24/libiberty/testsuite'
gmake[3]: Nothing to be done for 'all'.
gmake[3]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/build-aarch64-apple-darwin24/libiberty/testsuite'
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/build-aarch64-apple-darwin24/libiberty'
gmake[3]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libiberty/testsuite'
gmake[3]: Nothing to be done for 'all'.
gmake[3]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libiberty/testsuite'
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libbacktrace'
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libiberty'
/Users/yuri/pkg/bin/gmake all-am
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/zlib'
clang -DPACKAGE_NAME=\"zlib\" -DPACKAGE_TARNAME=\"zlib\" -DPACKAGE_VERSION=\"1.1.4\" -DPACKAGE_STRING=\"zlib\ 1.1.4\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"zlib\" -DVERSION=\"1.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_MEMCPY=1 -DHAVE_STRERROR=1 -DHAVE_UNISTD_H=1 -I. -I/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib -I/Users/yuri/pkg/include -O2 -I/Users/yuri/pkg/include -MT libz_a-zutil.o -MD -MP -MF .deps/libz_a-zutil.Tpo -c -o libz_a-zutil.o `test -f 'zutil.c' || echo '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/'`zutil.c
gmake[3]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libbacktrace'
true DO=all multi-do # /Users/yuri/pkg/bin/gmake
gmake[3]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libbacktrace'
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libbacktrace'
true "AR_FLAGS=rc" "CC_FOR_BUILD=clang" "CFLAGS=-O2 -I/Users/yuri/pkg/include " "CXXFLAGS=-O2 -I/Users/yuri/pkg/include " "CFLAGS_FOR_BUILD=-O2 -I/Users/yuri/pkg/include" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c -o yuri -g staff" "INSTALL_DATA=/usr/bin/install -c -o yuri -g staff -m 644" "INSTALL_PROGRAM=/usr/bin/install -c -o yuri -g staff -m 755" "INSTALL_SCRIPT=/usr/bin/install -c -o yuri -g staff -m 755" "LDFLAGS=-L/Users/yuri/pkg/lib" "LIBCFLAGS=-O2 -I/Users/yuri/pkg/include " "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=/Users/yuri/pkg/bin/gmake" "MAKEINFO=/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/.tools/bin/makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/Users/yuri/pkg/cross-arm-none-eabi" "infodir=/Users/yuri/pkg/cross-arm-none-eabi/info" "libdir=/Users/yuri/pkg/cross-arm-none-eabi/lib" "prefix=/Users/yuri/pkg/cross-arm-none-eabi" "t
ooldir=/Users/yuri/pkg/cross-arm-none-eabi/arm-none-eabi" "AR=ar " "AS=as" "CC=clang" "CXX=clang++" "LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" "LIBCFLAGS=-O2 -I/Users/yuri/pkg/include " "NM=nm" "PICFLAG=" "RANLIB=ranlib " "DESTDIR=" DO=all multi-do # /Users/yuri/pkg/bin/gmake
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libcody' gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libcody'
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libdecnumber'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/libdecnumber'
In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:8:
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:163:11: warning: 'OS_CODE' macro redefined [-Wmacro-redefined] 163 | # define OS_CODE 19
| ^
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:134:11: note: previous definition is here
134 | # define OS_CODE 7
| ^
In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:10:
In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/gzguts.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '(' 318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
| ^ /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
26 | #define NULL ((void*)0)
| ^ In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:10:
In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/gzguts.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected ')' /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:16: note: expanded from macro 'NULL' 26 | #define NULL ((void*)0)
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: note: to match this '('
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen' 140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:15: note: expanded from macro 'NULL'
26 | #define NULL ((void*)0)
| ^
In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:10:
In file included from /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/gzguts.h:21: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected ')'
318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
| ^
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:22: note: expanded from macro 'NULL'
26 | #define NULL ((void*)0)
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: note: to match this '('
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
26 | #define NULL ((void*)0)
| ^
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:133:22: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
133 | const char * ZEXPORT zError(err)
| ^
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:305:22: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
305 | voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
| ^
/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.c:315:20: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
315 | void ZLIB_INTERNAL zcfree (opaque, ptr)
| ^
4 warnings and 3 errors generated.
gmake[2]: *** [Makefile:801: libz_a-zutil.o] Error 1
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/zlib'
gmake[1]: *** [Makefile:9540: all-zlib] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/fixincludes'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/fixincludes'
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/build-aarch64-apple-darwin24/fixincludes'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/build-aarch64-apple-darwin24/fixincludes'
gmake[2]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/lto-plugin'
/Users/yuri/pkg/bin/gmake all-am
gmake[3]: Entering directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/lto-plugin'
gmake[3]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/lto-plugin'
gmake[2]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build/lto-plugin'
gmake[1]: Leaving directory '/Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/build'
gmake: *** [Makefile:1056: all] Error 2
*** Error code 2
Stop.
bmake[2]: stopped making "reinstall" in /Users/yuri/pkgsrc/cross/arm-none-eabi-gcc
*** Error code 1
Stop.
bmake[1]: stopped making "reinstall" in /Users/yuri/pkgsrc/cross/arm-none-eabi-gcc
*** Error code 1
Stop.
bmake: stopped making "all" in /Users/yuri/pkgsrc/sysutils/u-boot-a10-olinuxino-lime
The error seems to boil down to this:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '(' 318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
| ^ /Users/yuri/pkgsrc/work/cross/arm-none-eabi-gcc/work/gcc-14.3.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
26 | #define NULL ((void*)0)
| ^
>How-To-Repeat:
On macOS (here sequoia 15.5 on apple silicon)
cd cross/arm-none-eabi-gcc
bmake
>Fix:
Commenting out "#define fdopen(fd,mode) NULL /* No fdopen() */" in zutil.h seems to make it build successfully.
Looking at upstream gcc, it seems to have been resolved on the master branch since the code causing the error has been removed:
https://github.com/gcc-mirror/gcc/commit/7a79219383c83c71cc9751c0d72830428fac0db0#diff-8e4f6084c325e8bb8b2460d5b74ebe5e630965ab7f92b218b85d88c8fe657d56
Home |
Main Index |
Thread Index |
Old Index