Skip to content

Remove Linux x86 native build and packaging - #5784

Merged
mattleibow merged 1 commit into
mainfrom
mattleibow-dev/fix-linux-x86-docker-rootfs
Nov 17, 2026
Merged

mattleibow merged 1 commit into
mainfrom
mattleibow-dev/fix-linux-x86-docker-rootfs

Conversation

@mattleibow

@mattleibow mattleibow commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Upstream .NET has removed all linux-x86 code, cross-compilation scripts, and Docker images across .NET 8, .NET 10, .NET 11, and .NET 12 (dotnet/runtime#136997, dotnet/runtime#137008, dotnet/arcade#17770, dotnet/dotnet-buildtools-prereqs-docker#1821), as .NET has never shipped a linux-x86 runtime or apphost (dotnet/runtime#31180) and the Linux kernel/major distributions are phasing out 32-bit i[3456]86 support.

Today's mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-crossdeps-builder-amd64 update picked up dotnet/arcade#17770, which removed the x86 target from /scripts/eng/common/cross/build-rootfs.sh and broke scripts/infra/native/linux/docker/glibc-x86/Dockerfile.

Following linux-musl-x86 (already removed in #4062), this PR drops the linux-x86 native build and packaging:

  • Removes scripts/infra/native/linux/docker/glibc-x86/ and the x86 special cases in glibc/Dockerfile, glibc/build-local.sh, and native/linux/build.cake
  • Removes the native_linux_x86_linux and native_linux_x86_nodeps_linux CI jobs from scripts/azure-templates-stages-native-linux.yml and scripts/azure-templates-stages-native-merge.yml
  • Removes x86 from the Linux native artifact inventory (tests/SkiaSharp.Tests.Native/Cases/Helpers.psm1 and LinuxGlibcCompatibility.ps1)
  • Removes runtimes/linux-x86 and stale runtimes/linux-musl-x86 entries from SkiaSharp.NativeAssets.Linux, SkiaSharp.NativeAssets.Linux.NoDependencies, and HarfBuzzSharp.NativeAssets.Linux

Related issues

Related to dotnet/runtime#136997
Related to dotnet/runtime#137008
Related to dotnet/arcade#17770
Related to dotnet/dotnet-buildtools-prereqs-docker#1821

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

Behavior

SkiaSharp.NativeAssets.Linux, SkiaSharp.NativeAssets.Linux.NoDependencies, and HarfBuzzSharp.NativeAssets.Linux no longer include runtimes/linux-x86/native/ binaries, matching upstream .NET's removal of linux-x86 infrastructure.

Testing

  • Updated tests/SkiaSharp.Tests.Native/Cases/Helpers.psm1 and tests/SkiaSharp.Tests.Native/Cases/LinuxGlibcCompatibility.ps1 to match the supported Linux architecture set (x64, arm, arm64, riscv64, loongarch64).
  • Full CI pipeline on this PR will validate native Linux builds, artifact merge, native artifact tests, and NuGet packaging.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Added or updated accurate source /// documentation and regenerated bindings when applicable
  • Native change? Companion mono/skia PR linked above and bindings regenerated

@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 5784

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5784"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-5784/packages --name skiasharp-pr-5784
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-5784

@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

Every PR builds and smoke-tests the site. Add the automation/staging label to also publish a documentation preview for this PR.

Removing the label removes the preview. While the label is present, each new commit updates it.


This comment is automatically updated by the documentation staging workflow.

@mattleibow
mattleibow force-pushed the mattleibow-dev/fix-linux-x86-docker-rootfs branch from 4cbe64e to e4ce2b0 Compare November 17, 2026 14:45
@mattleibow mattleibow changed the title [ci] Fix Linux x86 Docker rootfs build after dotnet/arcade#17770 Remove Linux x86 native build and packaging Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5784

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 29 slower · 🟢 41 faster

  • 🟢 RuntimeEffectShaderBenchmark.DrawFrame · Linux · 5.66 ms → 2.31 ms (-59%)
  • 🟢 MatrixMapPointsBenchmark.MapPoints(Points: 4096) · Linux · 4.55 µs → 2.02 µs (-56%)
  • 🟢 MatrixMapPointsBenchmark.MapPoints(Points: 256) · Linux · 341.6 ns → 163.5 ns (-52%)
  • 🟢 SceneRenderBenchmark.RenderFrame(Complexity: 4) · Linux · 30.79 ms → 14.80 ms (-52%)
  • 🟢 SceneRenderBenchmark.RenderFrame(Complexity: 1) · Linux · 6.62 ms → 3.22 ms (-51%)
  • …and 65 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
RuntimeEffectShaderBenchmark.DrawFrame 5.66 ms 2.31 ms 🟢 -59%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 4.55 µs 2.02 µs 🟢 -56%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 341.6 ns 163.5 ns 🟢 -52%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 30.79 ms 14.80 ms 🟢 -52%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 6.62 ms 3.22 ms 🟢 -51%
CanvasDrawBenchmark.Draw(Shapes: 64) 5.32 ms 3.42 ms 🟢 -36%
CanvasDrawBenchmark.Draw(Shapes: 512) 42.51 ms 27.61 ms 🟢 -35%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 9.06 ms 6.28 ms 🟢 -31%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 104.09 µs 76.57 µs 🟢 -26%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 1.02 ms 751.97 µs 🟢 -26%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.19 ms 1.61 ms 🟢 -26%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 250.95 µs 185.99 µs 🟢 -26%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 274.48 µs 204.42 µs 🟢 -26%
ColorMathBenchmark.ToColorF(Colors: 4096) 14.77 µs 11.15 µs 🟢 -24%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.40 ms 1.07 ms 🟢 -23%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.90 ms 2.23 ms 🟢 -23%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 369.21 µs 284.22 µs 🟢 -23%
MatrixMapPointsBenchmark.MapVector(Points: 256) 11.76 µs 9.16 µs 🟢 -22%
MatrixMapPointsBenchmark.MapRect(Points: 256) 12.83 µs 9.99 µs 🟢 -22%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 204.90 µs 159.67 µs 🟢 -22%
PathBoundsBenchmark.TightBounds(Points: 64) 976.8 ns 761.9 ns 🟢 -22%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 722.37 µs 570.80 µs 🟢 -21%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 179.79 µs 148.70 µs 🟢 -17%
ColorMathBenchmark.ToColor(Colors: 4096) 12.16 µs 10.08 µs 🟢 -17%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 231.81 µs 194.32 µs 🟢 -16%
…and 6 more

Windows

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 97.24 µs 126.47 µs 🔴 +30%
PathBoundsBenchmark.TightBounds(Points: 1024) 15.57 µs 20.25 µs 🔴 +30%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 8.55 µs 10.88 µs 🔴 +27%
PathBoundsBenchmark.TightBounds(Points: 64) 1.51 µs 1.89 µs 🔴 +25%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 142.98 µs 165.36 µs 🔴 +16%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 122.84 µs 141.43 µs 🔴 +15%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 250.22 µs 283.40 µs 🔴 +13%
MatrixOpsBenchmark.Concat(Count: 4096) 218.40 µs 246.69 µs 🔴 +13%
ColorParseBenchmark.Parse(Iterations: 1000) 75.57 µs 82.97 µs 🔴 +10%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.65 ms 2.90 ms 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 256) 8.12 µs 8.89 µs 🔴 +9%
CanvasDrawBenchmark.Draw(Shapes: 512) 21.15 ms 22.99 ms 🔴 +9%
MatrixOpsBenchmark.Invert(Count: 4096) 128.36 µs 137.90 µs 🔴 +7%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.51 ms 2.65 ms 🔴 +6%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 39.82 µs 41.94 µs 🔴 +5%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 9.88 ms 10.38 ms 🔴 +5%

macOS

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 200.35 µs 156.42 µs 🟢 -22%
CanvasDrawBenchmark.Draw(Shapes: 512) 11.95 ms 14.38 ms 🔴 +20%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 69.30 µs 55.71 µs 🟢 -20%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 299.58 µs 250.13 µs 🟢 -17%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 688.83 µs 799.62 µs 🔴 +16%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.59 ms 1.81 ms 🔴 +14%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 48.23 µs 41.51 µs 🟢 -14%
MatrixMapPointsBenchmark.MapVector(Points: 256) 3.02 µs 2.62 µs 🟢 -13%
MatrixOpsBenchmark.Invert(Count: 4096) 75.21 µs 84.60 µs 🔴 +12%
MatrixOpsBenchmark.Concat(Count: 4096) 141.41 µs 124.33 µs 🟢 -12%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.28 ms 6.98 ms 🔴 +11%
PathBoundsBenchmark.TightBounds(Points: 64) 974.4 ns 1.07 µs 🔴 +10%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 5.29 ms 5.77 ms 🔴 +9%
RuntimeEffectShaderBenchmark.DrawFrame 592.79 µs 543.67 µs 🟢 -8%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 8.38 µs 9.05 µs 🔴 +8%
ColorMathBenchmark.ToColor(Colors: 4096) 21.46 µs 19.76 µs 🟢 -8%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 162.1 ns 174.7 ns 🔴 +8%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 7.48 µs 6.90 µs 🟢 -8%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 211.84 µs 225.87 µs 🔴 +7%
ColorParseBenchmark.Parse(Iterations: 1000) 71.17 µs 75.84 µs 🔴 +7%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.36 ms 1.27 ms 🟢 -7%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.38 µs 5.06 µs 🟢 -6%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 22.10 µs 20.98 µs 🟢 -5%

📈 Full interactive perf-dashboard & run details →

Follow upstream .NET removal of linux-x86 cross-build infrastructure
(dotnet/runtime#136997, dotnet/runtime#137008, dotnet/arcade#17770,
dotnet/dotnet-buildtools-prereqs-docker#1821) by dropping the Linux x86
cross-compilation Dockerfile, CI jobs, native artifact checks, and
NuGet package entries.

Co-authored-by: Copilot App <[email protected]>
@mattleibow
mattleibow force-pushed the mattleibow-dev/fix-linux-x86-docker-rootfs branch from 4a2a405 to 2bb9ec9 Compare November 17, 2026 17:21
@mattleibow

Copy link
Copy Markdown
Contributor Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed 2bb9ec95 against main at 5e3e1c51 (merge-base 5e3e1c51, 19 files). This is a static, read-only review; I did not build or run tests.

LGTM. Linux x86 is removed consistently:

  • CI: the glibc matrix now uses the same each arch pattern as alpine, and both merger lists in azure-templates-stages-native-merge.yml drop exactly the native_linux_x86_* jobs, so produced and expected job/artifact names still match.
  • Packaging: the three NativeAssets.Linux csproj files and net4 buildTransitive targets keep the glibc/musl/bionic groups intact; the removed linux-musl-x86 entries were already dead since alpine never built x86.
  • Tests: Helpers.psm1 and LinuxGlibcCompatibility.ps1 match the artifacts still produced; NativeAssetOutputTests derives its expectations from the actual package contents and has no x86 assertions.
  • Leftovers: the remaining x86 references are Android, Windows/WinUI and netfx only.

Non-blocking nit: documentation/dev/packages.md:94 still lists x86 among the Linux package architectures (and line 95 inherits it for NoDependencies); dropping it would keep the docs in sync.

@mattleibow
mattleibow enabled auto-merge (squash) November 17, 2026 20:51
@mattleibow
mattleibow disabled auto-merge November 17, 2026 20:51
@mattleibow
mattleibow enabled auto-merge (squash) November 17, 2026 20:51
@mattleibow
mattleibow merged commit 683c56b into main Nov 17, 2026
128 checks passed
@mattleibow
mattleibow deleted the mattleibow-dev/fix-linux-x86-docker-rootfs branch November 17, 2026 21:24
@github-project-automation github-project-automation Bot moved this from Approved to Done in SkiaSharp Backlog Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants