Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolchain build kivy command is failing with Xcode 16 #936

Closed
lukieh2014 opened this issue Sep 24, 2024 · 20 comments
Closed

Toolchain build kivy command is failing with Xcode 16 #936

lukieh2014 opened this issue Sep 24, 2024 · 20 comments

Comments

@lukieh2014
Copy link

Versions

  • Python : 3.11.6
  • MacOS version : Sonoma 14.5
  • XCode Version : 16.0
  • Cython version : 3.0.0

The 'toolchain build kivy' command does not seem to work with Xcode 16, producing errors shown below.

To Reproduce

cd kivy_project
python3.11 -m venv venv
. venv/bin/activate
pip install kivy-ios
toolchain build kivy <- causing errors

I have also tried it with cloning the github, and get the same errors:

Expected behavior
A successful build with toolchain.

Logs


[DEBUG   ] New State: libffi.install_hostpython_prerequisites at 2024-09-24 18:53:37.877183
[INFO    ] Build_all libffi
[INFO    ] Build libffi for iphoneos-arm64, iphonesimulator-arm64 (filtered)
[INFO    ] Build libffi
[INFO    ] Prebuild libffi for arm64
[INFO    ] Apply patch enable-tramp-build.patch
[INFO    ] Running Shell: /usr/bin/sed ('-i.bak', 's/-miphoneos-version-min=7.0/-miphoneos-version-min=9.0/g', 'generate-darwin-source-and-headers.py') {'_iter': True, '_out_bufsize': 1, '_err_to_out': True}
[INFO    ] Running Shell: /usr/bin/sed ('-i.bak', "s/build_target(ios_simulator_i386_platform, platform_headers)/print('Skipping i386')/g", 'generate-darwin-source-and-headers.py') {'_iter': True, '_out_bufsize': 1, '_err_to_out': True}
[INFO    ] Build libffi for arm64
[INFO    ] Running Shell: /Users/luke/Kivy_stuff/venv/bin/python3 ('generate-darwin-source-and-headers.py', '--only-ios') {'_iter': True, '_out_bufsize': 1, '_err_to_out': True}
[DEBUG   ] Skipping i386
[DEBUG   ] checking build system type... aarch64-apple-darwin23.5.0
[DEBUG   ] checking host system type... x86_64-apple-darwin13
[DEBUG   ] checking target system type... x86_64-apple-darwin13
[DEBUG   ] checking for gsed... sed
[DEBUG   ] checking for a BSD-compatible install... /usr/bin/install -c
[DEBUG   ] checking whether build environment is sane... yes
[DEBUG   ] checking for x86_64-apple-darwin13-strip... no
[DEBUG   ] checking for strip... strip
[DEBUG   ] checking for a race-free mkdir -p... ../install-sh -c -d
[DEBUG   ] checking for gawk... no
[DEBUG   ] checking for mawk... no
[DEBUG   ] checking for nawk... no
[DEBUG   ] checking for awk... awk
[DEBUG   ] checking whether make sets $(MAKE)... yes
[DEBUG   ] checking whether make supports nested variables... yes
[DEBUG   ] checking for x86_64-apple-darwin13-gcc... xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator
[DEBUG   ] checking whether the C compiler works... yes
[DEBUG   ] checking for C compiler default output file name... a.out
[DEBUG   ] checking for suffix of executables...
[DEBUG   ] checking whether we are cross compiling... yes
[DEBUG   ] checking for suffix of object files... o
[DEBUG   ] checking whether the compiler supports GNU C... yes
[DEBUG   ] checking whether xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator accepts -g... yes
[DEBUG   ] checking for xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator option to enable C11 features... none needed
[DEBUG   ] checking whether xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator understands -c and -o together... yes
[DEBUG   ] checking whether make supports the include directive... yes (GNU style)
[DEBUG   ] checking dependency style of xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator... gcc3
[DEBUG   ] checking for x86_64-apple-darwin13-g++... no
[DEBUG   ] checking for x86_64-apple-darwin13-c++... no
[DEBUG   ] checking for x86_64-apple-darwin13-gpp... no
[DEBUG   ] checking for x86_64-apple-darwin13-aCC... no
[DEBUG   ] checking for x86_64-apple-darwin13-CC... no
[DEBUG   ] checking for x86_64-apple-darwin13-cxx... no
[DEBUG   ] checking for x86_64-apple-darwin13-cc++... no
[DEBUG   ] checking for x86_64-apple-darwin13-cl.exe... no
[DEBUG   ] checking for x86_64-apple-darwin13-FCC... no
[DEBUG   ] checking for x86_64-apple-darwin13-KCC... no
[DEBUG   ] checking for x86_64-apple-darwin13-RCC... no
[DEBUG   ] checking for x86_64-apple-darwin13-xlC_r... no
[DEBUG   ] checking for x86_64-apple-darwin13-xlC... no
[DEBUG   ] checking for x86_64-apple-darwin13-clang++... no
[DEBUG   ] checking for g++... g++
[DEBUG   ] configure: WARNING: using cross tools not prefixed with host triplet
[DEBUG   ] checking whether the compiler supports GNU C++... yes
[DEBUG   ] checking whether g++ accepts -g... yes
[DEBUG   ] checking for g++ option to enable C++11 features... none needed
[DEBUG   ] checking dependency style of g++... gcc3
[DEBUG   ] checking dependency style of xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator... gcc3
[DEBUG   ] checking for grep that handles long lines and -e... /usr/bin/grep
[DEBUG   ] checking for egrep... /usr/bin/grep -E
[DEBUG   ] checking how to print strings... printf
[DEBUG   ] checking for a sed that does not truncate output... /usr/bin/sed
[DEBUG   ] checking for fgrep... /usr/bin/grep -F
[DEBUG   ] checking for ld used by xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator... xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator
[DEBUG   ] checking if the linker (xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator) is GNU ld... no
[DEBUG   ] checking for BSD- or MS-compatible name lister (nm)... no
[DEBUG   ] checking for x86_64-apple-darwin13-dumpbin... no
[DEBUG   ] checking for x86_64-apple-darwin13-link... no
[DEBUG   ] checking for dumpbin... no
[DEBUG   ] checking for link... link -dump
[DEBUG   ] checking the name lister (nm) interface... BSD nm
[DEBUG   ] checking whether ln -s works... yes
[DEBUG   ] checking the maximum length of command line arguments... 786432
[DEBUG   ] checking how to convert aarch64-apple-darwin23.5.0 file names to x86_64-apple-darwin13 format... func_convert_file_noop
[DEBUG   ] checking how to convert aarch64-apple-darwin23.5.0 file names to toolchain format... func_convert_file_noop
[DEBUG   ] checking for xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator option to reload object files... -r
[DEBUG   ] checking for x86_64-apple-darwin13-file... no
[DEBUG   ] checking for file... file
[DEBUG   ] checking for x86_64-apple-darwin13-objdump... no
[DEBUG   ] checking for objdump... objdump
[DEBUG   ] checking how to recognize dependent libraries... pass_all
[DEBUG   ] checking for x86_64-apple-darwin13-dlltool... no
[DEBUG   ] checking for dlltool... no
[DEBUG   ] checking how to associate runtime and link libraries... printf %s\n
[DEBUG   ] checking for x86_64-apple-darwin13-ar... no
[DEBUG   ] checking for ar... ar
[DEBUG   ] checking for archiver @FILE support... no
[DEBUG   ] checking for x86_64-apple-darwin13-strip... strip
[DEBUG   ] checking for x86_64-apple-darwin13-ranlib... no
[DEBUG   ] checking for ranlib... ranlib
[DEBUG   ] checking command to parse nm output from xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator object... ok
[DEBUG   ] checking for sysroot... no
[DEBUG   ] checking for a working dd... /bin/dd
[DEBUG   ] checking how to truncate binary pipes... /bin/dd bs=4096 count=1
[DEBUG   ] checking for x86_64-apple-darwin13-mt... no
[DEBUG   ] checking for mt... no
[DEBUG   ] checking if : is a manifest tool... no
[DEBUG   ] checking for x86_64-apple-darwin13-dsymutil... no
[DEBUG   ] checking for dsymutil... dsymutil
[DEBUG   ] checking for x86_64-apple-darwin13-nmedit... no
[DEBUG   ] checking for nmedit... nmedit
[DEBUG   ] checking for x86_64-apple-darwin13-lipo... no
[DEBUG   ] checking for lipo... lipo
[DEBUG   ] checking for x86_64-apple-darwin13-otool... no
[DEBUG   ] checking for otool... otool
[DEBUG   ] checking for x86_64-apple-darwin13-otool64... no
[DEBUG   ] checking for otool64... no
[DEBUG   ] checking for -single_module linker flag... ld: warning: -single_module is obsolete
[DEBUG   ] no
[DEBUG   ] checking for -exported_symbols_list linker flag... yes
[DEBUG   ] checking for -force_load linker flag... yes
[DEBUG   ] checking for stdio.h... yes
[DEBUG   ] checking for stdlib.h... yes
[DEBUG   ] checking for string.h... yes
[DEBUG   ] checking for inttypes.h... yes
[DEBUG   ] checking for stdint.h... yes
[DEBUG   ] checking for strings.h... yes
[DEBUG   ] checking for sys/stat.h... yes
[DEBUG   ] checking for sys/types.h... yes
[DEBUG   ] checking for unistd.h... yes
[DEBUG   ] checking for dlfcn.h... yes
[DEBUG   ] checking for objdir... .libs
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator supports -fno-rtti -fno-exceptions... yes
[DEBUG   ] checking for xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator option to produce PIC... -fno-common -DPIC
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator PIC flag -fno-common -DPIC works... yes
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator static flag -static works... no
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator supports -c -o file.o... yes
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator supports -c -o file.o... (cached) yes
[DEBUG   ] checking whether the xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator linker (xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator) supports shared libraries... yes
[DEBUG   ] checking dynamic linker characteristics... darwin13 dyld
[DEBUG   ] checking how to hardcode library paths into programs... immediate
[DEBUG   ] checking whether stripping libraries is possible... yes
[DEBUG   ] checking if libtool supports shared libraries... yes
[DEBUG   ] checking whether to build shared libraries... yes
[DEBUG   ] checking whether to build static libraries... yes
[DEBUG   ] checking how to run the C++ preprocessor... g++ -E
[DEBUG   ] checking for ld used by g++... xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator
[DEBUG   ] checking if the linker (xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator) is GNU ld... no
[DEBUG   ] checking whether the g++ linker (xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator) supports shared libraries... yes
[DEBUG   ] checking for g++ option to produce PIC... -fno-common -DPIC
[DEBUG   ] checking if g++ PIC flag -fno-common -DPIC works... yes
[DEBUG   ] checking if g++ static flag -static works... no
[DEBUG   ] checking if g++ supports -c -o file.o... yes
[DEBUG   ] checking if g++ supports -c -o file.o... (cached) yes
[DEBUG   ] checking whether the g++ linker (xcrun -sdk iphonesimulator ld -target x86_64-apple-ios-simulator) supports shared libraries... yes
[DEBUG   ] checking dynamic linker characteristics... darwin13 dyld
[DEBUG   ] checking how to hardcode library paths into programs... immediate
[DEBUG   ] checking for x86_64-apple-darwin13-readelf... no
[DEBUG   ] checking for readelf... no
[DEBUG   ] checking size of size_t... 8
[DEBUG   ] checking for C compiler vendor... clang
[DEBUG   ] checking CFLAGS for most reasonable warnings... -Wall
[DEBUG   ] checking whether to enable maintainer-specific portions of Makefiles... no
[DEBUG   ] checking for sys/memfd.h... no
[DEBUG   ] checking for memfd_create... no
[DEBUG   ] checking for sys/mman.h... yes
[DEBUG   ] checking for mmap... yes
[DEBUG   ] checking for mkostemp... yes
[DEBUG   ] checking for mkstemp... yes
[DEBUG   ] checking for sys/mman.h... (cached) yes
[DEBUG   ] checking for mmap... (cached) yes
[DEBUG   ] checking whether read-only mmap of a plain file works... yes
[DEBUG   ] checking whether mmap from /dev/zero works... no
[DEBUG   ] checking for MAP_ANON(YMOUS)... yes
[DEBUG   ] checking whether mmap with MAP_ANON(YMOUS) works... yes
[DEBUG   ] checking for egrep... (cached) /usr/bin/grep -E
[DEBUG   ] checking for memcpy... yes
[DEBUG   ] checking for size_t... yes
[DEBUG   ] checking for working alloca.h... yes
[DEBUG   ] checking for alloca... yes
[DEBUG   ] checking size of double... 8
[DEBUG   ] checking size of long double... 16
[DEBUG   ] checking whether byte ordering is bigendian... no
[DEBUG   ] checking assembler .cfi pseudo-op support... yes
[DEBUG   ] checking assembler supports pc related relocs... yes
[DEBUG   ] checking whether compiler supports pointer authentication... no
[DEBUG   ] checking for _ prefix in compiled symbols... yes
[DEBUG   ] checking toolchain supports unwind section type... no
[DEBUG   ] checking whether C compiler accepts -fno-lto... yes
[DEBUG   ] checking whether .eh_frame section should be read-only... yes
[DEBUG   ] checking for __attribute__((visibility("hidden")))... yes
[DEBUG   ] clang: error: unsupported option '-print-multi-os-directory'
[DEBUG   ] clang: error: no input files
[DEBUG   ] configure: versioning on shared library symbols is no
[DEBUG   ] checking that generated files are newer than configure... done
[DEBUG   ] configure: creating ./config.status
[DEBUG   ] config.status: creating include/Makefile
[DEBUG   ] config.status: creating include/ffi.h
[DEBUG   ] config.status: creating Makefile
[DEBUG   ] config.status: creating testsuite/Makefile
[DEBUG   ] config.status: creating man/Makefile
[DEBUG   ] config.status: creating doc/Makefile
[DEBUG   ] config.status: creating libffi.pc
[DEBUG   ] config.status: creating fficonfig.h
[DEBUG   ] config.status: executing buildir commands
[DEBUG   ] config.status: skipping top_srcdir/Makefile - not created
[DEBUG   ] config.status: executing depfiles commands
[DEBUG   ] config.status: executing libtool commands
[DEBUG   ] config.status: executing include commands
[DEBUG   ] config.status: executing src commands
[DEBUG   ] checking build system type... aarch64-apple-darwin23.5.0
[DEBUG   ] checking host system type... aarch64-apple-darwin20
[DEBUG   ] checking target system type... aarch64-apple-darwin20
[DEBUG   ] checking for gsed... sed
[DEBUG   ] checking for a BSD-compatible install... /usr/bin/install -c
[DEBUG   ] checking whether build environment is sane... yes
[DEBUG   ] checking for aarch64-apple-darwin20-strip... no
[DEBUG   ] checking for strip... strip
[DEBUG   ] checking for a race-free mkdir -p... ../install-sh -c -d
[DEBUG   ] checking for gawk... no
[DEBUG   ] checking for mawk... no
[DEBUG   ] checking for nawk... no
[DEBUG   ] checking for awk... awk
[DEBUG   ] checking whether make sets $(MAKE)... yes
[DEBUG   ] checking whether make supports nested variables... yes
[DEBUG   ] checking for aarch64-apple-darwin20-gcc... xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator
[DEBUG   ] checking whether the C compiler works... yes
[DEBUG   ] checking for C compiler default output file name... a.out
[DEBUG   ] checking for suffix of executables...
[DEBUG   ] checking whether we are cross compiling... yes
[DEBUG   ] checking for suffix of object files... o
[DEBUG   ] checking whether the compiler supports GNU C... yes
[DEBUG   ] checking whether xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator accepts -g... yes
[DEBUG   ] checking for xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator option to enable C11 features... none needed
[DEBUG   ] checking whether xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator understands -c and -o together... yes
[DEBUG   ] checking whether make supports the include directive... yes (GNU style)
[DEBUG   ] checking dependency style of xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator... gcc3
[DEBUG   ] checking for aarch64-apple-darwin20-g++... no
[DEBUG   ] checking for aarch64-apple-darwin20-c++... no
[DEBUG   ] checking for aarch64-apple-darwin20-gpp... no
[DEBUG   ] checking for aarch64-apple-darwin20-aCC... no
[DEBUG   ] checking for aarch64-apple-darwin20-CC... no
[DEBUG   ] checking for aarch64-apple-darwin20-cxx... no
[DEBUG   ] checking for aarch64-apple-darwin20-cc++... no
[DEBUG   ] checking for aarch64-apple-darwin20-cl.exe... no
[DEBUG   ] checking for aarch64-apple-darwin20-FCC... no
[DEBUG   ] checking for aarch64-apple-darwin20-KCC... no
[DEBUG   ] checking for aarch64-apple-darwin20-RCC... no
[DEBUG   ] checking for aarch64-apple-darwin20-xlC_r... no
[DEBUG   ] checking for aarch64-apple-darwin20-xlC... no
[DEBUG   ] checking for aarch64-apple-darwin20-clang++... no
[DEBUG   ] checking for g++... g++
[DEBUG   ] configure: WARNING: using cross tools not prefixed with host triplet
[DEBUG   ] checking whether the compiler supports GNU C++... yes
[DEBUG   ] checking whether g++ accepts -g... yes
[DEBUG   ] checking for g++ option to enable C++11 features... none needed
[DEBUG   ] checking dependency style of g++... gcc3
[DEBUG   ] checking dependency style of xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator... gcc3
[DEBUG   ] checking for grep that handles long lines and -e... /usr/bin/grep
[DEBUG   ] checking for egrep... /usr/bin/grep -E
[DEBUG   ] checking how to print strings... printf
[DEBUG   ] checking for a sed that does not truncate output... /usr/bin/sed
[DEBUG   ] checking for fgrep... /usr/bin/grep -F
[DEBUG   ] checking for ld used by xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator... xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator
[DEBUG   ] checking if the linker (xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator) is GNU ld... no
[DEBUG   ] checking for BSD- or MS-compatible name lister (nm)... no
[DEBUG   ] checking for aarch64-apple-darwin20-dumpbin... no
[DEBUG   ] checking for aarch64-apple-darwin20-link... no
[DEBUG   ] checking for dumpbin... no
[DEBUG   ] checking for link... link -dump
[DEBUG   ] checking the name lister (nm) interface... BSD nm
[DEBUG   ] checking whether ln -s works... yes
[DEBUG   ] checking the maximum length of command line arguments... 786432
[DEBUG   ] checking how to convert aarch64-apple-darwin23.5.0 file names to aarch64-apple-darwin20 format... func_convert_file_noop
[DEBUG   ] checking how to convert aarch64-apple-darwin23.5.0 file names to toolchain format... func_convert_file_noop
[DEBUG   ] checking for xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator option to reload object files... -r
[DEBUG   ] checking for aarch64-apple-darwin20-file... no
[DEBUG   ] checking for file... file
[DEBUG   ] checking for aarch64-apple-darwin20-objdump... no
[DEBUG   ] checking for objdump... objdump
[DEBUG   ] checking how to recognize dependent libraries... pass_all
[DEBUG   ] checking for aarch64-apple-darwin20-dlltool... no
[DEBUG   ] checking for dlltool... no
[DEBUG   ] checking how to associate runtime and link libraries... printf %s\n
[DEBUG   ] checking for aarch64-apple-darwin20-ar... no
[DEBUG   ] checking for ar... ar
[DEBUG   ] checking for archiver @FILE support... no
[DEBUG   ] checking for aarch64-apple-darwin20-strip... strip
[DEBUG   ] checking for aarch64-apple-darwin20-ranlib... no
[DEBUG   ] checking for ranlib... ranlib
[DEBUG   ] checking command to parse nm output from xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator object... ok
[DEBUG   ] checking for sysroot... no
[DEBUG   ] checking for a working dd... /bin/dd
[DEBUG   ] checking how to truncate binary pipes... /bin/dd bs=4096 count=1
[DEBUG   ] checking for aarch64-apple-darwin20-mt... no
[DEBUG   ] checking for mt... no
[DEBUG   ] checking if : is a manifest tool... no
[DEBUG   ] checking for aarch64-apple-darwin20-dsymutil... no
[DEBUG   ] checking for dsymutil... dsymutil
[DEBUG   ] checking for aarch64-apple-darwin20-nmedit... no
[DEBUG   ] checking for nmedit... nmedit
[DEBUG   ] checking for aarch64-apple-darwin20-lipo... no
[DEBUG   ] checking for lipo... lipo
[DEBUG   ] checking for aarch64-apple-darwin20-otool... no
[DEBUG   ] checking for otool... otool
[DEBUG   ] checking for aarch64-apple-darwin20-otool64... no
[DEBUG   ] checking for otool64... no
[DEBUG   ] checking for -single_module linker flag... ld: warning: -single_module is obsolete
[DEBUG   ] no
[DEBUG   ] checking for -exported_symbols_list linker flag... yes
[DEBUG   ] checking for -force_load linker flag... yes
[DEBUG   ] checking for stdio.h... yes
[DEBUG   ] checking for stdlib.h... yes
[DEBUG   ] checking for string.h... yes
[DEBUG   ] checking for inttypes.h... yes
[DEBUG   ] checking for stdint.h... yes
[DEBUG   ] checking for strings.h... yes
[DEBUG   ] checking for sys/stat.h... yes
[DEBUG   ] checking for sys/types.h... yes
[DEBUG   ] checking for unistd.h... yes
[DEBUG   ] checking for dlfcn.h... yes
[DEBUG   ] checking for objdir... .libs
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator supports -fno-rtti -fno-exceptions... yes
[DEBUG   ] checking for xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator option to produce PIC... -fno-common -DPIC
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator PIC flag -fno-common -DPIC works... yes
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator static flag -static works... no
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator supports -c -o file.o... yes
[DEBUG   ] checking if xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator supports -c -o file.o... (cached) yes
[DEBUG   ] checking whether the xcrun -sdk iphonesimulator clang -target arm64-apple-ios-simulator linker (xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator) supports shared libraries... yes
[DEBUG   ] checking dynamic linker characteristics... darwin20 dyld
[DEBUG   ] checking how to hardcode library paths into programs... immediate
[DEBUG   ] checking whether stripping libraries is possible... yes
[DEBUG   ] checking if libtool supports shared libraries... yes
[DEBUG   ] checking whether to build shared libraries... yes
[DEBUG   ] checking whether to build static libraries... yes
[DEBUG   ] checking how to run the C++ preprocessor... g++ -E
[DEBUG   ] checking for ld used by g++... xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator
[DEBUG   ] checking if the linker (xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator) is GNU ld... no
[DEBUG   ] checking whether the g++ linker (xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator) supports shared libraries... yes
[DEBUG   ] checking for g++ option to produce PIC... -fno-common -DPIC
[DEBUG   ] checking if g++ PIC flag -fno-common -DPIC works... yes
[DEBUG   ] checking if g++ static flag -static works... no
[DEBUG   ] checking if g++ supports -c -o file.o... yes
[DEBUG   ] checking if g++ supports -c -o file.o... (cached) yes
[DEBUG   ] checking whether the g++ linker (xcrun -sdk iphonesimulator ld -target arm64-apple-ios-simulator) supports shared libraries... yes
[DEBUG   ] checking dynamic linker characteristics... darwin20 dyld
[DEBUG   ] checking how to hardcode library paths into programs... immediate
[DEBUG   ] checking for aarch64-apple-darwin20-readelf... no
[DEBUG   ] checking for readelf... no
[DEBUG   ] checking size of size_t... 8
[DEBUG   ] checking for C compiler vendor... clang
[DEBUG   ] checking CFLAGS for most reasonable warnings... -Wall
[DEBUG   ] checking whether to enable maintainer-specific portions of Makefiles... no
[DEBUG   ] checking for sys/memfd.h... no
[DEBUG   ] checking for memfd_create... no
[DEBUG   ] checking for sys/mman.h... yes
[DEBUG   ] checking for mmap... yes
[DEBUG   ] checking for mkostemp... yes
[DEBUG   ] checking for mkstemp... yes
[DEBUG   ] checking for sys/mman.h... (cached) yes
[DEBUG   ] checking for mmap... (cached) yes
[DEBUG   ] checking whether read-only mmap of a plain file works... yes
[DEBUG   ] checking whether mmap from /dev/zero works... no
[DEBUG   ] checking for MAP_ANON(YMOUS)... yes
[DEBUG   ] checking whether mmap with MAP_ANON(YMOUS) works... yes
[DEBUG   ] checking for egrep... (cached) /usr/bin/grep -E
[DEBUG   ] checking for memcpy... yes
[DEBUG   ] checking for size_t... yes
[DEBUG   ] checking for working alloca.h... yes
[DEBUG   ] checking for alloca... yes
[DEBUG   ] checking size of double... 8
[DEBUG   ] checking size of long double... 8
[DEBUG   ] checking whether byte ordering is bigendian... no
[DEBUG   ] checking assembler .cfi pseudo-op support... yes
[DEBUG   ] checking whether compiler supports pointer authentication... no
[DEBUG   ] checking for _ prefix in compiled symbols... yes
[DEBUG   ] checking whether C compiler accepts -fno-lto... yes
[DEBUG   ] checking whether .eh_frame section should be read-only... yes
[DEBUG   ] checking for __attribute__((visibility("hidden")))... yes
[DEBUG   ] clang: error: unsupported option '-print-multi-os-directory'
[DEBUG   ] clang: error: no input files
[DEBUG   ] configure: versioning on shared library symbols is no
[DEBUG   ] checking that generated files are newer than configure... done
[DEBUG   ] configure: creating ./config.status
[DEBUG   ] config.status: creating include/Makefile
[DEBUG   ] config.status: creating include/ffi.h
[DEBUG   ] config.status: creating Makefile
[DEBUG   ] config.status: creating testsuite/Makefile
[DEBUG   ] config.status: creating man/Makefile
[DEBUG   ] config.status: creating doc/Makefile
[DEBUG   ] config.status: creating libffi.pc
[DEBUG   ] config.status: creating fficonfig.h
[DEBUG   ] config.status: executing buildir commands
[DEBUG   ] config.status: skipping top_srcdir/Makefile - not created
[DEBUG   ] config.status: executing depfiles commands
[DEBUG   ] config.status: executing libtool commands
[DEBUG   ] config.status: executing include commands
[DEBUG   ] config.status: executing src commands
[DEBUG   ] checking build system type... aarch64-apple-darwin23.5.0
[DEBUG   ] checking host system type... arm-apple-darwin11
[DEBUG   ] checking target system type... arm-apple-darwin11
[DEBUG   ] checking for gsed... sed
[DEBUG   ] checking for a BSD-compatible install... /usr/bin/install -c
[DEBUG   ] checking whether build environment is sane... yes
[DEBUG   ] checking for arm-apple-darwin11-strip... no
[DEBUG   ] checking for strip... strip
[DEBUG   ] checking for a race-free mkdir -p... ../install-sh -c -d
[DEBUG   ] checking for gawk... no
[DEBUG   ] checking for mawk... no
[DEBUG   ] checking for nawk... no
[DEBUG   ] checking for awk... awk
[DEBUG   ] checking whether make sets $(MAKE)... yes
[DEBUG   ] checking whether make supports nested variables... yes
[DEBUG   ] checking for arm-apple-darwin11-gcc... xcrun -sdk iphoneos clang -target armv7-apple-ios
[DEBUG   ] checking whether the C compiler works... no
[DEBUG   ] configure: error: in `/Users/luke/Kivy_stuff/build/libffi/iphoneos-arm64/libffi-3.4.4/build_iphoneos-armv7':
[DEBUG   ] configure: error: C compiler cannot create executables
[DEBUG   ] See `config.log' for more details
[DEBUG   ] Traceback (most recent call last):
[DEBUG   ]   File "/Users/luke/Kivy_stuff/build/libffi/iphoneos-arm64/libffi-3.4.4/generate-darwin-source-and-headers.py", line 314, in <module>
[DEBUG   ]     generate_source_and_headers(
[DEBUG   ]   File "/Users/luke/Kivy_stuff/build/libffi/iphoneos-arm64/libffi-3.4.4/generate-darwin-source-and-headers.py", line 283, in generate_source_and_headers
[DEBUG   ]     build_target(ios_device_armv7_platform, platform_headers)
[DEBUG   ]   File "/Users/luke/Kivy_stuff/build/libffi/iphoneos-arm64/libffi-3.4.4/generate-darwin-source-and-headers.py", line 232, in build_target
[DEBUG   ]     subprocess.check_call(['../configure', '-host', platform.triple], env=env)
[DEBUG   ]   File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
[DEBUG   ]     raise CalledProcessError(retcode, cmd)
[DEBUG   ] subprocess.CalledProcessError: Command '['../configure', '-host', 'arm-apple-darwin11']' returned non-zero exit status 77.
Exception in thread background thread for pid 60965:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 1639, in wrap
    fn(*rgs, **kwargs)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 2641, in background_thread
    handle_exit_code(exit_code)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 2332, in fn
    return self.command.handle_command_exit_code(exit_code)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 826, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /Users/luke/Kivy_stuff/venv/bin/python3 generate-darwin-source-and-headers.py --only-ios

  STDOUT:
Skipping i386
checking build system type... aarch64-apple-darwin23.5.0
checking host system type... x86_64-apple-darwin13
checking target system type... x86_64-apple-darwin13
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-apple-darwin13-strip... no
checking for strip... strip
checking for a race-free mkdir -p... ../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-apple-darwin13-gcc... xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator
chec... (21083 more, please see e.stdout)

  STDERR:

Traceback (most recent call last):
  File "/Users/luke/Kivy_stuff/venv/bin/toolchain", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1670, in main
    ToolchainCL()
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1407, in __init__
    getattr(self, args.command)()
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1483, in build
    build_recipes(args.recipe, ctx)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1231, in build_recipes
    recipe.execute()
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 758, in execute
    self.build_all()
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 858, in build_all
    self.build(plat)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 844, in build
    self.build_platform(plat)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/recipes/libffi/__init__.py", line 29, in build_platform
    shprint(python3, "generate-darwin-source-and-headers.py", "--only-ios")
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 60, in shprint
    for line in cmd:
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 882, in __next__
    self.wait()
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 799, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/luke/Kivy_stuff/venv/lib/python3.11/site-packages/sh.py", line 826, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /Users/luke/Kivy_stuff/venv/bin/python3 generate-darwin-source-and-headers.py --only-ios

  STDOUT:
Skipping i386
checking build system type... aarch64-apple-darwin23.5.0
checking host system type... x86_64-apple-darwin13
checking target system type... x86_64-apple-darwin13
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-apple-darwin13-strip... no
checking for strip... strip
checking for a race-free mkdir -p... ../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-apple-darwin13-gcc... xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator
chec... (21083 more, please see e.stdout)

  STDERR:


Additional context
I am on Apple silicon M3 mac, I managed to get a successful build with Xcode 15.2 (after doing brew uninstall libb2), however I don't think that xcode15.2 supports my current IOS version (17.7). After upgrading to Xcode16 (and doing clean runs each time i.e. deleting dist, .cache, build, making new venv, toolchain distclean etc) I am getting the errors above. I think it may be due to the IOS SDK being used (with Xcode16 it is IOS 18) is too new and is unsupported? but not really sure - i am a bit of a noob with this stuff...

@lukieh2014 lukieh2014 changed the title Toolchain build kivy command is failing Toolchain build kivy command is failing with Xcode 16 Sep 24, 2024
@Dekto
Copy link

Dekto commented Sep 24, 2024

Hello,

I have the same problem on the MacBook Air M2.

MacOS 15.0
Xcode 16


Exception in thread background thread for pid 6408:
Traceback (most recent call last):
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/threading.py", line 1052, in _bootstrap_inner
    self.run()
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/threading.py", line 989, in run
    self._target(*self._args, **kwargs)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 1639, in wrap
    fn(*rgs, **kwargs)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 2641, in background_thread
    handle_exit_code(exit_code)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 2332, in fn
    return self.command.handle_command_exit_code(exit_code)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 826, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/[REDACTED]/.pyenv/versions/3.12.0/bin/python3 generate-darwin-source-and-headers.py --only-ios

  STDOUT:
Skipping i386
checking build system type... aarch64-apple-darwin24.0.0
checking host system type... x86_64-apple-darwin13
checking target system type... x86_64-apple-darwin13
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-apple-darwin13-strip... no
checking for strip... strip
checking for a race-free mkdir -p... ../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-apple-darwin13-gcc... xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator
chec... (21197 more, please see e.stdout)

  STDERR:

Traceback (most recent call last):
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/bin/toolchain", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 1670, in main
    ToolchainCL()
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 1407, in __init__
    getattr(self, args.command)()
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 1483, in build
    build_recipes(args.recipe, ctx)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 1231, in build_recipes
    recipe.execute()
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 758, in execute
    self.build_all()
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 858, in build_all
    self.build(plat)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 844, in build
    self.build_platform(plat)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/recipes/libffi/__init__.py", line 29, in build_platform
    shprint(python3, "generate-darwin-source-and-headers.py", "--only-ios")
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/kivy_ios/toolchain.py", line 60, in shprint
    for line in cmd:
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 882, in __next__
    self.wait()
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 799, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/[REDACTED]/.pyenv/versions/3.12.0/lib/python3.12/site-packages/sh.py", line 826, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/[REDACTED]/.pyenv/versions/3.12.0/bin/python3 generate-darwin-source-and-headers.py --only-ios

  STDOUT:
Skipping i386
checking build system type... aarch64-apple-darwin24.0.0
checking host system type... x86_64-apple-darwin13
checking target system type... x86_64-apple-darwin13
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-apple-darwin13-strip... no
checking for strip... strip
checking for a race-free mkdir -p... ../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-apple-darwin13-gcc... xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator
chec... (21197 more, please see e.stdout)

  STDERR:

Can no longer perform a toolchain build process.

Is there already a solution for this?

Best regards

@tcaduser
Copy link
Contributor

I am seeing the same issue. It looks like it is occuring in the libffi recipe build.

[DEBUG   ] clang: error: unsupported option '-print-multi-os-directory'
[DEBUG   ] clang: error: no input files

@tcaduser
Copy link
Contributor

Additional errors I am seeing in the libffi config.log

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:4555: $? = 0
configure:4544: xcrun -sdk iphoneos clang -target armv7-apple-ios -v >&5
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: armv7-apple-ios
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:4555: $? = 0
configure:4544: xcrun -sdk iphoneos clang -target armv7-apple-ios -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:4555: $? = 1
configure:4544: xcrun -sdk iphoneos clang -target armv7-apple-ios -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:4555: $? = 1
configure:4544: xcrun -sdk iphoneos clang -target armv7-apple-ios -version >&5
clang: error: unknown argument '-version'; did you mean '--version'?
clang: error: no input files
configure:4555: $? = 1
configure:4575: checking whether the C compiler works
configure:4597: xcrun -sdk iphoneos clang -target armv7-apple-ios -miphoneos-version-min=9.0 -fembed-bitcode   conftest.c  >&5
ld: warning: -bitcode_bundle is no longer supported and will be ignored
ld: -mllvm and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:4601: $? = 1

@tcaduser
Copy link
Contributor

Applying this patch fixes the libffi build:

diff --git a/kivy_ios/recipes/libffi/__init__.py b/kivy_ios/recipes/libffi/__init__.py
index 504280b..5b061e7 100644
--- a/kivy_ios/recipes/libffi/__init__.py
+++ b/kivy_ios/recipes/libffi/__init__.py
@@ -22,6 +22,10 @@ class LibffiRecipe(Recipe):
                 "-i.bak",
                 "s/build_target(ios_simulator_i386_platform, platform_headers)/print('Skipping i386')/g",
                 "generate-darwin-source-and-headers.py")
+        shprint(sh.sed,
+                "-i.bak",
+                "s/ -fembed-bitcode//g",
+                "generate-darwin-source-and-headers.py")
         self.set_marker("patched")
 
     def build_platform(self, plat):

And now SDL_ttf is broken.

[DEBUG   ] /Users/jsanchez/git/tmp/build/sdl2_ttf/iphoneos-arm64/SDL2_ttf-2.20.2/external/harfbuzz/src/hb-ft.cc:759:73: error: 
[DEBUG   ]       cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to
[DEBUG   ]       'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible
[DEBUG   ]       function type [-Werror,-Wcast-function-type-strict]
[DEBUG   ]   759 |   ...!= (FT_Generic_Finalizer) hb_ft_face_finalize))
[DEBUG   ]       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[DEBUG   ] In file included from /Users/jsanchez/git/tmp/build/sdl2_ttf/iphoneos-arm64/SDL2_ttf-2.20.2/external/harfbuzz/src/hb-ft.cc:30:
[DEBUG   ] /Users/jsanchez/git/tmp/build/sdl2_ttf/iphoneos-arm64/SDL2_ttf-2.20.2/external/harfbuzz/src/hb.hh:260:46: note: 
[DEBUG   ]       expanded from macro 'unlikely'
[DEBUG   ]   260 | #define unlikely(expr) (__builtin_expect (!!(expr), 0))
[DEBUG   ]       |                                              ^~~~
[DEBUG   ] /Users/jsanchez/git/tmp/build/sdl2_ttf/iphoneos-arm64/SDL2_ttf-2.20.2/external/harfbuzz/src/hb-ft.cc:765:34: error: 
[DEBUG   ]       cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to
[DEBUG   ]       'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible
[DEBUG   ]       function type [-Werror,-Wcast-function-type-strict]
[DEBUG   ]   765 |     ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
[DEBUG   ]       |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[DEBUG   ] /Users/jsanchez/git/tmp/build/sdl2_ttf/iphoneos-arm64/SDL2_ttf-2.20.2/external/harfbuzz/src/hb-ft.cc:1035:32: error: 
[DEBUG   ]       cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to
[DEBUG   ]       'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible
[DEBUG   ]       function type [-Werror,-Wcast-function-type-strict]
[DEBUG   ]  1035 |   ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
[DEBUG   ]       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[DEBUG   ] 3 errors generated.

@eljarro
Copy link

eljarro commented Sep 25, 2024

I have the same build problems including identical messages listed previously by others.

Using:

  • XCode Version: 16.0
  • Python: 3.9.6 (also tried 3.12.6)
  • Cython: 0.29.36 (also tried 3.0.0)
  • MacOS: Sonoma 14.5
  • on Macbook Pro M3

@tcaduser
Copy link
Contributor

I am working on a patch. It is important to note that homebrew can pollute the python search path, so make sure you remove /opt/homebrew/bin/ from your path.

tcaduser added a commit to tcaduser/kivy-ios that referenced this issue Sep 25, 2024
@tcaduser
Copy link
Contributor

tcaduser commented Sep 25, 2024

I am working on a patch. It is important to note that homebrew can pollute the python search path, so make sure you remove /opt/homebrew/bin/ from your path.

You may be able to get away with

  /opt/homebrew/bin/brew uninstall --ignore-dependencies libb2

For context please see Issues #929 #905 #901

@tcaduser
Copy link
Contributor

For those wanting to try my patch:

 git clone --branch fixxc16 https://github.com/tcaduser/kivy-ios
 python3 -mvenv venv
 source venv/bin/activate
 cd kivy-ios
 pip install -e .

Then to build:

cd ..
toolchain build kivy

@psychowasp
Copy link

psychowasp commented Sep 25, 2024

https://www.xcodes.app/
to install / manage multi versions of xcode
just use this to install 15.4…

@lukieh2014
Copy link
Author

For those wanting to try my patch:

 git clone --branch fixxc16 https://github.com/tcaduser/kivy-ios
 python3 -mvenv venv
 source venv/bin/activate
 cd kivy-ios
 pip install -e .

Then to build:

cd ..
toolchain build kivy

This is working for me! the toolchain built successfully, thanks so much !

@Dekto
Copy link

Dekto commented Sep 25, 2024

Hello, I haven't been able to test it yet. Does the fix also work on macos 15.0?

@tcaduser
Copy link
Contributor

Hello, I haven't been able to test it yet. Does the fix also work on macos 15.0?

It looks like my pull request was accepted and merged into main. It was passing all of the tests on their ci system, so it should be backward compatible.

My change removes a flag that was already deprecated. It also suppresses a new compiler warning.

@Dekto
Copy link

Dekto commented Sep 25, 2024

Thank you! I will check...

@tcaduser
Copy link
Contributor

Could you please help me?

I just did a clean:

toolchain build kivy

and it built completely for me.

@Dekto
Copy link

Dekto commented Sep 25, 2024

Could it be that we have different errors?

@eljarro
Copy link

eljarro commented Sep 26, 2024

I am working on a patch. It is important to note that homebrew can pollute the python search path, so make sure you remove /opt/homebrew/bin/ from your path.

Per the guide, I used Homebrew to install pkg-config, libtool, autoconf, and automake. If I remove opt/homebrew/bin from PATH, the toolchain build complains that those items aren't installed. I am new to Mac development... what am I doing wrong? Is there an alternative way to install and reference those dependencies for the toolchain build?

I've only used Homebrew to install those 4 packages. I use the CLT supplied Python with venv and I don't use Homebrew to install/manage Python in any way. In this case, will Homebrew still pollute the Python search path? In my case, when I put opt/homebrew/bin back in PATH, the newly merged main seems to work fine. I'm confused.

@tcaduser
Copy link
Contributor

Hi @eljarro

There is something going on with the homebrew python packages interfering with kivy-ios. If keeping homebrew in your path is needed, than I suggest doing it. However, it has been found more than once that this may be necessary (#929, #905, #901)

  /opt/homebrew/bin/brew uninstall --ignore-dependencies libb2

since this package causes strange build errors. This is even more confusing since kivy-ios builds python (for iOS?) and hostpython (for macOS?).

So there are 3 different python versions at play. I personally create my virtual environment using /usr/bin/python3 instead of the one from homebrew.

In the end, I suggest doing what works for you.

@eljarro
Copy link

eljarro commented Sep 26, 2024 via email

@tcaduser
Copy link
Contributor

  1. So is it correct to assume that Homebrew can stay in $PATH as long as Homebrew is NOT used to install Python(s)?

I'm thinking that brew may be needed in your path for some packages. I think that libb2 needs to be removed, because it interferes with the build of the target python installed on iOS.

  1. If Homebrew path is removed from $PATH, how does “toolchain build python3 kivy” process know where to find the required non-Python dependencies like autoconf, automake, etc? Much appreciated.

I think I got confused, since some packages are not rebuild do to caching, so brew is probably needed.

My impression is that the configure file is not generated using the autotools. It is patched in the recipes:

./kivy_ios/recipes/python3/configure.patch

or run directly as is:

% grep configure */__init__.py
ffmpeg/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
ffmpeg/__init__.py:        shprint(configure,
freetype/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
freetype/__init__.py:        shprint(configure,
hostopenssl/__init__.py:        configure = sh.Command(join(self.build_dir, "Configure"))
hostopenssl/__init__.py:        shprint(configure,
hostpython3/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
hostpython3/__init__.py:            shprint(configure,
libcurl/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
libcurl/__init__.py:        shprint(configure,
libjpeg/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
libjpeg/__init__.py:        shprint(configure,
libpng/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
libpng/__init__.py:        shprint(configure,
libzbar/__init__.py:            sh.Command('./configure'),
pycrypto/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
pycrypto/__init__.py:        shprint(configure,
python3/__init__.py:        self.apply_patch("configure.patch")
python3/__init__.py:        configure = sh.Command(join(self.build_dir, "configure"))
python3/__init__.py:        shprint(configure,

Apparently only the only recipe I see calling an autotool is libzbar:

% grep auto */__init__.py
libzbar/__init__.py:        shprint(sh.Command('autoreconf'), '-vif')

The famous libb2 problem actually requires the pkg-config command from homebrew to accidentally misconfigure the target python versions.

So I have been wrong about not needing homebrew in your path.

@akshayaurora
Copy link
Member

Fixed by #937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants