Kivy-is on Apple silicon M1

787 views
Skip to first unread message

Francesco Pelizza

unread,
Aug 12, 2021, 12:28:06 PM8/12/21
to Kivy users support
Hello falks,

I just bought a Mac mini (with apple CPU M1) to compile Kivy apps and develop such into iPhone.
The problem is that if I follow the instructions on how to build Kivy...
precisely doing
python3 -m venv kivy_env
cd kivy_env #(just because I like it)
pip install --upgrade pip
pip install pillow #(otherwise It won't install kivy-ios)
pip install Cython
pip install kivy-ios
xcode-select --install
brew install autoconf automake libtool pkg-config
brew link libtool
........all ok until then
toolchain recipes #(all ok)
toolchain status #(all ok)
toolchain build.....HERE THE PROBLEMS BEGIN

indeed whatever I build first....when it comes to:
toolchain build python3 kivy
or just
toolchain build python3

I ONLY WASTE DAYS

it keeps giving me problems on the error:
[DEBUG ] configure: error: Unexpected output of 'arch' on OSX

and terminates with

STDOUT:
checking build system type... arm-apple-darwin20.4.0
checking host system type... arm-apple-darwin20.4.0
checking for python3.8... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... clang -Qunused-arguments -fcolor-diagnostics
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang -Qunused-arguments -fcolor-diagnostics accepts -g... yes
checking for clang -Qunused-arguments -fco... (11756 more, please see e.stdout)

STDERR:


other reported this error here:

STDOUT:
checking build system type... arm-apple-darwin20.4.0
checking host system type... arm-apple-darwin20.4.0
checking for python3.8... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... clang -Qunused-arguments -fcolor-diagnostics
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang -Qunused-arguments -fcolor-diagnostics accepts -g... yes
checking for clang -Qunused-arguments -fco... (11756 more, please see e.stdout)

STDERR:

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

and they say is problem because during the compilation on apple silicon instead of answering and arch of x86_64 answers arm64

But they do not tell how to fit it.....

DO you know how to fix it?

I am wasting days but no chance

PS: I also tried to install bit git cloning kivy-ios...I do not ge this error but I get the error about any attempt of

import _ctypes

I get the usual NoModuleError.... but types is installed fine with

brew install libffi

and also

toolchain build libffi

does build ok libffi.........and there is no solution to both problems

I hope I can find help here!!

Thanks

Francesco Pelizza

unread,
Aug 12, 2021, 12:30:35 PM8/12/21
to Kivy users support
I do of course activate the virtual env....forgot to write it but I do
cd kivy_env
. bin/activate
and then the rest

sqwatato

unread,
Aug 12, 2021, 3:04:16 PM8/12/21
to Kivy users support
I fixed this on my M1 mac by using Rosetta 2. Search up how to download Rosetta 2. Then duplicate terminal and rename one of them as Rosetta(or what ever you want to call it). Then go into finder and find the terminal that you renamed and right click and then choose get info. There you can select open with Rosetta. There are a lot of issues with switching from intel based chips to the m1 and Rosetta is meant to convert that stuff until more universal thing are made. Email sqwa...@gmail.com if you need more help. (btw im not an expert on this i just had the same problem before)
https://github.com/kivy/kivy-ios/issues/613 

Nick Rodriguez

unread,
Oct 28, 2021, 5:07:46 PM10/28/21
to Kivy users support
Hi, I've been having a lot of trouble with Kivy and my M1. six months ago using Miniconda I was fine, but I came back to this project and now I can't get the app to my phone anymore.

My latest issue is trying to run toolchain build python3 kivy
This is my error. Any advice greatly appreciated!
Screen Shot 2021-10-28 at 5.04.57 PM.png

Robert

unread,
Oct 28, 2021, 5:24:32 PM10/28/21
to Kivy users support
Not much ios or M1 experience here, I suggest trying https://discord.gg/t7h3mgar

mehdi vahidi

unread,
Oct 29, 2021, 2:22:58 AM10/29/21
to kivy-...@googlegroups.com
Hi if you wanto to speck about Your problem, please send message in whats up +989385334227
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4e9e08e0-7f9f-4a41-a748-5adc79098fa8n%40googlegroups.com.

Nick Rodriguez

unread,
Oct 29, 2021, 9:52:01 AM10/29/21
to kivy-...@googlegroups.com
Hi Robert,

Thanks so much!

In general, I’m sort of new and don’t have a good community to ask questions. I say sort of new because I’ve been around long enough to have my stack profile restricted from asking any more questions.

Today, I’ll spend formulating a clean question and trying to post on discord perhaps make a new stack account.

Any other advice greatly appreciated! Even more general on how to approach getting help. Thanks again!


On Oct 28, 2021, at 5:24 PM, Robert <planckp...@gmail.com> wrote:

Not much ios or M1 experience here, I suggest trying https://discord.gg/t7h3mgar
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/xiUvR22ijXU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/3f3bb0c2-3117-476d-b526-b4681bfb8eb7n%40googlegroups.com.

Robert

unread,
Oct 29, 2021, 9:02:10 PM10/29/21
to Kivy users support
Generally, you'll get the best response by showing that you have tried to answer your own question. And you'll learn the most too.

0) Always read the error message fully, try to figure out what it might be trying to tell you.

1) Always read the docs, I found this https://pypi.org/project/kivy-ios/ I don't know if it is the best.

2) Ask ONE clear, on topic, question (about the technology not about your experience of the technology).

For example " lot of trouble with Kivy"  - if I understand the question it is about kivy-ios. Of course kivy and kivy-ios are different things.

The log says the issue is related to the xcode simulator. Perhaps the issue is xcode configuration related not kivy-ios, so maybe the issue is xcode setup. At the very top of the docs I linked, it implies there a potential processor architecture configuration issue. But it doesn't say anything about that issue using M1. I wonder....

So now you have an idea where to look, try a test:

Try to build for a physical device (not the simulator), does that work? Add that information when asking the question.

Nick Rodriguez

unread,
Oct 30, 2021, 9:14:03 AM10/30/21
to kivy-...@googlegroups.com
Thanks for the pointers. Also, thanks for the suggestion to look at xcode configuration - that was definitely a problem.

In case someone else finds this feed:
Honestly, I'm not sure I had Xcode installed on my mac. Even after reformatting I was still getting some terminal responses that suggested I had reinstalled xcode, but that was my fault for not looking more closely at those responses.
I followed this
 There still seems to be some remnants of an xcode because my terminal still had me install things like there is another version of xcode on my computer, but its definitely not in the Applications folder.
I've also been doing everything through my rosetta terminal - not sure that matters.


Robert

unread,
Oct 30, 2021, 1:00:19 PM10/30/21
to Kivy users support
Congrats on solving your own issue. And thanks for sharing what you found.
Reply all
Reply to author
Forward
0 new messages