Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Kivy Ios issues with first time build/setup

107 views
Skip to first unread message

Russ D

unread,
Nov 26, 2024, 8:27:56 PM11/26/24
to Kivy users support
Hi,

I'm new to Kivy (and Xcode environment in general).  Past Ios Apps I've build were react native apps using Expo as framework (which abstracted out all Xcode needs).  Purely FYI.  

I followed the instructions for setting up and note that I've setup a Conda virtual env (with python 3.11),  and my Xcode is v 16.1 (I upgraded yesterday, previously was earlier version, probably 15),  and my MacOs version is Sonoma 14.5 on an Apple M1 Max.

Kivy was installed via:
  - conda install kivy -c conda-forge

Couple different issues:

1. "pip install Cython=3.0.0"... that worked fine. 

BUT, I happened to notice that "pip install kivy-ios" resulted in:
  - Cython-3.0.0 was uninstalled
  - Cython-0.29.36 was installed.

Is that an issue?   That is a much much older Cython.

2. "toolchain build kivy" caused a couple errors I noticed,  copied below:

These are from stdout.  Is there is a build log file somewhere???

[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/russdaigle/code/ios-apps/kivy-ai2/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/russdaigle/code/ios-apps/kivy-ai2/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/russdaigle/code/ios-apps/kivy-ai2/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/russdaigle/code/ios-apps/kivy-ai2/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 "/Users/russdaigle/code/ios-apps/kivy-ai2/env/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 90522:
Traceback (most recent call last):
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 1634, in wrap
    fn(*rgs, **kwargs)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 2636, in background_thread
    handle_exit_code(exit_code)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 2327, in fn
    return self.command.handle_command_exit_code(exit_code)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 821, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /Users/russdaigle/code/ios-apps/kivy-ai2/env/bin/python3 generate-darwin-source-and-headers.py --only-ios


AND another error as follows:


checking for x86_64-apple-darwin13-gcc... xcrun -sdk iphonesimulator clang -target x86_64-apple-ios-simulator
check... (21140 more, please see e.stdout)

  STDERR:

Traceback (most recent call last):
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/bin/toolchain", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1670, in main
    ToolchainCL()
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1407, in __init__
    getattr(self, args.command)()
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1483, in build
    build_recipes(args.recipe, ctx)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 1231, in build_recipes
    recipe.execute()
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 758, in execute
    self.build_all()
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 858, in build_all
    self.build(plat)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 78, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 844, in build
    self.build_platform(plat)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/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/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/kivy_ios/toolchain.py", line 60, in shprint
    for line in cmd:
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 877, in __next__
    self.wait()
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 794, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/russdaigle/code/ios-apps/kivy-ai2/env/lib/python3.11/site-packages/sh.py", line 821, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /Users/russdaigle/code/ios-apps/kivy-ai2/env/bin/python3 generate-darwin-source-and-headers.py --only-ios

  STDOUT:
Skipping i386

Tim Holme

unread,
Jan 4, 2025, 2:09:12 PMJan 4
to Kivy users support
I also had this issue. I'm a first-time setup user and I hit the error:


[DEBUG   ] checking whether the C compiler works... no

[DEBUG   ] configure: error: in `/Users/.../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/.../build/libffi/iphoneos-arm64/libffi-3.4.4/generate-darwin-source-and-headers.py", line 314, in <module>

[DEBUG   ]     generate_source_and_headers(

[DEBUG   ]     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^

[DEBUG   ]         generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos,

[DEBUG   ]         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Mirko Galimberti

unread,
Jan 7, 2025, 9:13:22 AMJan 7
to kivy-...@googlegroups.com
Hi Tim,

Can you please try switching to kivy-ios from `master` branch?


Mirko


-- 
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kivy-users/964c4b2b-dce1-4c32-98d2-e94184527f41n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages