Kivy Ma c бросает неопределенные символы для архитектуры x86 - PullRequest
0 голосов
/ 12 февраля 2020

Я пытаюсь запустить приложение kivy на IOS. Я клонировал репозиторий git для kivy- ios и пробовал многочисленные комбинации команды запуска toolchain.py при выборе рецептов. Я застрял на python 3, поскольку не могу использовать python 2 из-за того, что он устарел и отсутствующие библиотеки (md5) Я использовал команду python3 toolchain.py build python3 kivy. Сборка завершается успешно до тех пор, пока она не попадет на часть python3 сборки (я пытался перейти на сборку python2, но она не работает). Затем он выдает ошибки об архитектуре при связывании

. Я пробовал новый клон kivy- ios различных вариантов команды, и я пытался установить libffi через homebrew, но все еще не работает. Спасибо за любую помощь заранее

Полная распечатка

[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:

1 Ответ

0 голосов
/ 17 марта 2020

У меня была похожая проблема, я попробовал buildozer посмотреть, установил ли он что-то еще, но получил тот же результат, но было предложение сделать это без venv, и это сработало для моего.

https://github.com/kivy/kivy-ios/issues/401

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...