-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS toolchain build constantly failing (I think due to C extension errors) #901
Comments
Hey, does anybody have an idea on how to fix this? Having the same problem. |
it looks like there are some header files missing, like |
Thanks for the reply. I did as you suggested, however the output is the same as before and the toolchain status remains unchanged. The error log suggests that 3 packages ( Edit: In case it helps, I tried |
I bet the real issue is here:
Also I see compilation errors:
And there are more errors up there building various parts. Got same issue, will try to figure out where should the actual linking target be. |
I too have encountered the same error, disappointed to see no response from the repo managers yet. Hope we'll have a solid resolution soon. |
it looks like it is in a bad state where not all of the packages got downloaded as part of the build process. are you on an Intel or arm64 build machine? i can only test on arm64. |
I am on Intel. @tcaduser, is it the same behaviour with you too? |
I'm using an arm64 machine (M2 Apple chip), however I tried this on a Rosetta terminal to emulate an intel machine and I got the same error response |
@Retr0Hax894, does it work on M2 macs? |
I got a clean build on a m2 macbook from the terminal using these commands:
|
I am facing that issue on a M2. Got it working on a M3. Both with Here a cut-out from the logs:
|
Good to hear that it works on M3. Is it possible to build pandas and fastAPI libraries too using Kivy? |
Not sure what you mean. For pandas and fastapi there are no recipes atm. I would do the pandas calculations with numpy and look for a pure python api package which one can install with for example: |
I was requesting for the output of the |
Knock yourself out |
I just cleaned the toolchain, followed those commands, and the error is the same. I don't suppose you know/remember what python version you had at the time? |
This is using the system Python 3.9.6 in
I purposely keep |
If you do a cleanup, make sure you removed:
in the directory you executed the |
And I have Xcode 15.3 app installed.
|
Still believe there must be another problem. Could there be anything missing while the cleaning, any environmental variables? Any better way to purge than what I have done? I am religiously cleaning the three folders @tcaduser mentioned. With It doesn't make sense that the problem is related to the python version. The whole setup on the M2 worked before I decided to start everything from scratch due to another issue. Anyway: |
I checked those same commands and I have the exact same SDKs and Xcode-select version. Although the output logs for each build can be long, I noticed something unusual when it built the
Seems to be an error regarding the iOS deployment target - I know how to change that when an Xcode project is made, but how do I change that when building Kivy? Also I discovered the following error too, which relates to one of the files mentioned at the end of the log (
|
Maybe it is something related to:
because I am also getting the same compiler warnings as @Retr0Hax894 for |
It looks like you may have the same problem as issue #905. I think that somehow the build scripts are getting confused and trying to link against libraries in homebrew |
Went on a rampage - reset with xcode-select -r, deleted xcode, deleted CommandLineTools, toolchain distclean, deleted the virtual environment, reinstalled all - same output. 😔 Plus, I could substitute the old workaround of renaming XCode with a new workaround of changing the path from
after creating the ios repository and before the first XCode build with
That behavior started once I installed kivy-ios from the master branch before the last release and build matplotlib with toolchain. Not sure if those two issues are related, but it seems to me as if some left-overs of the old kivy-ios installation or toolchain builds are being missed while the uninstalling. |
I just tried to build Kivy again and noticed something interesting in the build logs. Sadly it's too far into the build logs to retrieve, but it was roughly something like: I have python 3.12 downloaded. While I can download and use 3.11.6, a PEP document bringing forward the idea of separating python packages based off of the package manager they're installed from, and labelling such packages as being 'externally managed', was put forward to Homebrew. As of February this year, the idea was implemented so that packages were handled per the package manager that installed them, and as such only python 3.12 would be installed from Homebrew so that this change would be universal for all Homebrew users. So while I could change version, it wouldn't work alongside Homebrew. Would changing the python version to be downloaded when building help these python errors? EDIT: The more up-to-date and maintained document -> https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments |
It took a good while to remove the thanks @tcaduser , and everyone else that contributed to this solution |
Worked for me as well. Still puzzled to why, since libb2 is on that computer since ages and the build ran many times through. But happy it's solved. Thanks @tcaduser |
I'm glad it worked out for everyone. It is very surprising that brew can interfere in that way. I've always made sure that brew stays out of my PATH, and used the macOS python instead of the one from homebrew. |
I think I am luck, though I know the issue is homebrew libb2 is for mac which should not be included, I do not know how to find a libb2 for ios, the lucky is now I know just remove the libb2 will be ok, tks |
thanks for this! anyone knows why uninstalling libb2 this solves it? Update: I get:
so it doesn't sound like a viable solution do we have to set CPPFLAGS,CFLAGS,LDFLAGS? if so, any docs on that? I'm on mac intel |
One thing you can try is to make sure homebrew is not in your default PATH. Then its version of python packages cannot be found. This could be interfering with all of the other version of python that kivy-ios using. |
I would look in your .zshrc .bashrc or .profile to make sure that homebrew is not there. |
but isn't homebrew supposed to be the most used package manager on mac? if it's not on PATH, then how would I access it when I want to install anything? I'm a bit confused or is it more like a workaround to remove it from the PATH temporarily only for the running program (Pycharm in my case)? |
You can type the full path to whatever tool you want in the homebrew bin directory. I am just giving something to try. It looks to me like one of the recipes is looking for libbb2 and by finding it in your homebrew installation, is messing up. It is impossible for the compiler for the iOS to use a library compiled for macOS. |
brew uninstall libb2 Remove the following folders .cache is hidden sudo xcode-select -s /Applications/Xcode.app/Contents/Developer /usr/bin/xcodebuild -showsdks toolchain build kivy and tray |
What I don't understand is that kivy-ios compiles a hostpython, which should run instead of the one from homebrew? Perhaps the Homebrew python environment is polluting the hostpython environment? |
Versions
Describe the bug
I have 3 folders which I'm using for this project: A folder dedicated to the python virtual environment, a folder dedicated to the Kivy Builds, and the folder containing the pre-build Kivy app in python.
I'm currently trying to toolchain build python3 and Kivy. Regardless of what I try to build, however, the output (as shown below) is always the same.
To Reproduce
This is the first time I've ever tried to build a Kivy application for iOS, so I'm afraid I don't know how to help reproduce the problem. Here's the
toolchain status
output:and
toolchain build
output (same output regardless of what is building).Expected behavior
The expected behaviour is a completed build, allowing me to convert my python code into an Xcode project.
Logs
The following was produced with the command
toolchain build python3
however the response is very similar if not identical to the response from the commandtoolchain build kivy
ortoolchain build python3 kivy
Additional context
Currently using Cython==0.29.36 however I also tested it with the current version of Cython==3.0.0 (changed to 3.0.9 earlier today but didn't change the output). Kivy.org iOS page states that Cython=3.0.0 is required, but pip says Cython==0.29.36 is needed for Kivy-ios, so I don't know which to use.
I've tried separating the folders from other code files. All three are isolated on my desktop and still no change.
After activating the venv, all three folders clearly use the python environment located in the environments folder.
Any and all help is greatly appreciated
thanks in advance!
TLDR: Issue resolved by making sure libb2 installed by brew(due to packages like ffmpeg is interfering, remove it! or make sure it does not get picked in path.)
The text was updated successfully, but these errors were encountered: