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

[FEATURE] <.NET9> contains a shared library 'libSkiaSharp.so' which is not correctly aligned. #3025

Open
1 task done
bcaceiro opened this issue Oct 1, 2024 · 5 comments

Comments

@bcaceiro
Copy link

bcaceiro commented Oct 1, 2024

Is your feature request related to a problem?

Building a .net MAUI project with Skia gives these warnings

NuGet package 'SkiaSharp.NativeAssets.Android' version '3.0.0-preview.3.1' contains a shared library 'libSkiaSharp.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details

Describe the solution you would like

Alignment issues solved for .net 9

Describe alternatives you have considered

It's not ab locking issue, since it can compile, just to leave this into consideration

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mattleibow
Copy link
Contributor

@jonathanpeppers any thoughts on what this means?

@jonathanpeppers
Copy link
Member

This is the upcoming 16kb alignment requirement for Google Play, and probably Android 16 / API 36 next year.

@grendello were you looking at this for SkiaSharp?

@grendello
Copy link
Member

@jonathanpeppers I tried to, but couldn't build it locally and then I got distracted by other tasks. I'll try to look into it soon.

@mattleibow
Copy link
Contributor

Is there some compiler/linker flag? If this is a Google requirement, then I am sure the latest skia code will have it somewhere and I could find it with a code search and backport.

@grendello
Copy link
Member

Is there some compiler/linker flag? If this is a Google requirement, then I am sure the latest skia code will have it somewhere and I could find it with a code search and backport.

If building with the NDK r28 (not yet released), the 16k alignment would be enabled automatically. With older NDK versions, one has to pass the -Wl,-z,max-page-size=16384 flag to the compiler when linking (or -z max-page-size=16384 when invoking the linker directly)

You can find more details here and here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants