macOS下Kivy iOS工具链构建失败求助
构建Kivy-iOS工具链失败求助
我想基于Kivy开发自己的应用,但在构建工具链中的Kivy时失败了。我的系统信息如下:
macOS = Sonoma 14.4 Xcode = 15.3 Cython = 0.29.36 python = 3.11
Kivy文档要求安装Cython 3.0.0,但kivy-ios包需要我当前安装的0.29.36版本。两种版本我都尝试过,均无效;我也从Python 3.12切换到3.11,问题依然存在。
注意:无论做出任何修改,以下输出始终保持完全一致
执行命令toolchain build kivy的输出日志如下:
[DEBUG ] ld: unknown options: -miphoneos-version-min=9.0 -miphoneos-version-min=9.0 -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/ffi -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/openssl -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk [DEBUG ] [DEBUG ] The necessary bits to build these optional modules were not found: [DEBUG ] _gdbm _tkinter ossaudiodev [DEBUG ] To find the necessary bits, look in setup.py in detect_modules() for the modules name. [DEBUG ] [DEBUG ] [DEBUG ] The following modules found by detect_modules() in setup.py, have been [DEBUG ] built by the Makefile instead, as configured by the Setup files: [DEBUG ] _asyncio _bisect _blake2 [DEBUG ] _bz2 _codecs_cn _codecs_hk [DEBUG ] _codecs_iso2022 _codecs_jp _codecs_kr [DEBUG ] _codecs_tw _contextvars _crypt [DEBUG ] _csv _ctypes _ctypes_test [DEBUG ] _datetime _elementtree _hashlib [DEBUG ] _heapq _json _lsprof [DEBUG ] _md5 _multibytecodec _opcode [DEBUG ] _pickle _queue _random [DEBUG ] _sha1 _sha256 _sha3 [DEBUG ] _sha512 _socket _sqlite3 [DEBUG ] _ssl _struct _testbuffer [DEBUG ] _testimportmultiple _testinternalcapi array [DEBUG ] audioop binascii cmath [DEBUG ] fcntl grp math [DEBUG ] mmap pyexpat resource [DEBUG ] select syslog termios [DEBUG ] unicodedata zlib [DEBUG ] [DEBUG ] [DEBUG ] Failed to build these modules: [DEBUG ] _curses _curses_panel _dbm [DEBUG ] _decimal _lzma _multiprocessing [DEBUG ] _posixshmem _posixsubprocess _statistics [DEBUG ] _testcapi _testclinic _testmultiphase [DEBUG ] _typing _uuid _xxsubinterpreters [DEBUG ] _xxtestfuzz _zoneinfo nis [DEBUG ] readline spwd xxlimited [DEBUG ] xxlimited_35 [DEBUG ] [DEBUG ] running build_scripts [DEBUG ] creating build/scripts-3.11 [DEBUG ] copying and adjusting /Users/jack/Desktop/KivyBuilds/build/python3/iphoneos-arm64/Python-3.11.6/Tools/scripts/pydoc3 -> build/scripts-3.11 [DEBUG ] copying and adjusting /Users/jack/Desktop/KivyBuilds/build/python3/iphoneos-arm64/Python-3.11.6/Tools/scripts/idle3 -> build/scripts-3.11 [DEBUG ] copying and adjusting /Users/jack/Desktop/KivyBuilds/build/python3/iphoneos-arm64/Python-3.11.6/Tools/scripts/2to3 -> build/scripts-3.11 [DEBUG ] changing mode of build/scripts-3.11/pydoc3 from 644 to 755 [DEBUG ] changing mode of build/scripts-3.11/idle3 from 644 to 755 [DEBUG ] changing mode of build/scripts-3.11/2to3 from 644 to 755 [DEBUG ] renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11 [DEBUG ] renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11 [DEBUG ] renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11 Exception in thread background thread for pid 42357: Traceback (most recent call last): File "/opt/homebrew/Cellar/python@3.11/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/opt/homebrew/Cellar/python@3.11/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 1639, in wrap fn(*rgs, **kwargs) File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 2641, in background_thread handle_exit_code(exit_code) File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 2332, in fn return self.command.handle_command_exit_code(exit_code) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 826, in handle_command_exit_code raise exc sh.ErrorReturnCode_2: RAN: /usr/bin/make -j10 'CFLAGS=-O3 -miphoneos-version-min=9.0 -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/ffi -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/openssl -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk' STDOUT: Makefile:2823: warning: overriding commands for target `Modules/expat/xmlparse.o' Makefile:1031: warning: ignoring old commands for target `Modules/expat/xmlparse.o' Makefile:2824: warning: overriding commands for target `Modules/expat/xmlrole.o' Makefile:1034: warning: ignoring old commands for target `Modules/expat/xmlrole.o' Makefile:2825: warning: overriding commands for target `Modules/expat/xmltok.o' Makefile:1037: warning: ignoring old commands for target `Modules/expat/xmltok.o' /tmp/tmpzm3k119s -c -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -O3 -miphoneos-version-min=9.0 -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/ffi -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/openssl -I/Users/... (356726 more, please see e.stdout) STDERR: Traceback (most recent call last): File "/opt/homebrew/bin/toolchain", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1670, in main ToolchainCL() File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1407, in __init__ getattr(self, args.command)() File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1483, in build build_recipes(args.recipe, ctx) File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1231, in build_recipes recipe.execute() File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 758, in execute self.build_all() File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution f(self, *args, **kwargs) File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 858, in build_all self.build(plat) File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution f(self, *args, **kwargs) File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 844, in build self.build_platform(plat) File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/recipes/python3/__init__.py", line 117, in build_platform shprint(sh.make, self.ctx.concurrent_make, "CFLAGS={}".format(build_env["CFLAGS"])) File "/opt/homebrew/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 60, in shprint for line in cmd: File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 882, in __next__ self.wait() File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 799, in wait self.handle_command_exit_code(exit_code) File "/opt/homebrew/lib/python3.11/site-packages/sh.py", line 826, in handle_command_exit_code raise exc sh.ErrorReturnCode_2: RAN: /usr/bin/make -j10 'CFLAGS=-O3 -miphoneos-version-min=9.0 -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/ffi -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/openssl -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk' STDOUT: Makefile:2823: warning: overriding commands for target `Modules/expat/xmlparse.o' Makefile:1031: warning: ignoring old commands for target `Modules/expat/xmlparse.o' Makefile:2824: warning: overriding commands for target `Modules/expat/xmlrole.o' Makefile:1034: warning: ignoring old commands for target `Modules/expat/xmlrole.o' Makefile:2825: warning: overriding commands for target `Modules/expat/xmltok.o' Makefile:1037: warning: ignoring old commands for target `Modules/expat/xmltok.o' /tmp/tmpzm3k119s -c -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -O3 -miphoneos-version-min=9.0 -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/ffi -I/Users/jack/Desktop/KivyBuilds/dist/include/iphoneos-arm64/openssl -I/Users/... (356726 more, please see e.stdout) STDERR: (venv_grooveID) jack@jacks-mbp KivyBuilds %
执行命令toolchain status的输出如下:
audiostream - Not built click - Not built curly - Not built cymunk - Not built ffmpeg - Not built ffpyplayer - Not built flask - Not built freetype - Build OK (built at 2024-03-20 22:50:38.753344) hostopenssl - Build OK (built at 2024-03-20 22:51:24.359019) hostpython3 - Build OK (built at 2024-03-20 23:01:44.053676) ios - Not built itsdangerous - Not built jinja2 - Not built kivent_core - Not built kivy - Not built kiwisolver - Not built libcurl - Not built libffi - Build OK (built at 2024-03-20 22:54:32.531345) libjpeg - Build OK (built at 2024-03-20 22:55:13.519545) libpng - Build OK (built at 2024-03-20 22:56:02.149758) libzbar - Not built markupsafe - Not built materialyoucolor - Not built matplotlib - Not built netifaces - Not built numpy - Not built openssl - Build OK (built at 2024-03-20 22:57:24.156832) photolibrary - Not built pillow - Not built plyer - Not built py3dns - Not built pycrypto - Not built pykka - Not built pyobjus - Not built python3 - Not built pyyaml - Not built sdl2 - Build OK (built at 2024-03-20 22:58:10.556457) sdl2_image - Build OK (built at 2024-03-20 23:02:03.743875) sdl2_mixer - Build OK (built at 2024-03-20 23:02:23.058399) sdl2_ttf - Build OK (built at 2024-03-20 23:03:12.483293) werkzeug - Not built zbarlight - Not built
内容的提问来源于stack exchange,提问作者Jack Coleman
相关产品推荐
相关产品推荐

