-
Notifications
You must be signed in to change notification settings - Fork 540
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
More Pre-Built Linux Libraries #453
Comments
Ahhhh. a tip although not related to this topic (but it takes a little of my time to settle things done, so this is just for those who are not familiar with linux OS like me): so steps to install libSkiaSharp for your CentOS: Actually i found that the lib works well after only setp 3 is done. (maybe I do not use some of OpenGL features?) done, what a good day. |
@jcyuan OpenGL is not required, but will be used if you are using the GPU surfaces. It is also loaded at runtime, and thus not needed at compile-time. |
@jcyuan Could the package name for fontconfig may differ across distros? |
@mattleibow I don't know, actually once installed, I found the lib you mentioned 'libfontconfig.so.1' is located in /usr/lib64/ path, and actually the 'libSkiaSharp.so' uses it correctly as the ldd command shows libSkiaSharp.so refers to this path. |
To make life easier for everyone, I moved code around and added a new target to the GN files. Now, the native |
Just linking some repos here that do raspberry things: |
Just FYI, I just used SkiaSharp.NativeAssets.Linux version 1.68.0-preview28 from nuget on ArchLinux and basic drawing works! I haven't done extensive testing, but the library does initialize and I can draw on a canvas and export the SKImage to a PNG. |
That is great news! |
Quoting from https://github.com/mono/SkiaSharp/releases/tag/v1.68.0:
I'm wondering, what if I want to use SkiaSharp.Views.Forms in Linux? Do I need a Linux flavour of this nuget (https://www.nuget.org/packages/SkiaSharp.Views.Forms) or is it enough to have the SkiaSharp.NativeAssets.Linux dll in the same folder of the app? Thanks |
The SkiaSharp.Views.Forms NuGet is the managed views for Xamarin.Forms, and SkiaSharp.NativeAssets.Linux is the native engine. The reason that you may not have the GTK# working is that we don't yet support that. See #379 |
+1 for an Alpine NuGet build/ package please...! |
https://www.nuget.org/packages/Goelze.SkiaSharp.NativeAssets.AlpineLinux/ does not work with the latest version of SkiaSharp. Can AlpineLinux native assets become "official" and be published with each new version of SkiaSharp, like SkiaSharp.NativeAssets.Linux? |
We could have a look at that now. I recently changed things so that the Linux native bits actually all build on Docker. I hope I did it right to get alternate distros super easy. It should just be a docker file link this And then add a chunk to the yaml That should be all that is required. If not, then I didn't do so well and we need to fix that. What actually runs is a docker build and then a docker run with a volume to the source Maybe have a go and see what happens. |
We could add a |
Oh, yeah. I'd like to add the core platforms that .NET Core supports to the main NuGet. Right now I just have |
For ARM it's a bit in flux right now, my old attempt https://github.com/EraYaN/EraYaN.SkiaSharp.NativeAssets.LinuxArm still works (and we use/ship it successfully for some time now with Jellyfin) but docker is doing some funky stuff right now to make it easier, although it has not fully landed yet (ie. you need qemu to do a lot of things or just plain cross compile and then create a new docker image with the result.) |
+1 for Ubuntu arm64 (Nvidia Jetson Nano) |
+1 for Alpine |
Hi, Does it work on the latest official Ubuntu 20.04 based container images available at: Thx. |
Hi, For those interested I got the library working on Alpine by installing: And included this line in my docker file: Thanks, |
+1 for Alpine. |
Hi folks. I know that Alpine is a high priority, so working on that. Thanks to the community for stepping in. Right now I am just finishing up the previews for Web Assembly! @JMan7777 it should work with the SkiaSharp.NativeAssets.Linux package on most Debian-based - including most Ubuntu versions. |
FOLKS!!! After much delay and +1's, Alpine is now in the box!!! Just merged a Alpine x64 archive into master and will go out as a preview as soon as CI finishes up! Right now, I am building using Alpine 3.9 but it runs all the way back to Alpine 3.7 (at least). There are 2 builds, the default which requires the usual fontconfig install: I just went for x64 right now, but if there are other architectures or platforms, keep up with the You can also have a look t #1339 and see just how to submit a PR to add any Linux platform that is needed. Then you don't have to worry about maintaining it - because I'll have to 😉 |
Adding armv7a hf and arm64/aarch64 in #1382 |
Almost ready to close this now... Does anyone still use x86 Linux anymore? Is that still a thing? What additional Linux variants do we actually need? Most things just work fine with the old Debian binaries. |
:mips-interest |
Hi @mattleibow There is building libSkiaSharp.so document, but no libHarfBuzzSharp.so, how to build libHarfBuzzSharp.so? Thanks, |
@xiangzhai you should be able to also build harfbuzz by swapping out the gn target from SkiaSharp to Harfbuzz. Another way to build is you don't mind installing mono is to just use cake and run with the bootstrapper. The you can just execute the externals-linux cake task. |
Hi @mattleibow Thanks for your teaching! Leslie Zhai |
+1 for linux-musl-arm64 |
Thanks for all the votes folks! I'm going to finally close this issue since we got most of the linux distros that are supported. If one is specifically needed, then feel free to open an issue for that one. However, if you have a special linux that you need SkiaSharp for, you can probably modify one of the Docker files that we use for your distro: https://github.com/mono/SkiaSharp/tree/main/scripts/Docker |
I am trying to deploy an app using the SkiaSharp libraries to AKS and I get this error: System.AggregateException: One or more errors occurred. (The type initializer for 'SkiaSharp.SKData' threw an exception.) (The type initializer for 'SkiaSharp.SKData' threw an exception.) But if I deploy the very same code to a Linux (Ubuntu) Azure app service, it works without any issues This is the base Docker image getting deployed to AKS mcr.microsoft.com/dotnet/aspnet:6.0 I am converting images from a other formats to .webp format Any ideas Thanks |
Right now there is a pre-built library for Linux x64 that goes with each release. I want to add more to make life easier.
Leave comments and other feedback so that I can add other distros and architectures. Also for feedback is the platforms that a binary can be re-used. (For example, the Ubuntu 14.04 binary can also work on CentOS 7)
This doc has the list for .NET Core:
https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x
This is the platforms supported by mono:
https://www.mono-project.com/download/stable/#download-lin
Current Support
Proposed Support
Dropped
Raspberry Pi (ARM) (steps)Not actually because we have the PR Build for Linux ARM32 (armhf) and ARM64 (aarch64) #1382 that automatically supports it.
CentOS (x64)Not really because this should work with the Debian binaries.
RHEL 6/7 (x64)Not really because this should work with the Debian binaries.
The text was updated successfully, but these errors were encountered: