Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Fyne doesn't compile on termux. #5173

Open
2 tasks done
DuilioPerez opened this issue Sep 29, 2024 · 13 comments
Open
2 tasks done

[Bug]: Fyne doesn't compile on termux. #5173

DuilioPerez opened this issue Sep 29, 2024 · 13 comments
Labels
information-needed Further information is requested unverified A bug that has been reported but not verified

Comments

@DuilioPerez
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

I've followed the instructions from your getting start page to install fyne in Termux, but I've found some issues:
1 - It can't compile programs directly for Termux:
2 - Android API level used is too low:

How to reproduce

1: Run go build in the firs example app
2: Install an app

Screenshots

1:
Screenshot_2024-09-29_14-30-59

2:
Screenshot_20240929-143749_WhatsApp

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

fyne cli version: (devel)

Go compiler version

go version go1.23.1 android/arm64

Operating system and version

Android 11

Additional Information

No response

@DuilioPerez DuilioPerez added the unverified A bug that has been reported but not verified label Sep 29, 2024
@andydotxyz
Copy link
Member

Fyne version

fyne cli version: (devel)

Please list the library version not the cli.

More info:

Please share what is at line 136 of /usr/include/EGL/egl.h - the specification states that it is implementation specific but obviously for many platforms it is working, so we need to see what yours is expecting.

@andydotxyz andydotxyz changed the title [Bug]: Fyne doesn't work properly on termux. [Bug]: Fyne doesn't compile on termux. Sep 30, 2024
@andydotxyz
Copy link
Member

Correcting title as this is compile specific. If you compiled the android app elsewhere and copied it on then it would execute as far as I can see.

@andydotxyz andydotxyz added the information-needed Further information is requested label Sep 30, 2024
@andydotxyz
Copy link
Member

Oh, hold on - isn't termux a linux emulator for Android? In that case you should probably try "fyne package -os linux" because it's trying to build an android app from a linux terminal.

@DuilioPerez
Copy link
Author

Oh, hold on - isn't termux a linux emulator for Android? In that case you should probably try "fyne package -os linux" because it's trying to build an android app from a linux terminal.

That command have the same error. Termux is an Android Linux emulator, but it uses bionic instead of glibc. It's default compiles for linux-android.

The content of line 136 is:
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);

@DuilioPerez
Copy link
Author

And the other issue is about Android API Level too low

@DuilioPerez
Copy link
Author

Fyne version is 2.5.1

@andydotxyz
Copy link
Member

The content of line 136 is:
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);

Thanks, and what is the definition of EGLNativeWindowType on that platform (also, where is it defined?)

And the other issue is about Android API Level too low

Google Play Protect hates our backwards compatibility - it is not a problem, just a nuisance.

@DuilioPerez
Copy link
Author

There is a related issue, maybe that information can help:
hajimehoshi/ebiten#3057

@DuilioPerez
Copy link
Author

And with the issue related to API Level, it could be usefull to have a way to use a API Level which allow external distributions. Maybe an option on the CLI tool.

@andydotxyz
Copy link
Member

it could be usefull to have a way to use a API Level which allow external distributions.

It is not clear what distribution is blocked by our backwards compatibility.

@DuilioPerez
Copy link
Author

Well, it seems google play blocks apps according to the used target sdk. So isn't the minimun API Level what needs to be updated but the target sdk, acording to the Android SDK documentation, which is updated every year, so that's the only which need to be updated.

@andydotxyz
Copy link
Member

andydotxyz commented Oct 2, 2024

It is not blocked - it is a warning that you can accept.

Our target SDK is above the minimum required. If it wasn't then Google would have removed the listing from the store.

"Google Play Protect" is a level above what is required by the store if I understand it correctly. Apps using the latest fyne should always be compliant with the published policies.

@andydotxyz
Copy link
Member

That command have the same error. Termux is an Android Linux emulator, but it uses bionic instead of glibc. It's default compiles for linux-android.

Then please try setting GOOS=linux. I can tell it is compiling for
Android because it is linking to the mobile driver...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information-needed Further information is requested unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

2 participants