kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
758 stars 237 forks source link

ffmpeg related errors after adding this recipe to the project #849

Closed CoderCoderCoder closed 10 months ago

CoderCoderCoder commented 10 months ago

Hello, I have successfully built a kivy-ios based app, which runs perfectly fine (thanks a lot by the way for your great library!). Now for additional functionality I need the python library "pydub", which requires "ffmpeg". So I built this library with the following commands: 1) . venv/bin/activate 2) toolchain build ffmpeg 3) toolchain update myapp-ios Everything went smooth without any errors. Now when I am building my app in XCode, I get the following errors:

Undefined symbols for architecture arm64: "_iconv", referenced from: _avcodec_decode_subtitle2 in libavcodec.a(decode.o) _getstr8 in libavformat.a(mpegts.o) (maybe you meant: _SDL_iconv_close, _SDL_iconv_string , _SDL_iconv_open , _SDL_iconv ) "_iconv_close", referenced from: _avcodec_open2 in libavcodec.a(avcodec.o) _avcodec_decode_subtitle2 in libavcodec.a(decode.o) _getstr8 in libavformat.a(mpegts.o) (maybe you meant: _SDL_iconv_close) "_iconv_open", referenced from: _avcodec_open2 in libavcodec.a(avcodec.o) _avcodec_decode_subtitle2 in libavcodec.a(decode.o) _getstr8 in libavformat.a(mpegts.o) (maybe you meant: _SDL_iconv_open) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have no idea what to do with it and how to fix it, so I truly hope to get some help. Many thanks in advance! My iOS, MacOS and XCode are all the latest versions of the respective software. The Python virtual environment contains almost no packages, besides a few I needed. I built only kivy, python and pillow recipes prior to ffmpeg, nothing else.

CoderCoderCoder commented 10 months ago

Same solution as here - https://github.com/kivy/kivy-ios/issues/676 . I had to link manually the file "libiconv.tbd" from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib