kivy / kivy-ios

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

ld: 407 duplicate symbols for architecture arm64 #787

Closed mhdemd closed 11 months ago

mhdemd commented 1 year ago

Hello friends I wrote an application with Kivy when i debug with "buildozer ios debug" I get the following error: . . . duplicate symbol '_FTC_SBitCache_New' in: /Users/me6/Desktop/digi/.buildozer/ios/platform/kivy-ios/dist/lib/libfreetype.a(ftcache.o) /Users/me6/Desktop/digi/.buildozer/ios/platform/kivy-ios/dist/lib/libsdl2_ttf.a(ftcache.o) ld: 407 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

BUILD FAILED

The following build commands failed: Ld /Users/me6/Desktop/digi/.buildozer/ios/platform/kivy-ios/radinsport-ios/build/Debug-iphoneos/radinsport.app/radinsport normal (in target 'radinsport' from project 'radinsport') (1 failure) . . . Thank you for helping me

mhdemd commented 1 year ago

my_log.txt

mhdemd commented 1 year ago

Versions Python:3.9.6 OS:macOS Ventura 13.2.1 (on VMware) Buildozer:1.5.0

misl6 commented 1 year ago

Hi @mhdemd !

I've moved the issue here, on kivy-ios.

Since sdl2_ttf now builds its own version of libfreetype, we will need to update some of our recipes accordingly.

Please keep this issue open, but meanwhile, as a workaround, you're likely good to just remove libfreetype.a from "Frameworks, Libraries and embedded content"

Image 29-03-23 at 19 34

mhdemd commented 1 year ago

thank you very much It was fixed by removing 'libfreetype.a'

Cheaterman commented 1 year ago

Hi @misl6, thanks for responding here :-) I can confirm removing libfreetype.a manually inside Xcode seems to fix the build ; however, does that mean we can't use kivy-ios with Buildozer until this is fixed?

EDIT: I'm asking because it seems like it readds libfreetype.a by itself

Cheaterman commented 1 year ago

Alrighty I PR'd a fix at #806, I'm not sure it's perfect but it appears to be the most sensible/easy way to resolve the issue without breaking other things.

kschepps commented 1 year ago

I can import pillow and open file , but I'm getting codec errors whenever I try running most commands or save the files. Could deleting libfreetype be causing these issues?