kivy-ios
kivy-ios copied to clipboard
Numpy (1.20.2) crash in Xcode 12.4 iOS 14.4
Verrsions
Python : 3.9.6 MacOS version : Catalina XCode Version : 12.4 Cython version : 0.29.24
Original error was: dynamic module does not define module export function (PyInit__multiarray_umath)
Numpy found the below crash issues after testing the code based implementation
NPY: test import numpy
[INFO ] [Base ] Leaving application in progress...
Traceback (most recent call last):
File "
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/bjitlimited/Library/Developer/CoreSimulator/Devices/E95B7D94-6151-4C75-B8C8-ABBE15F2EFA4/data/Containers/Bundle/Application/0BF443C6-ED85-46AC-98AB-97CA16A4B8B5/touchtracer.app/lib/python3.9/site-packages/numpy/core/init.py", line 22, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/bjitlimited/Work/JASMY/RnD/kivy_investigation/kivy/kivy-ios/touchtracer-ios/YourApp/main.py", line 177, in
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
- The Python version is: Python3.9 from "/Users/bjitlimited/Library/Developer/CoreSimulator/Devices/E95B7D94-6151-4C75-B8C8-ABBE15F2EFA4/data/Containers/Bundle/Application/0BF443C6-ED85-46AC-98AB-97CA16A4B8B5/touchtracer.app/touchtracer"
- The NumPy version is: "1.20.2"
and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.
Original error was: dynamic module does not define module export function (PyInit__multiarray_umath)
2021-09-28 17:26:17.879655+0600 touchtracer[72862:1413341] Application quit abnormally! 2021-09-28 17:26:17.910286+0600 touchtracer[72862:1413341] Leaving
Got this error too, anyone has got any clues ?
Can you please post a snippet to reproduce it? How did you installed kivy-ios?
Can you please post a snippet to reproduce it? How did you installed kivy-ios?
I have followed approach to install kivy-ios:
brew install autoconf automake libtool pkg-config brew link libtool cd into local app directory () git clone https://github.com/kivy/kivy-ios.git cd kivy-ios/ python3 -m venv venv . venv/bin/activate pip install -e . pip install cython python3 toolchain.py build kivy python3 numpy python3 toolchain.py create open projectname.xcodeproj
After completing above task import numpy then try to build and run the project, application crash
Same here
Can you please post a snippet to reproduce it? How did you installed kivy-ios?
I have followed approach to install kivy-ios:
brew install autoconf automake libtool pkg-config brew link libtool cd into local app directory () git clone https://github.com/kivy/kivy-ios.git cd kivy-ios/ python3 -m venv venv . venv/bin/activate pip install -e . pip install cython python3 toolchain.py build kivy python3 numpy python3 toolchain.py create open projectname.xcodeproj
After completing above task import numpy then try to build and run the project, application crash
Same problem - little luck. Any one a suggestion?
Same problem -- any chance it can be looked into?
Same problem. I find that Python-Apple-support do some extra jobs when integrating Numpy. Does Kivy miss these steps? https://github.com/beeware/Python-Apple-support/blob/3.10/patch/numpy/README.rst
The problem actually is the Numpy exports get optimized out during linking. Adding -Wl,-force_load,libnumpy.a to the binary linking with Kivy solved it for me.
The problem actually is the Numpy exports get optimized out during linking. Adding
-Wl,-force_load,libnumpy.ato the binary linking with Kivy solved it for me.
I'm also getting this error. @w3sip could you explain more specifically how you solved the issue by adding these parameters to the Kivy binary linking?
@w3sip How did you solve this issue it has me stumped.
Afraid never managed to get it to work. Gave up.
On 20 Oct 2022, at 17:02, SamB31 @.@.>> wrote:
@w3siphttps://github.com/w3sip How did you solve this issue it has me stumped.
— Reply to this email directly, view it on GitHubhttps://github.com/kivy/kivy-ios/issues/647#issuecomment-1285700055, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWWVOCO7XY2SLGAJI7O7LYTWEFNJTANCNFSM5E7AL2MQ. You are receiving this because you commented.Message ID: @.***>
The problem actually is the Numpy exports get optimized out during linking. Adding
-Wl,-force_load,libnumpy.ato the binary linking with Kivy solved it for me.I'm also getting this error. @w3sip could you explain more specifically how you solved the issue by adding these parameters to the Kivy binary linking?
In your Xcode project build settings, search for Other linker flags and add -Wl -force_load /path/to/libnumpy.a to it.
That did the trick for me.