Bug 290460 - multimedia/jellyfin: The version of the native libSkiaSharp library (88.1) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [116.0, 117.0)
Summary: multimedia/jellyfin: The version of the native libSkiaSharp library (88.1) i...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-24 04:41 UTC by jan
Modified: 2025-11-11 14:04 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bapt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jan 2025-10-24 04:41:50 UTC
After updating to 10.11.0 it crashed on startup:

[2025-10-23 15:45:41.382 +02:00] [FTL] [9] Main: Error while starting server
System.TypeInitializationException: The type initializer for 'Jellyfin.Drawing.Skia.SkiaEncoder' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
 ---> System.InvalidOperationException: The version of the native libSkiaSharp library (88.1) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [116.0, 117.0).
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible)
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
   at SkiaSharp.SKObject..cctor()

maybe this is related to the dependency graphics/libskiasharp? This is version 2.88 (milestone 88?) Jellyfin uses SkiaSharp 3.116.1. 3.0 changed milestone to 115 .
Comment 1 commit-hook freebsd_committer freebsd_triage 2025-10-24 09:27:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4ea7e8c1a353b3f0ee4275d6cc75a0fcc0d23765

commit 4ea7e8c1a353b3f0ee4275d6cc75a0fcc0d23765
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2025-10-24 09:25:37 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-10-24 09:27:18 +0000

    graphics/libskiasharp: update to snapshot tracking the skia version 177

    Change versionning to track the skia version
    Note: this should have been pushed along with jellyfin upgrade

    PR:     290460

 graphics/libskiasharp/Makefile | 7 ++++---
 graphics/libskiasharp/distinfo | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2025-10-24 09:28:03 UTC
sorry I forgot to push the libskiasharp update.
I'll keep this PR open until you confirm that with the new libskiasharp it works great for you.
Comment 3 jan 2025-10-24 09:38:49 UTC
graphics/libskiasharp does not build:


=======================<phase: configure      >============================
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0
===>   libskiasharp-117 depends on executable: gn - found
===>   libskiasharp-117 depends on executable: ninja - found
===>   libskiasharp-117 depends on file: /usr/local/bin/python3.11 - found
===>   libskiasharp-117 depends on file: /usr/local/bin/as - found
===>   libskiasharp-117 depends on file: /usr/local/bin/ccache - found
===>   libskiasharp-117 depends on shared library: libexpat.so - found (/usr/local/lib/libexpat.so)
===>   libskiasharp-117 depends on shared library: libfontconfig.so - found (/usr/local/lib/libfontconfig.so)
===>   libskiasharp-117 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so)
===>   libskiasharp-117 depends on shared library: libpng.so - found (/usr/local/lib/libpng.so)
===>   libskiasharp-117 depends on shared library: libwebp.so - found (/usr/local/lib/libwebp.so)
===>   libskiasharp-117 depends on shared library: libjpeg.so - found (/usr/local/lib/libjpeg.so)
===>  Configuring for libskiasharp-117
cd /wrkdirs/usr/ports/graphics/libskiasharp/work/skia-5ab716e1f47fd2f5f258380c6feabc5997728dc7 && /usr/bin/env PYTHON="/usr/local/bin/python3.11" XDG_DATA_HOME=/wrkdirs/usr/ports/graphics/libskiasharp/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/graphics/libskiasharp/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/graphics/libskiasharp/work/.cache  HOME=/wrkdirs/usr/ports/graphics/libskiasharp/work TMPDIR="/tmp" PATH=/usr/local/libexec/ccache:/wrkdirs/usr/ports/graphics/libskiasharp/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/graphics/libskiasharp/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh CCACHE_DIR="/root/.ccache" gn gen 'out' --args='is_official_build=true  skia_enable_tools=false  target_os="linux"  skia_use_icu=false  skia_use_sfntly=false  skia_use_piex=true  skia_use_harfbuzz=false  skia_use_wuffs=false  skia_use_system_expat=true  skia_use_system_libjpeg_turbo=false  skia_use_system_freetype2=true  skia_use_system_libpng=true  skia_use_system_libwebp=true  skia_use_system_zlib=true  skia_enable_gpu=true  skia_enable_skottie=true  skia_enable_pdf=true  skia_use_dng_sdk=false  extra_cflags=[  "-DSKIA_C_DLL",  "-I/usr/local/include",  "-I/usr/local/include/freetype2"]  extra_ldflags=["-L/usr/local/lib"]  linux_soname_version="117.0.0"'
ERROR at //gn/BUILDCONFIG.gn:119:14: Script returned non-zero exit code.
  is_clang = exec_script("//gn/is_clang.py",
             ^----------
Current dir: /wrkdirs/usr/ports/graphics/libskiasharp/work/skia-5ab716e1f47fd2f5f258380c6feabc5997728dc7/out/
Command: python3 /wrkdirs/usr/ports/graphics/libskiasharp/work/skia-5ab716e1f47fd2f5f258380c6feabc5997728dc7/gn/is_clang.py cc c++
Returned 127.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/libskiasharp
build of graphics/libskiasharp | libskiasharp-117 ended at 2025-10-24T11:37:22+02:00
build time: 00:00:10
!!! build failure encountered !!!
[00:00:13] Error: Build failed in phase: configure
[00:00:13] [14amd64-default] [2025-10-24_11h37m10s] [failed/configure] Time: 00:00:12
           Queued: 18 Inspected: 17 Ignored: 0 Built: 0 Failed: 1 Skipped: 0 Fetched: 0 Remaining: 0
[00:00:13] Logs: /usr/local/poudriere/data/logs/bulk/14amd64-default/2025-10-24_11h37m10s
[00:00:13] Cleaning up
[00:00:13] Unmounting file systems
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-10-24 10:18:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=461129dcfa84a5c39cc70b40616790e8bdb2f3f6

commit 461129dcfa84a5c39cc70b40616790e8bdb2f3f6
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2025-10-24 10:16:42 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-10-24 10:18:06 +0000

    graphics/libskiasharp: fix the python binary alias

    gn expects python3 not python as a command

    PR:     290460

 graphics/libskiasharp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 jan 2025-10-24 10:44:38 UTC
Well, this is odd...

[2025-10-24 12:43:08.455 +02:00] [INF] [9] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
[2025-10-24 12:43:08.461 +02:00] [FTL] [9] Main: Error while starting server
System.TypeInitializationException: The type initializer for 'Jellyfin.Drawing.Skia.SkiaEncoder' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
 ---> System.InvalidOperationException: The version of the native libSkiaSharp library (117.0) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [116.0, 117.0).
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible)
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
   at SkiaSharp.SKObject..cctor()
   --- End of inner exception stack trace ---
   at SkiaSharp.SKObject.GetOrAddObject[TSkiaObject](IntPtr handle, Func`3 objectFactory)
   at SkiaSharp.SKImageFilter.GetObject(IntPtr handle)
   at SkiaSharp.SKImageFilter.CreateMatrixConvolution(SKSizeI kernelSize, ReadOnlySpan`1 kernel, Single gain, Single bias, SKPointI kernelOffset, SKShaderTileMode tileMode, Boolean convolveAlpha, SKImageFilter input, SKRect* cropRect)
   at SkiaSharp.SKImageFilter.CreateMatrixConvolution(SKSizeI kernelSize, ReadOnlySpan`1 kernel, Single gain, Single bias, SKPointI kernelOffset, SKShaderTileMode tileMode, Boolean convolveAlpha)
   at Jellyfin.Drawing.Skia.SkiaEncoder..cctor()
   --- End of inner exception stack trace ---
   at Jellyfin.Drawing.Skia.SkiaEncoder.IsNativeLibAvailable()
   at Jellyfin.Server.CoreAppHost.RegisterServices(IServiceCollection serviceCollection)
   at Emby.Server.Implementations.ApplicationHost.Init(IServiceCollection serviceCollection)
   at Jellyfin.Server.Program.<>c__DisplayClass13_0.<StartServer>b__0(IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
Comment 6 Baptiste Daroussin freebsd_committer freebsd_triage 2025-10-24 11:28:23 UTC
Reading at skiasharp code highlights the issue:

"
var isIncompatible = current < minSupported || current >= maxSupported;
"

So the maximum supported version is actually unsupported.

The reason why I am not impacted in my setup is on my test box, I am running 116 on my testbox.

I upgraded to 117 and even 118 later on but never upgraded my testbox... sorry about this.

I want back to 117 when reading the range on your logs.

I'll downgrade to 116.
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-10-24 11:41:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a2ca81bc802991772559ed81ecfd44efdeda98a9

commit a2ca81bc802991772559ed81ecfd44efdeda98a9
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2025-10-24 11:37:06 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-10-24 11:40:06 +0000

    graphics/libskiasharp: downgrade to 116

    when the skiasharp dotnet package claims it supports the range 116,117
    it means from 116 included up to 117 NOT included.

    PR:     290460

 graphics/libskiasharp/Makefile | 7 ++++---
 graphics/libskiasharp/distinfo | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
Comment 8 jan 2025-10-24 11:54:43 UTC
unfortunately it does not work. 

[2025-10-24 13:53:19.000 +02:00] [FTL] [9] Main: Error while starting server
System.TypeInitializationException: The type initializer for 'Jellyfin.Drawing.Skia.SkiaEncoder' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKBlender' threw an exception.
 ---> System.EntryPointNotFoundException: Unable to find an entry point named 'sk_blender_new_mode' in shared library 'libSkiaSharp'.
   at SkiaSharp.SkiaApi.sk_blender_new_mode(SKBlendMode mode)
   at SkiaSharp.SkiaApi.sk_blender_new_mode(SKBlendMode mode)
   at SkiaSharp.SKBlender..cctor()
   --- End of inner exception stack trace ---
   at SkiaSharp.SKBlender.EnsureStaticInstanceAreInitialized()
   at SkiaSharp.SKObject..cctor()
   --- End of inner exception stack trace ---
   at SkiaSharp.SKObject.GetOrAddObject[TSkiaObject](IntPtr handle, Func`3 objectFactory)
   at SkiaSharp.SKImageFilter.GetObject(IntPtr handle)
   at SkiaSharp.SKImageFilter.CreateMatrixConvolution(SKSizeI kernelSize, ReadOnlySpan`1 kernel, Single gain, Single bias, SKPointI kernelOffset, SKShaderTileMode tileMode, Boolean convolveAlpha, SKImageFilter input, SKRect* cropRect)
   at SkiaSharp.SKImageFilter.CreateMatrixConvolution(SKSizeI kernelSize, ReadOnlySpan`1 kernel, Single gain, Single bias, SKPointI kernelOffset, SKShaderTileMode tileMode, Boolean convolveAlpha)
   at Jellyfin.Drawing.Skia.SkiaEncoder..cctor()
   --- End of inner exception stack trace ---
   at Jellyfin.Drawing.Skia.SkiaEncoder.IsNativeLibAvailable()
   at Jellyfin.Server.CoreAppHost.RegisterServices(IServiceCollection serviceCollection)
   at Emby.Server.Implementations.ApplicationHost.Init(IServiceCollection serviceCollection)
   at Jellyfin.Server.Program.<>c__DisplayClass13_0.<StartServer>b__0(IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)

(and yes, ) is exclusive, I could have noticed that...)
Comment 9 Baptiste Daroussin freebsd_committer freebsd_triage 2025-10-24 11:56:12 UTC
hum this one is weird, because it works on my side... will be hard to debug
Comment 10 commit-hook freebsd_committer freebsd_triage 2025-10-24 13:12:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=195f71c7d79bfca172d7d28a6bbd9e5c83407c89

commit 195f71c7d79bfca172d7d28a6bbd9e5c83407c89
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2025-10-24 13:09:18 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-10-24 13:12:25 +0000

    graphics/libskiasharp: bump the exact revision used by SkiaSharp 3.116.1

    On linux libskiasharp.so is provided by the SkiaSharp nuget built as a
    submodule, libskiasharp does not really have any release and tags. From
    Now on, use the hash used by the SkiaSharp version used by jellyfin.
    While here bump the bundle libjpeg_turbo version to the version this
    release of libskiasharp has been tested with.

    PR:     290460

 graphics/libskiasharp/Makefile |  5 +++--
 graphics/libskiasharp/distinfo | 10 +++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)
Comment 11 Baptiste Daroussin freebsd_committer freebsd_triage 2025-10-24 13:24:13 UTC
Note: I have some warnings in the logs: Jellyfin.Drawing.Skia.SkiaEncoder: Unable to determine image dimensions I does not seems to impact usability, I'm digging anyway.
Comment 12 jan 2025-10-24 13:49:51 UTC
It works!

[2025-10-24 15:48:42.446 +02:00] [INF] [9] Emby.Server.Implementations.ApplicationHost: Core startup complete
[2025-10-24 15:48:42.446 +02:00] [INF] [9] Main: Startup complete 0:00:02.3337737

Tested one playback and that worked, too. Looks good, thanks!
Comment 13 Rubén Espinoza (rucko24) 2025-11-11 14:04:23 UTC
System.TypeInitializationException: The type initializer for 'Jellyfin.Drawing.Skia.SkiaEncoder' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
 ---> System.InvalidOperationException: The version of the native libSkiaSharp library (88.1) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [116.0, 117.0).
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible)
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
   at SkiaSharp.SKObject..cctor()


Hi,

For some reason, I'm still having this issue with the latest version in branch 13.3 latest. 

Is it possible to share libskiasharp.so 116? And replace it in the path that Jellyfin uses.