Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Kivy Mac为x86体系结构抛出未定义的符号_Python_Macos_Linker_Kivy - Fatal编程技术网

Python Kivy Mac为x86体系结构抛出未定义的符号

Python Kivy Mac为x86体系结构抛出未定义的符号,python,macos,linker,kivy,Python,Macos,Linker,Kivy,我正在尝试让我的kivy应用程序在IOS上运行。我已经克隆了kivy ios的git repo,并在选择配方时尝试了toolchain.py run命令的多种组合 我被Python3困住了,因为我不能使用Python2,因为它已被弃用,并且缺少库(md5) 我使用命令python3toolchain.py构建python3kivy。 构建成功,直到它进入构建的python3部分(我尝试过切换到构建python2,但它不起作用)。然后,它在链接时抛出有关体系结构的错误 我尝试了新的kivy ios

我正在尝试让我的kivy应用程序在IOS上运行。我已经克隆了kivy ios的git repo,并在选择配方时尝试了toolchain.py run命令的多种组合 我被Python3困住了,因为我不能使用Python2,因为它已被弃用,并且缺少库(md5) 我使用命令python3toolchain.py构建python3kivy。 构建成功,直到它进入构建的python3部分(我尝试过切换到构建python2,但它不起作用)。然后,它在链接时抛出有关体系结构的错误

我尝试了新的kivy ios克隆版本,尝试了不同版本的命令,并尝试通过自制程序安装libffi,但仍然不起作用。提前谢谢你的帮助

完整打印输出

[DEBUG   ] ld: warning: ld: warning: directory not found for option '-L/Users/myname/Desktop/KiloGram/kivy-ios/dist/hostlibffi/usr/local/lib'directory not found for option '-L/Users/myname/Desktop/KiloGram/kivy-ios/dist/hostlibffi/usr/local/lib'
[DEBUG   ] 
[DEBUG   ] ld: warning: ld: warning: directory not found for option '-L/Users/myname/Desktop/KiloGram/kivy-ios/dist/hostlibffi/usr/local/lib'directory not found for option '-L/Users/myname/Desktop/KiloGram/kivy-ios/dist/hostlibffi/usr/local/lib'
[DEBUG   ] 
[DEBUG   ] ld: warning: ld: warning: ignoring file libpython3.7m.a, file was built for archive which is not the architecture being linked (x86_64): libpython3.7m.aignoring file libpython3.7m.a, file was built for archive which is not the architecture being linked (x86_64): libpython3.7m.a
[DEBUG   ] 
[DEBUG   ] Undefined symbols for architecture x86_64:
[DEBUG   ]   "__Py_UnixMain", referenced from:
[DEBUG   ]       _main in python.o
[DEBUG   ] ld: symbol(s) not found for architecture x86_64
[DEBUG   ] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[DEBUG   ] Undefined symbols for architecture x86_64:
[DEBUG   ]   "_PyEval_InitThreads", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]   "_PyEval_ReleaseThread", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]   "_PyEval_RestoreThread", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]   "_PyEval_SaveThread", referenced from:
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]   "_PyGILState_Check", referenced from:
[DEBUG   ]       _bpo20891_thread in _testembed.o
[DEBUG   ]   "_PyGILState_Ensure", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _bpo20891_thread in _testembed.o
[DEBUG   ]   "_PyGILState_Release", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _bpo20891_thread in _testembed.o
[DEBUG   ]   "_PyInterpreterState_GetID", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]   "_PyMem_RawFree", referenced from:
[DEBUG   ]       _test_pre_initialization_api in _testembed.o
[DEBUG   ]   "_PyRun_SimpleStringFlags", referenced from:
[DEBUG   ]       _test_forced_io_encoding in _testembed.o
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _test_pre_initialization_api in _testembed.o
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]   "_PySys_AddWarnOption", referenced from:
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]   "_PySys_AddXOption", referenced from:
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]   "_PySys_ResetWarnOptions", referenced from:
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]   "_PyThreadState_Get", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_PyThreadState_Swap", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]   "_PyThread_acquire_lock", referenced from:
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]   "_PyThread_allocate_lock", referenced from:
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]   "_PyThread_exit_thread", referenced from:
[DEBUG   ]       _bpo20891_thread in _testembed.o
[DEBUG   ]   "_PyThread_free_lock", referenced from:
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]   "_PyThread_release_lock", referenced from:
[DEBUG   ]       _bpo20891_thread in _testembed.o
[DEBUG   ]   "_PyThread_start_new_thread", referenced from:
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]   "_Py_BytesWarningFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_DebugFlag", referenced from:
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_DecodeLocale", referenced from:
[DEBUG   ]       _test_pre_initialization_api in _testembed.o
[DEBUG   ]   "_Py_DontWriteBytecodeFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_EndInterpreter", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]   "_Py_Finalize", referenced from:
[DEBUG   ]       _test_forced_io_encoding in _testembed.o
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _test_pre_initialization_api in _testembed.o
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]       _test_initialize_twice in _testembed.o
[DEBUG   ]       _test_initialize_pymain in _testembed.o
[DEBUG   ]       _test_init_default_config in _testembed.o
[DEBUG   ]       ...
[DEBUG   ]   "_Py_FrozenFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_GetProgramName", referenced from:
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_IgnoreEnvironmentFlag", referenced from:
[DEBUG   ]       _test_init_env in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_Initialize", referenced from:
[DEBUG   ]       _test_forced_io_encoding in _testembed.o
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _test_pre_initialization_api in _testembed.o
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]       _test_initialize_twice in _testembed.o
[DEBUG   ]       _test_initialize_pymain in _testembed.o
[DEBUG   ]       ...
[DEBUG   ]   "_Py_InspectFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_InteractiveFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_IsolatedFlag", referenced from:
[DEBUG   ]       _test_init_isolated in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_Main", referenced from:
[DEBUG   ]       _test_initialize_pymain in _testembed.o
[DEBUG   ]   "_Py_NewInterpreter", referenced from:
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]   "_Py_NoSiteFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_NoUserSiteDirectory", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_OptimizeFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_QuietFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_SetProgramName", referenced from:
[DEBUG   ]       _test_forced_io_encoding in _testembed.o
[DEBUG   ]       _test_repeated_init_and_subinterpreters in _testembed.o
[DEBUG   ]       _test_pre_initialization_api in _testembed.o
[DEBUG   ]       _test_pre_initialization_sys_options in _testembed.o
[DEBUG   ]       _test_bpo20891 in _testembed.o
[DEBUG   ]       _test_initialize_twice in _testembed.o
[DEBUG   ]       _test_initialize_pymain in _testembed.o
[DEBUG   ]       ...
[DEBUG   ]   "_Py_SetStandardStreamEncoding", referenced from:
[DEBUG   ]       _test_forced_io_encoding in _testembed.o
[DEBUG   ]   "_Py_UTF8Mode", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _test_init_from_config in _testembed.o
[DEBUG   ]   "_Py_UnbufferedStdioFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "_Py_VerboseFlag", referenced from:
[DEBUG   ]       _test_init_global_config in _testembed.o
[DEBUG   ]       _dump_config in _testembed.o
[DEBUG   ]   "__Py_FatalInitError", referenced from:
[DEBUG   ]       _test_init_from_config in _testembed.o
[DEBUG   ]       _test_init_dev_mode in _testembed.o
[DEBUG   ]       _test_init_isolated in _testembed.o
[DEBUG   ]   "__Py_InitializeFromConfig", referenced from:
[DEBUG   ]       _test_init_from_config in _testembed.o
[DEBUG   ]       _test_init_dev_mode in _testembed.o
[DEBUG   ]       _test_init_isolated in _testembed.o
[DEBUG   ] make: *** [python.exe] Error 1
[DEBUG   ] make: *** Waiting for unfinished jobs....
[DEBUG   ] ld: symbol(s) not found for architecture x86_64
[DEBUG   ] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[DEBUG   ] make: *** [Programs/_testembed] Error 1
Traceback (most recent call last):
  File "toolchain.py", line 1568, in <module>
    ToolchainCL()
  File "toolchain.py", line 1281, in __init__
    getattr(self, args.command)()
  File "toolchain.py", line 1322, in build
    build_recipes(args.recipe, ctx)
  File "toolchain.py", line 1158, in build_recipes
    recipe.execute()
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 729, in execute
    self.build_all()
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 84, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 837, in build_all
    self.build(arch)
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 84, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 811, in build
    self.build_arch(arch)
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 874, in build_arch
    getattr(self, build)()
  File "/Users/myname/Desktop/KiloGram/kivy-ios/recipes/hostpython3/__init__.py", line 91, in build_x86_64
    _env=build_env)
  File "/Users/myname/Desktop/KiloGram/kivy-ios/toolchain.py", line 67, in shprint
    for line in cmd:
  File "tools/external/sh.py", line 565, in next
    self.wait()
  File "tools/external/sh.py", line 500, in wait
    self.handle_command_exit_code(exit_code)
  File "tools/external/sh.py", line 516, in handle_command_exit_code
    raise exc(self.ran, self.process.stdout, self.process.stderr)
sh.ErrorReturnCode_2: 

  RAN: '/usr/bin/make -C /Users/myname/Desktop/KiloGram/kivy-ios/build/hostpython3/x86_64/Python-3.7.1 -j4'

  STDOUT:
clang -Qunused-arguments -fcolor-diagnostics -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -mmacosx-version-min=10.12 -I/Users/myname/Desktop/KiloGram/kivy-ios/dist/hostlibffi/usr/local/include -I/Users/myname/Desktop/KiloGram/kivy-ios/dist/include/x86_64/openssl --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -mmacosx-version-min=10.12 -I/Users/myname/Desktop/KiloGram/kivy-ios/dist/hostlibffi/usr/local/include -I/Users/myname/Desktop/KiloGram/kivy-ios/dist/include/x86_64/ope... (158396 more, please see e.stdout)

  STDERR:
[DEBUG]ld:warning:ld:warning:option'-L/Users/myname/Desktop/kiggle/kivy ios/dist/hostlibffi/usr/local/lib'目录未找到'-L/Users/myname/Desktop/kivy ios/dist/hostlibffi/usr/local/lib'目录
[调试]
[DEBUG]ld:warning:ld:warning:option'-L/Users/myname/Desktop/kigg/kivy ios/dist/hostlibffi/usr/local/lib未找到目录'-L/Users/myname/Desktop/kiggy/kivy ios/dist/hostlibffi/usr/local/lib'
[调试]
[DEBUG]ld:warning:ld:warning:忽略文件libpython3.7m.a,该文件是为未链接体系结构的归档文件生成的(x86_64):libpython3.7m.a忽略文件libpython3.7m.a,该文件是为未链接体系结构的归档文件生成的(x86_64):libpython3.7m.a
[调试]
[调试]架构x86_64的未定义符号:
[调试]“\uuuu Py\u UnixMain”,引用自:
[调试]\u python.o中的main
[DEBUG]ld:找不到架构x86_64的符号
[DEBUG]clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
[调试]架构x86_64的未定义符号:
[调试]“\u PyEval\u InitThreads”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[调试]“\u PyEval\u ReleaseThread”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[调试]“_PyEval_RestoreThread”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[调试]\u testembed.o中的\u test\u bpo20891
[调试]“\u PyEval\u SaveThread”,引用自:
[调试]\u testembed.o中的\u test\u bpo20891
[调试]“\u PyGILState\u Check”,引用自:
[DEBUG]_testembed.o中的bpo20891_线程
[调试]“_PyGILState_sure”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[DEBUG]_testembed.o中的bpo20891_线程
[调试]“_PyGILState_Release”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[DEBUG]_testembed.o中的bpo20891_线程
[DEBUG]“\u pyexplorerstate\u GetID”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[调试]“_PyMem_RawFree”,引用自:
[DEBUG]\u testembed.o中的\u test\u pre\u初始化\u api
[调试]“\u PyRun\u SimpleStringFlags”,引用自:
[DEBUG]_test_强制_io_在_testembed.o中编码
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[DEBUG]\u testembed.o中的\u test\u pre\u初始化\u api
[DEBUG]\u testembed.o中的\u test\u pre\u initialization\u sys\u选项
[调试]“\u PySys\u addwarn选项”,引用自:
[DEBUG]\u testembed.o中的\u test\u pre\u initialization\u sys\u选项
[调试]“\u PySys\u AddXOption”,引用自:
[DEBUG]\u testembed.o中的\u test\u pre\u initialization\u sys\u选项
[调试]“\u PySys\u resetwarn选项”,引用自:
[DEBUG]\u testembed.o中的\u test\u pre\u initialization\u sys\u选项
[调试]“\u PyThreadState\u Get”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[DEBUG]_testembed.o中的\u dump\u config
[调试]“_PyThreadState_Swap”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[调试]“\u PyThread\u acquire\u lock”,引用自:
[调试]\u testembed.o中的\u test\u bpo20891
[调试]“\u PyThread\u allocate\u lock”,引用自:
[调试]\u testembed.o中的\u test\u bpo20891
[调试]“\u PyThread\u exit\u thread”,引用自:
[DEBUG]_testembed.o中的bpo20891_线程
[调试]“\u PyThread\u free\u lock”,引用自:
[调试]\u testembed.o中的\u test\u bpo20891
[调试]“\u PyThread\u release\u lock”,引用自:
[DEBUG]_testembed.o中的bpo20891_线程
[调试]“\u PyThread\u start\u new\u thread”,引用自:
[调试]\u testembed.o中的\u test\u bpo20891
[调试]“\u Py\u BytesWarningFlag”,引用自:
[DEBUG]\u testembed.o中的\u test\u init\u global\u配置
[DEBUG]_testembed.o中的\u dump\u config
[DEBUG]“\u Py\u DebugFlag”,引用自:
[DEBUG]_testembed.o中的\u dump\u config
[调试]“\u Py\u DecodeLocale”,引用自:
[DEBUG]\u testembed.o中的\u test\u pre\u初始化\u api
[调试]“\u Py\u DontWriteBytecodeFlag”,引用自:
[DEBUG]\u testembed.o中的\u test\u init\u global\u配置
[DEBUG]_testembed.o中的\u dump\u config
[调试]“\u Py\u end解释器”,引用自:
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[调试]“\u Py\u Finalize”,引用自:
[DEBUG]_test_强制_io_在_testembed.o中编码
[DEBUG]_test_repeated_init_和_子解释器在_testembed.o中
[DEBUG]\u testembed.o中的\u test\u pre\u初始化\u api
[DEBUG]\u testembed.o中的\u test\u pre\u initialization\u sys\u选项
[DEBUG]_test_初始化_两次在_testembed.o中
[调试]\u testembed.o中的\u test\u initialize\u pymain
[DEBUG]\u testembed.o中的\u test\u init\u default\u配置
[调试]。。。
[调试]“\u Py\u frozensflag”,参考