Building iOS package failed

446 views
Skip to first unread message

Mike

unread,
Sep 23, 2016, 7:48:43 AM9/23/16
to Kivy users support
I have to port a Kivy app to iOS (development on MacBook with macOS 10.12 Sierra and XCode 8.0).

With https://kivy.org/docs/installation/installation-osx.html the app is running on macOS.
With https://kivy.org/docs/guide/packaging-ios.html , "Play" in Xcode give a warning regarding some project settings and the error:

/Users/Mike/kivy-ios/dist/root/python/lib: No such file or directory

The directory root is empty. Same after automatically changed the project settings to avoid the warning.
Someone in this group mentioned reboot, but that does not help.



Mike

unread,
Sep 23, 2016, 8:25:25 AM9/23/16
to Kivy users support
The error seems to come from building kivy-ios:


checking
for _Bool support... yes
checking size of _Bool
... 0
checking
for uintptr_t... yes
checking size of uintptr_t
... configure: error: in `/Users/Mike/kivy-ios/build/python/i386/Python-2.7.1':
configure: error: cannot compute sizeof (uintptr_t)
See `
config.log' for more details.
Traceback (most recent call last):
  File "./toolchain.py", line 1311, in <module>
    ToolchainCL()

  File "./toolchain.py", line 1082, in __init__
    getattr(self, args.command)()
  File "./toolchain.py", line 1106, in build
    build_recipes(args.recipe, ctx)
  File "./toolchain.py", line 974, in build_recipes
    recipe.execute()
  File "/Users/Mike/kivy-ios/toolchain.py", line 586, in execute
    self.build_all()
  File "/Users/Mike/kivy-ios/toolchain.py", line 56, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/Mike/kivy-ios/toolchain.py", line 673, in build_all
    self.build(arch)
  File "/Users/Mike/kivy-ios/toolchain.py", line 56, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/Mike/kivy-ios/toolchain.py", line 660, in build
    self.build_arch(arch)
  File "/Users/Mike/kivy-ios/recipes/python/__init__.py", line 53, in build_arch
    _env=build_env)
  File "/Users/Mike/kivy-ios/toolchain.py", line 39, in shprint
    for line in command(*args, **kwargs):
  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_77:

  RAN: '
/Users/Mike/kivy-ios/build/python/i386/Python-2.7.1/configure CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld CFLAGS=-arch i386 -pipe -no-cpp-precomp --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -O3 -miphoneos-version-min=6.0.0 -I/Users/Mike/kivy-ios/dist/include/i386/freetype -I/Users/Mike/kivy-ios/dist/include/i386/hostlibffi -I/Users/Mike/kivy-ios/dist/include/i386/libffi -I/Users/Mike/kivy-ios/dist/include/common/sdl2 -I/Users/Mike/kivy-ios/dist/include/common/sdl2_image -I/Users/Mike/kivy-ios/dist/include/common/sdl2_mixer -I/Users/Mike/kivy-ios/dist/include/common/sdl2_ttf LDFLAGS=-arch i386 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -L/Users/Mike/kivy-ios/dist/lib -lsqlite3 -miphoneos-version-min=6.0.0 -undefined dynamic_lookup --without-pymalloc --disable-toolbox-glue --host=i386-apple-darwin --prefix=/python --with-system-ffi --without-doc-strings'

  STDOUT:
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for i386-apple-darwin-gcc... /
Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking whether the C compiler works
... yes
checking
for C compiler default output file name... a.out
checking
for suffix of executables...
checking whether we are cross compiling
... yes
checking
for suffix of object files.... (14149 more, please see e.stdout)

  STDERR
:



Mike

unread,
Sep 23, 2016, 4:58:28 PM9/23/16
to Kivy users support
I searched for this kind of error, it is not new, but I do not find the reason up to now, since my macOS / Xcode experience is very limited.
May be Xcode 7.3.1 is a workaround. But I got the same error:

Removed /Applications/Xcode.app (8), removed ~/Library/Developer/Xcode. Got Xcode_7.3.1.dmg, double clicked and dragged Xcode.app to Applications.

... searching some hours (!), why Xcode 7 does not run ... found extended attribute com.apple.quarantine ... removed ...

xcodebuild -version
Xcode 7.3.1
Build version 7D1014

But no success, same error, and very buggy before :

...
checking size of int... 0
checking size of long... 0
checking size of void *... 0
checking size of short... 0
checking size of float... 0
checking size of double... 0
checking size of fpos_t... 0
checking size of size_t... 0
checking size of pid_t... 0
...

Now I got stucked.

Mike

unread,
Sep 24, 2016, 10:02:29 AM9/24/16
to Kivy users support
Tried Xcode 6.4 - cannot run with macOS Sierra due to a plugin which Sierra do not have anymore.

Tried Xcode 8.1 beta ... and ... astonished. I am able to build kivy and my app!

But in the simulator my app dies - "dyld_sim cannot be loaded in a restricted process"
Ahem ... ?

Tried touchtracer - runs.

My hope: I have to debug my app now, not the toolchain anymore.

Yasser Antonio

unread,
Sep 24, 2016, 11:36:19 AM9/24/16
to Kivy users support
Mike , with which version of python ? 

Mike

unread,
Sep 24, 2016, 12:53:13 PM9/24/16
to Kivy users support
Python on macOS is 2.7.10, I think, Python for kivy is 2.7.1

So, last report, I hope: The app is up and running on the target iPhone. Not in simulator but on mobile I got the right error message: cannot import plyer. One "./toolchain.py build plyer" helped.

Now paramiko is missing, but I think that is no big problem since there is a pycrypto recipe.

Mike

unread,
Sep 27, 2016, 5:37:32 AM9/27/16
to Kivy users support
Further finding.

The logging mechanism is broken with the Xcode 8.x / iOS 10 combo. This is an Apple issue and explains, why I have seen no log in simulator and a log on the mobile only before updating.

Workarounds from the net are not working for me. My workaround: Using the iOS simulator with iOS 9.x and as real device an iPhone 4 with iOS 9.3, not iPhone 6 with iOS 10 as with my first attempts.

Matthew Parets

unread,
May 18, 2017, 3:02:30 PM5/18/17
to Kivy users support
Have you made any progress on this problem? I'm attempting to build a Hello World app using Kivy for ios. The app runs fine from Pycharm. I have updated everything on my mac book, latest version of Xcode, lasted update of Sierra, I have followed the install pages at Kivy several times, but when it gets to this point it fails with the  "configure: error: cannot compute sizeof (uintptr_t)" error every time.

Can anyone give me any hints?

Reply all
Reply to author
Forward
0 new messages