Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Buildozer and Toolchan freeze at DEBUG checking for suffix of executables

47 views
Skip to first unread message

Richard Perreault

unread,
May 9, 2024, 3:59:33 PM5/9/24
to Kivy users support
Hello,

Trying to create an IOS app using Kivy and Python3 on a Mac. I am using Python 3.8.2 and the recent kivy-ios for 2024 with Xcode 2015 on a Mac Catalina. I know it is old but before I invest in a new model I want to see if it works. Everything went well for the prerequisites and requirements but when I did either a toolchain build kivy python3 or a buildozer ios debug it builds without errors until it comes to DEBUB checking for suffix of executables it freezes forever waited overnight but know change. If anyone had this problem I would like to know how to resolve it. If anybody was able to create a IOS app using Python and kivy please tell me. I may not have any choice but to invest in a more recent Mac.

Thank you in advance,
Richard 

Tomek CEDRO

unread,
May 9, 2024, 4:13:49 PM5/9/24
to kivy-...@googlegroups.com
I managed to build the app for iOS on recent machine.. but I had
imported created project from .buildozer into XCode and then built it
by XCode. There are lots of warnings, the app lags badly, but it runs,
and I get whole XCode infrastructure (logs, debug, signing/publishing,
etc). Will get into fixes when app is done and for now I focus on
Android.

I did not build iOS app with buildozer yet straight from shell to make
it work sorry. I may try though and report back ;-)

I got a modern cheapest MacStudio machine (ARM CPU) just to speed up
from-scratch builds both for Android and iOS. These are in price range
of low/mid end MacBookPro but far more powerful (more CPU and RAM) for
the same price. I did work before on MacBookPro 2015 and it worked too
just +5x slower so machine itself is not the problem I guess :-)

Are you sure you have HomeBrew setup and dependencies installed as
stated in documentation?

Can you try building the Android application and see if that works?
Maybe the same problem will occur that would indicate local setup
problems.

Are you sure your buildozer.spec is correct? Note that tools versions
may need manual update :-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Richard Perreault

unread,
May 9, 2024, 4:30:45 PM5/9/24
to kivy-...@googlegroups.com
Hello,

Thanks for the reply I plan to purchase a M1 Mac mini. It might solve my problem. Answer to your question I did get the right discrepancies for brew and got it to. this point by using Python 3.8.2. Could it be an issue with the version of Kivy-IOS where it is the latest version (2024). And yes I was able to get a good app to work on Android. Would like the same in IOS. Want it to work on my Macbook-Pro Catalina before one sees the result and if it's worth investing time and money for an IOS version. May just use the Android app as a prototype and get it professionally made for IOS also.

Thanks,
Richard

--
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 on the web visit https://groups.google.com/d/msgid/kivy-users/CAFYkXjmSiF%2BHeYACM2hk0Y7jmD51JJQCCunu9WF3dXs1rVuP0A%40mail.gmail.com.

Tomek CEDRO

unread,
May 9, 2024, 5:22:16 PM5/9/24
to kivy-...@googlegroups.com
Yeah, see what works, and use that path first if there is no
difference if you develop for Android or iOS first.. Apple is real
pain in the butt ;-)

XCode seems a lot heavier slower and more complex especially on older
Intel CPU its barely usable. Probably iOS support lags behind Android
in Kivy as Android is more popular and does not have sick restrictions
like you need to tie your developer account to use it and agree to
latest terms of use in order to start a simulator (just encountered
that right now). You can build for Android on older or 5x cheaper and
still faster PC with Linux or the mac that you already have (first
time build is long then rebuilds are faster).

Apple kinda sux. For instance there is no easy way to show hidden
files in Finder (you need to find command to type yourself over the
web lol). If you want to open buildozer project in XCode you need to
know Cmd+Shift+. shortcut that will reveal hidden files (i.e.
.buildozer dir) in the open dialog or you wont be even able to open
the project lol.

My main everyday development platform is old PC with FreeBSD. I just
run Kivy as local python application here in venv with no complex time
consuming mobile-cross-build. When some stuff works I try that on
mobile only then (with buildozer). I noticed that this is good to set
your application screen parameters to a smallest possible mobile
screen right from start just to save layouts adjustments later on font
sizes etc as it will easier scale-up than scale-down :-P For me screen
width is 500, height 960, dpi 300, and that resembles older Android
phones and iPhoneSE

Long story short Apple is PITA on its own and hard start if you don't
know Kivy and surrounding tools already. If you can work on Android
then go Android and try out stuff in the first place. But for Kivy
development you don't even really need Android or iOS you can run it
as local python application on whatever os/hw you like.

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

> To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CACR%2BjZiXOYeQ4-WoNsEUkMgs7o5hgu9zZ_d2iuYuCOrUU6nung%40mail.gmail.com.

Tomek CEDRO

unread,
May 9, 2024, 8:00:44 PM5/9/24
to kivy-...@googlegroups.com
Update, I had to `buildozer appclean` then update kivy-ios and
ios-deploy to latest release in buildozer.spec and whole process went
fine. It stopped at IPA signing but I did not set this up (I used
XCode instead before) :-)

Make sure you have build environment set up correctly:

https://buildozer.readthedocs.io/en/latest/installation.html

Some time ago I messed up my brew and I was not able to build
anything, so I had to wipe it out completely, and start with clean
install, that helped.

Also make sure you have XCode installed and updated - create simple
XCode hello world application (default) then build it and run on
iPhone simulator just to make sure that part works correctly too.

If iOS is not mandatory at start and you can use Android that would be
easier.. just not to get discouraged.. or you can play with examples
as local python application (use virtualenv so you can easily
delete/recreate it when something goes wrong).. so you will step by
step get familiar on how things work.. small measurable steps towards
bigger dreams :-)

https://github.com/kivy/kivy/tree/master/kivy

Have fun :-)

Tomek CEDRO

unread,
May 22, 2024, 10:36:14 AM5/22/24
to kivy-...@googlegroups.com
Okay, after some play, it seems that toolchain only creates XCode
project based on a template, then you need to build using XCode.

Buildozer can go further and is supposed to automate build and deploy,
but that requires signing, and after that is fails. You need a
reference to developer certificate (listed with buildozer ios
list_identities) and the team ID hexstring (obtained at apple
developer account).

Buildozer uses kivy-ios and ios-deploy python modules for underlying work.

As noted on ios-deploy XCode 15 introduced totally different build mechanism.

So my approach to generate XCode project wither with buildozer or
kivy-ios (toolchain) seems to be the modern one.

As buildozer last release is from early 2023 it seems the toolchain
approach seems more up to date. Will have to play with that :-)

Tomek CEDRO

unread,
May 22, 2024, 8:24:59 PM5/22/24
to kivy-...@googlegroups.com
On Wed, May 22, 2024 at 4:35 PM Tomek CEDRO <to...@cedro.info> wrote:
> (..)
> Buildozer uses kivy-ios and ios-deploy python modules for underlying work.
>
> As noted on ios-deploy XCode 15 introduced totally different build mechanism.
>
> So my approach to generate XCode project wither with buildozer or
> kivy-ios (toolchain) seems to be the modern one.
>
> As buildozer last release is from early 2023 it seems the toolchain
> approach seems more up to date. Will have to play with that :-)

Okay, so the Buildozer automates tasks using Kivy-IOS below, therefore
results using toolchain (part of kivy-ios) are exactly the same -
application starts on simulator then crashes at:

Thread 6: com.apple.opengl.cvmDoWork -> _platform_memmove ->
_phtread_wqthread -> _dispatch_async_f_slow -> glDrawElements_ES2Exec

with EXC_BAD_ACCESS.

At this point it seems there is no difference between using Buildozer
or Toolchain.. I prefer Buildozer as it automates stuff installs
recipes etc and provides common interface for Android and iOS
cross-platform build.

Tomek CEDRO

unread,
May 22, 2024, 8:49:50 PM5/22/24
to kivy-...@googlegroups.com
On Thu, May 23, 2024 at 2:24 AM Tomek CEDRO <to...@cedro.info> wrote:
> (..)
> Thread 6: com.apple.opengl.cvmDoWork -> _platform_memmove ->
> _phtread_wqthread -> _dispatch_async_f_slow -> glDrawElements_ES2Exec
>
> with EXC_BAD_ACCESS.

I have the same results with examples. Kivy 2.3.0 and kivy-ios
2024.3.17 is broken and cannot produce iOS applications.

Juan Sanchez

unread,
May 22, 2024, 9:38:17 PM5/22/24
to kivy-...@googlegroups.com
Hi,

Is crash occurring on builds for both the simulator and the device?  Are you using the intel or arm simulator?  Do you have a minimal python example that reproduces the behavior.  Did you file a bug report on GitHub?
 
Regards,

Juan

--
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.

Tomek CEDRO

unread,
May 22, 2024, 11:29:35 PM5/22/24
to kivy-...@googlegroups.com
On Thu, May 23, 2024 at 3:38 AM Juan Sanchez wrote:
> Hi,
> Is crash occurring on builds for both the simulator and the device? Are you using the intel or arm simulator? Do you have a minimal python example that reproduces the behavior. Did you file a bug report on GitHub?

Thanks Juan :-) I am playing around to see what works and what does
not as I have new machine to play with and some people also were
asking recently on the list about iOS builds so I hope this will
provide some hints for them too :-)

Good news is that I made a build from XCode that works fine on a
physical iPhone SE (iOS 15.7.9). I have no other new iPhone to play
with. And the animations are not the problem anymore. It works pretty
the same as on Android. I have used Buildozer to generate the
.buildozer/ios/platform/kivy-ios/myapp-ios/myapp.xcodeproj and then
opened that with XCode in order to build. The same project with some
manual setup can be created with kivy-ios toolchain directly as
reported previously.

XCode 15 seems to change a lot of things.. and that will probably
needs a reflection in kivy-ios / buildozer.

EXC_BAD_ACCESS is already reported on kivy-ios repo:

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

Buildozer needs an update too as almost everything works except last
packaging stage when unrecognized parameter is reported by XCode util
(unrecognized parameter). I was unable to test with buildozer master
as it does not work from within virtualenv.. I hope this is a bug not
by design as system wide modification is not always possible and in
general a terrible idea. Problem reported here:

https://github.com/kivy/buildozer/issues/1807

I hope we can make this iOS stuff working soon :-)

Juan Sanchez

unread,
May 23, 2024, 12:15:31 AM5/23/24
to kivy-...@googlegroups.com
I filed this issue concerning building only for the iOS simulator:

I have not looked at this for several months, but I was having trouble with my matplotlib based app crashing somewhere in that library.  It only happened on the simulator.

To create screen shots for the App store, I had to use the arm64 simulator version of my app.

I had to do multiple clean builds until one of them finally worked in the simulator.  The only flag difference I could find at the time was -fembed-bitcode, but this appears to no longer be used:

Regards,

Juan







--
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.

Tomek CEDRO

unread,
May 23, 2024, 12:41:51 AM5/23/24
to kivy-...@googlegroups.com
On Thu, May 23, 2024 at 6:15 AM Juan Sanchez <juan.e....@gmail.com> wrote:
>
> I filed this issue concerning building only for the iOS simulator:
> https://github.com/kivy/kivy-ios/issues/865
>
> I have not looked at this for several months, but I was having trouble with my matplotlib based app crashing somewhere in that library. It only happened on the simulator.
>
> To create screen shots for the App store, I had to use the arm64 simulator version of my app.
>
> I had to do multiple clean builds until one of them finally worked in the simulator. The only flag difference I could find at the time was -fembed-bitcode, but this appears to no longer be used:
> https://github.com/kivy/kivy-ios/pull/894

Hmm.. so the iPhone Simulator is a mess? Can you run the same
application builds on a physical phone with iOS 17.4 just to confirm
Simulator is buggy???

I don't have any iOS 17.4 iPhone at hand but it would be great to
confirm the issue is with the iPhone Simulator not Kivy build tools

Juan Sanchez

unread,
May 23, 2024, 8:15:11 AM5/23/24
to kivy-...@googlegroups.com
My app is published on the App Store and runs on my iPhone SE (2nd generation) iOS 17.5.  To create all the mandatory screenshots for publishing I had to use the procedure in:


by building for the iPhoneSimulator for arm64 multiple times until it works.

toolchain clean matplotlib
toolchain build --platform iphonesimulator-arm64 matplotlib

There may also be a toolchain update command

toolchain update myapp-ios

In the above issue, I only had to clean matplotlib, since I could see by the stack trace in the XCode that it was occurring during matplotlib initializtion.

If you cannot figure out the specific package that is not compiling, you may need to clean all of the packages.

My recommended strategy is commenting out code until your app works.

I wouldn't discount the possibility that kivy-ios may have a bug.  I suspect some of the problem is may be related to conflicts between the simulator and device builds.

Regards.

Juan

My app runs on 

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

--
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.
Reply all
Reply to author
Forward
0 new messages