Skip to content

Add riscv64 build support#3192

Merged
mattleibow merged 5 commits into
mono:mainfrom
kasperk81:main
Mar 12, 2025
Merged

Add riscv64 build support#3192
mattleibow merged 5 commits into
mono:mainfrom
kasperk81:main

Conversation

@kasperk81

Copy link
Copy Markdown
Contributor

Description of Change

Add linux-riscv64 and linux-musl-riscv64 support. Debian 12 with clang 19 and libfontconfig1_2.15.0-2 (http://deb.debian.org/debian/pool/main/f/fontconfig/) is a good baseline to start.

Bugs Fixed

API Changes

None.

Behavioral Changes

None.

Required skia PR

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

@mattleibow

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

mattleibow
mattleibow previously approved these changes Mar 10, 2025
@mattleibow

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattleibow

Copy link
Copy Markdown
Contributor

While we wait for the build to run again, are you able to confirm that the artifacts work in the first run? https://dev.azure.com/xamarin/public/_build/results?buildId=137319&view=results

@mattleibow

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattleibow mattleibow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this PR up and iterating on it. So far CI has been green all the way.

This is looking done, except for 2 small issues:

  • the other 2 targets files also need the risc items
  • there are double files in the nuget (not because of this PR) and if you are able to just fix the wildcards

Comment thread binding/HarfBuzzSharp.NativeAssets.Linux/HarfBuzzSharp.NativeAssets.Linux.csproj Outdated
Comment thread binding/SkiaSharp.NativeAssets.Linux/SkiaSharp.NativeAssets.Linux.csproj Outdated
@github-project-automation github-project-automation Bot moved this to Changes Requested in SkiaSharp Backlog Mar 10, 2025
@mattleibow

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattleibow

mattleibow commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

I see all the linux tests are failing with :

System.TypeInitializationException : The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---- System.DllNotFoundException : Unable to load shared library 'libSkiaSharp' or one of its dependencies. 

It could either be that the so is truly not there OR it may be the so is depending on something that is not there.

Comment thread binding/Binding.Shared/LibraryLoader.cs
Comment thread native/linux-clang-cross/build.cake
@mattleibow

Copy link
Copy Markdown
Contributor

Actually, all of my CI is failing with that - even those with no changes... I wonder if the azure devops image is broken somehow.

Let me rebuild main and see what happens.

@kasperk81

Copy link
Copy Markdown
Contributor Author

the fix is #3194

@mattleibow
mattleibow merged commit e5f74e7 into mono:main Mar 12, 2025
@github-project-automation github-project-automation Bot moved this from Changes Requested to Done in SkiaSharp Backlog Mar 12, 2025
@mattleibow

Copy link
Copy Markdown
Contributor

Thanks for the work on this PR!

@mattleibow

Copy link
Copy Markdown
Contributor

This build should be on the preview feed as nightly 19

@aicynide

Copy link
Copy Markdown

@kasperk81 please add linux-bionic build support also 🙏 for arm64, x64 and x86 Architectures
Please

@kasperk81

Copy link
Copy Markdown
Contributor Author

@aicynide

Copy link
Copy Markdown

@aicynide, android has its own package https://www.nuget.org/packages/SkiaSharp.NativeAssets.Android

Yes you are I think SkiaSharp my work under linux-bionic but issue is with sqlitePCL.raw libe_sqlite.so https://github.com/termux/termux-packages/actions/runs/13115509057/job/36588727595?pr=23074#step:6:2786
linux-bionic-{arch} is somewhat different from android. android-{arch} is for android but linux-bionic-{arch} is for Termux
I'm a termux package contributor and package maintainer, currently I'm working on porting jellyfin to termux and some dependencies of jellyfin like SQLITEPCL.raw nuget is available for linux-bionic

It would be a huge help if you can provide SQLITEPCL.raw 's libe_sqlite.so for linux-bionic

Thank you

@mattleibow

Copy link
Copy Markdown
Contributor

@aicynide please open a new issue.

@mattleibow

Copy link
Copy Markdown
Contributor

Hi folks,

The builds are now available on the preview feed: https://aka.ms/skiasharp-eap/index.json
Let me know if version 3.119.0-preview.0.38 is now working again for you.

As soon as you let me know, I can release this to NuGet and then hopefully a stable version shortly afterwards.

github-merge-queue Bot pushed a commit to AvaloniaUI/Avalonia that referenced this pull request May 17, 2025
…18571)

* SkiaSharp.props:Update it to support LoongArch64 and RISC-V 64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/3.119.0-preview.1.2

* HarfBuzzSharp.props:Support LoongArch64 and RISC-V64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/8.3.1.1-preview.1.2

* Update SkiaSharp.props

* Update HarfBuzzSharp.props

---------

Co-authored-by: Maxwell Katz <maxkatz6@outlook.com>
github-merge-queue Bot pushed a commit to AvaloniaUI/Avalonia that referenced this pull request May 17, 2025
…18571)

* SkiaSharp.props:Update it to support LoongArch64 and RISC-V 64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/3.119.0-preview.1.2

* HarfBuzzSharp.props:Support LoongArch64 and RISC-V64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/8.3.1.1-preview.1.2

* Update SkiaSharp.props

* Update HarfBuzzSharp.props

---------

Co-authored-by: Maxwell Katz <maxkatz6@outlook.com>
maxkatz6 added a commit to AvaloniaUI/Avalonia that referenced this pull request May 19, 2025
…18571)

* SkiaSharp.props:Update it to support LoongArch64 and RISC-V 64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/3.119.0-preview.1.2

* HarfBuzzSharp.props:Support LoongArch64 and RISC-V64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/8.3.1.1-preview.1.2

* Update SkiaSharp.props

* Update HarfBuzzSharp.props

---------

Co-authored-by: Maxwell Katz <maxkatz6@outlook.com>
MrJul pushed a commit to AvaloniaUI/Avalonia that referenced this pull request Jun 5, 2025
…18571)

* SkiaSharp.props:Update it to support LoongArch64 and RISC-V 64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/3.119.0-preview.1.2

* HarfBuzzSharp.props:Support LoongArch64 and RISC-V64

mono/SkiaSharp#3198
mono/SkiaSharp#3192
mono/SkiaSharp#3200
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/8.3.1.1-preview.1.2

* Update SkiaSharp.props

* Update HarfBuzzSharp.props

---------

Co-authored-by: Maxwell Katz <maxkatz6@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] riscv64 flavor of libSkiaSharp and libHarfBuzzSharp

3 participants