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] musl binaries overwrite ones built for the normal glibc #1637

Closed
kekekeks opened this issue Feb 19, 2021 · 4 comments · Fixed by #1657
Closed

[BUG] musl binaries overwrite ones built for the normal glibc #1637

kekekeks opened this issue Feb 19, 2021 · 4 comments · Fixed by #1657

Comments

@kekekeks
Copy link
Contributor

kekekeks commented Feb 19, 2021

Entries here

and here

<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-musl-x86\native\libHarfBuzzSharp*.so">

get copied to the same directories as normal glibc-built binaries which makes MSBuild to overwrite normal ones with musl ones. That essentially breaks SkiaSharp with desktop Mono.

@mattleibow
Copy link
Contributor

Indeed. That is a very useful observation... 🤦

Is there a way to detect MUSL at runtime so I can correctly load from a different folder?

@mattleibow
Copy link
Contributor

Thanks for reporting this and sorry for the long delay. I was doing crazy things with MAUI. I see what I did was basically dumb. What would work in a typical case? Would you want to compile for both glibc and musl and have some runtime check (that I am not sure of the best way to do) or have a project property that you set, say <PreferMuslSkiaSharp>true</>?

@kekekeks
Copy link
Contributor Author

PreferMuslSkiaSharp looks like a decent solution, yes.

mattleibow added a commit that referenced this issue Mar 13, 2021
@mattleibow
Copy link
Contributor

@kekekeks this seems to be a nice solution that does not require any changes to the project files: #1657

It also supports the magic of running anywhere if you copy the output dir. No need for Musl-specific builds.

mattleibow added a commit that referenced this issue May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants