fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
23.77k stars 1.34k forks source link

Unable to run some apps on M1 Macbook Pro #4927

Open salorsino opened 6 days ago

salorsino commented 6 days ago

Checklist

Describe the bug

I have seen other bugs on here related to M1, but I am still not able to implement any of those fixes, and I am getting a specifically different error that the last issue that was posted. Additionally I am able to successfully run the demo using

go run fyne.io/fyne/v2/cmd/fyne_demo@latest

Just trying to run the basic Hello World app, I get this message:

# fyne.io/fyne/app
app_darwin.m:10:33: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
app_darwin.m:11:32: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
app_darwin.m:17:33: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
app_darwin.m:18:32: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
app_darwin.m:37:5: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
app_darwin.m:37:66: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
app_darwin.m:43:5: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
app_darwin.m:43:61: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
# keyboardtracker.com/test
ld: warning: ignoring duplicate libraries: '-lobjc'
2024/06/11 17:05:02 Fyne error:  window creation error
2024/06/11 17:05:02   Cause: APIUnavailable: NSGL: OpenGL ES is not available via NSGL
2024/06/11 17:05:02   At: /Users/pseg/.gem/ruby/2.7.6/bin/pkg/mod/fyne.io/fyne@v1.4.3/internal/driver/glfw/window.go:1220

How to reproduce

Run the Hello World app from the documentation main.go is pasted below after that, just run go run .

Screenshots

No response

Example code

package main

import (
    "fyne.io/fyne/v2/app"
    "fyne.io/fyne/v2/widget"
)

func main() {
    a := app.New()
    w := a.NewWindow("Hello World")

    w.SetContent(widget.NewLabel("Hello World!"))
    w.ShowAndRun()
}

Fyne version

1.4.3

Go compiler version

1.22.2

Operating system and version

macOS Sonoma 14.4.1

Additional Information

No response

andydotxyz commented 6 days ago

Please try 1.4.5 which is the latest release. It should not be attempting to link OpenGL ES for a Darwin build. Are you running on a regular macOS device?

andydotxyz commented 6 days ago

P.s. updating your title because that is a runtime error - the compile completed and it ran the app which then failed to display the window.