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

Toolchain 407 duplicate error of arm64 #771

Closed pythonsus closed 1 year ago

pythonsus commented 1 year ago

Versions mac m1

Describe the bug // REPLACE ME: A clear and concise description of what the bug is. When running xcode project file getting 407 duplicate symbols for architecture arm64

To Reproduce install using devlopment section or pip install both same then toolchain build python3 kivy pillow then toolchain pip install pyowm kivymd then toolchain create weatherapp path to weatherapp then run the xcode project file to get 407 duplicate symbols for architecture arm64

Expected behavior app should work Logs 407 duplicate symbols for architecture arm64



**Screenshots**
<!--
ONLY for XCode related errors, use the LOGS section for toolchain.py related problems!

 If applicable, add screenshots to help explain your problem.
--><img width="1410" alt="Screenshot 2023-02-21 at 12 37 55 PM" src="https://user-images.githubusercontent.com/91991802/220419152-a730f4f1-9781-4d39-9c6b-05e98504af34.png">

**Additional context**
Add any other context about the problem here.
requirments are kivy kivymd and pyowm
main.py:
from kivymd.app import MDApp
from kivymd.uix.dialog import MDDialog
from kivymd.uix.label import MDLabel
from kivymd.uix.screen import MDScreen
from kivy.uix.image import Image
from kivymd.uix.button import MDRectangleFlatButton, MDFlatButton
from pyowm import OWM
from kivy.lang import Builder
city_helper ="""
MDTextField:
    hint_text: "Enter city name with country"
    helper_text: "eg: Rock Hill,us"
    helper_text_mode: "on_focus"
    pos_hint: {'center_x':0.38,'center_y':0.2}
    size_hint_x: None
    width:500
    icon_right: "weather-partly-cloudy"
    mode:"fill"

"""

#5386fe8b412f65c8fe185582a8a170a7

class Weatherapp(MDApp):

    def build(self):
        screen = MDScreen()
        i1 = Image(source='./things/images/icons8-partly-cloudy-day-48.png',pos_hint={'center_x':0.5,'center_y':0.8})
        self.icon = r'./things/images/icons8-partly-cloudy-day-48.png'
        self.l1 = MDLabel(text='Weather App',pos_hint={'center_x':0.8,'center_y':0.9},font_style='H3')
        self.l2 = MDLabel(text='Weather Status:', pos_hint={'center_x': 0.7, 'center_y': 0.5})
        self.l3 = MDLabel(text='Wind Speed: Wind Gust Speed:', pos_hint={'center_x': 0.7, 'center_y': 0.6})
        self.l4 = MDLabel(text='Humidity:', pos_hint={'center_x': 0.7, 'center_y': 0.7})
        self.l5 = MDLabel(text='Temperature: Max Temperature: Min Temperature: Feels_Like:', pos_hint={'center_x': 0.7, 'center_y': 0.4})
        self.city = Builder.load_string(city_helper)
        b1 = MDRectangleFlatButton(text='Search',pos_hint={'center_x':0.6,'center_y':0.2},on_release=self.showresults)
        screen.add_widget(self.city)
        screen.add_widget(self.l1)
        screen.add_widget(i1)
        screen.add_widget(b1)
        screen.add_widget(self.l2)
        screen.add_widget(self.l3)
        screen.add_widget(self.l4)
        screen.add_widget(self.l5)
        return screen
    def showresults(self,obj):
        try:
            owm = OWM('5386fe8b412f65c8fe185582a8a170a7')
            mgr = owm.weather_manager()

            # Search for current weather in London (Great Britain) and get details
            observation = mgr.weather_at_place(self.city.text)
            w = observation.weather

            self.city.text = ''
            self.l2.text = f'Weather Status: {w.detailed_status}'
            self.l3.text = f'Wind Speed: {w.wind()["speed"]} Wind Degree: {w.wind()["deg"]} '
            self.l4.text = f'Humidity: {w.humidity}'
            self.l5.text = f'Temperature: {w.temperature("fahrenheit")["temp"]}, Max Temperature: {w.temperature("fahrenheit")["temp_max"]}, Min Temperature: {w.temperature("fahrenheit")["temp_min"]}, Feels_Like:{w.temperature("fahrenheit")["feels_like"]}'
        except:
            self.dialog = MDDialog(title='invalid input',
                                   text='invaild input , format is different , or we might be expercing problems to test that type Fort Mill,us and press search if it does not work contact stuffpython8@gmail.com', size_hint=(0.8, 1),
                                   buttons=[MDFlatButton(text='Close', on_release=self.close_dialog),
                                            ]
                                   )
            self.dialog.open()

    def close_dialog(self, obj):
        self.dialog.dismiss()

Weatherapp().run()
pythonsus commented 1 year ago

tried also with python 3.9.12

pythonsus commented 1 year ago

pls help soon

pythonsus commented 1 year ago

anyone there

misl6 commented 1 year ago

As a workaround, can you please try to remove libfreetype.a from "Frameworks, Libraries, and Embedded Content"?

pythonsus commented 1 year ago

where is that folder

pythonsus commented 1 year ago

are you there

pythonsus commented 1 year ago

I did it but getting ImportError: dynamic module does not define module export function (PyInit_md) error

pythonsus commented 1 year ago

fixed