这是indexloc提供的服务,不要输入任何密码
Skip to content

addpkg(main/jellyfin-server): 10.10.5 #23074

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

Closed
wants to merge 1 commit into from

Conversation

aicynide
Copy link

closes: #9751

@aicynide
Copy link
Author

aicynide commented Jan 31, 2025

I can build it successfully locally without any error

https://api.files.vc/files/fp7/e3db30966f7ef19c67c7cd4e74788a44.zip

[15:47:09] [INF] [1] Main: Jellyfin version: 10.10.5
[15:47:09] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /data/data/com.termux/files/home/.local/share/jellyfin/log]"]
[15:47:09] [INF] [1] Main: Arguments: ["/data/data/com.termux/files/home/jellyfin-10.10.5/builddir/jellyfin.dll", "--nowebclient"]
[15:47:09] [INF] [1] Main: Operating system: Linux 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12)
[15:47:09] [INF] [1] Main: Architecture: X64
[15:47:10] [INF] [1] Main: 64-Bit Process: True
[15:47:10] [INF] [1] Main: User Interactive: True
[15:47:10] [INF] [1] Main: Processor count: 2
[15:47:10] [INF] [1] Main: Program data path: /data/data/com.termux/files/home/.local/share/jellyfin
[15:47:10] [INF] [1] Main: Log directory path: /data/data/com.termux/files/home/.local/share/jellyfin/log
[15:47:10] [INF] [1] Main: Config directory path: /data/data/com.termux/files/home/.config/jellyfin
[15:47:10] [INF] [1] Main: Cache path: /data/data/com.termux/files/home/.cache/jellyfin
[15:47:10] [INF] [1] Main: Temp directory path: /data/data/com.termux/files/usr/tmp/jellyfin
[15:47:10] [INF] [1] Main: Web resources path: /data/data/com.termux/files/home/jellyfin-10.10.5/builddir/jellyfin-web
[15:47:10] [INF] [1] Main: Application directory: /data/data/com.termux/files/home/jellyfin-10.10.5/builddir/
[15:47:10] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Marking following migrations as applied because this is a fresh install: ["CreateNetworkConfiguration", "MigrateMusicBrainzTimeout", "MigrateNetworkConfiguration", "MigrateEncodingOptions"]
[15:47:11] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /data/data/com.termux/files/home/.cache/jellyfin
[15:47:12] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["192.168.1.83", "127.0.0.1"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
[15:47:12] [FTL] [1] Main: Error while starting server
System.TypeInitializationException: The type initializer for 'Jellyfin.Drawing.Skia.SkiaEncoder' threw an exception.
 ---> System.DllNotFoundException: libSkiaSharp
   at SkiaSharp.SKImageFilter.CreateMatrixConvolution(SKSizeI kernelSize, ReadOnlySpan`1 kernel, Single gain, Single bias, SKPointI kernelOffset, SKShaderTileMode tileMode, Boolean convolveAlpha, SKImageFilter input, CropRect 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() in /data/data/com.termux/files/home/jellyfin-10.10.5/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs:line 41
   --- End of inner exception stack trace ---
   at Jellyfin.Server.CoreAppHost.RegisterServices(IServiceCollection serviceCollection) in /data/data/com.termux/files/home/jellyfin-10.10.5/Jellyfin.Server/CoreAppHost.cs:line 65
   at Emby.Server.Implementations.ApplicationHost.Init(IServiceCollection serviceCollection) in /data/data/com.termux/files/home/jellyfin-10.10.5/Emby.Server.Implementations/ApplicationHost.cs:line 448
   at Jellyfin.Server.Program.<>c__DisplayClass8_0.<StartServer>b__0(IServiceCollection services) in /data/data/com.termux/files/home/jellyfin-10.10.5/Jellyfin.Server/Program.cs:line 142
   at Microsoft.Extensions.Hosting.HostingHostBuilderExtensions.<>c__DisplayClass9_0.<ConfigureServices>b__0(HostBuilderContext context, IServiceCollection collection)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig) in /data/data/com.termux/files/home/jellyfin-10.10.5/Jellyfin.Server/Program.cs:line 140
[15:47:12] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[15:47:12] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing PluginManage

@TomJo2000
Copy link
Member

It looks like it can't find dotnet as a command.
Maybe alias dotnet='dotnet8.0' as part of the preconfigure step can fix that.

@aicynide
Copy link
Author

I can build it successfully locally without any error

https://api.files.vc/files/fp7/e3db30966f7ef19c67c7cd4e74788a44.zip

[14:24:18] [INF] [1] Main: Jellyfin version: 10.10.5
[14:24:18] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /data/data/com.termux/files/home/.local/share/jellyfin/log]"]
[14:24:18] [INF] [1] Main: Arguments: ["/data/data/com.termux/files/home/jellyfin-build/builddir/jellyfin.dll", "--nowebclient"]
[14:24:18] [INF] [1] Main: Operating system: Linux 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12)
[14:24:18] [INF] [1] Main: Architecture: X64
[14:24:18] [INF] [1] Main: 64-Bit Process: True
[14:24:18] [INF] [1] Main: User Interactive: True
[14:24:18] [INF] [1] Main: Processor count: 2
[14:24:18] [INF] [1] Main: Program data path: /data/data/com.termux/files/home/.local/share/jellyfin
[14:24:18] [INF] [1] Main: Log directory path: /data/data/com.termux/files/home/.local/share/jellyfin/log
[14:24:18] [INF] [1] Main: Config directory path: /data/data/com.termux/files/home/.config/jellyfin
[14:24:18] [INF] [1] Main: Cache path: /data/data/com.termux/files/home/.cache/jellyfin
[14:24:18] [INF] [1] Main: Temp directory path: /data/data/com.termux/files/usr/tmp/jellyfin
[14:24:18] [INF] [1] Main: Web resources path: /data/data/com.termux/files/home/jellyfin-build/builddir/jellyfin-web
[14:24:18] [INF] [1] Main: Application directory: /data/data/com.termux/files/home/jellyfin-build/builddir/
[14:24:18] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Marking following migrations as applied because this is a fresh install: ["CreateNetworkConfiguration", "MigrateMusicBrainzTimeout", "MigrateNetworkConfiguration", "MigrateEncodingOptions"]
[14:24:20] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /data/data/com.termux/files/home/.cache/jellyfin
[14:24:20] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["192.168.1.83", "127.0.0.1"]
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
[14:24:21] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []

@aicynide
Copy link
Author

It looks like it can't find dotnet as a command. Maybe alias dotnet='dotnet8.0' as part of the preconfigure step can fix that.

At first I had put dotnet8.0 command only but it had same error so changed to dotnet

@TomJo2000
Copy link
Member

I suspect you're gonna need to add dotnet-host-8.0 as a TERMUX_PKG_BUILD_DEPENDS so that dotnet is available in the CI host environment.

@TomJo2000
Copy link
Member

That wasn't it by the looks of it.

@truboxl
Copy link
Contributor

truboxl commented Jan 31, 2025

There is no dotnet on the build machine. Declaring package dependency on dotnet* doesn't fix this. I probably should add termux_setup_dotnet later.

@TomJo2000
Copy link
Member

There is no dotnet on the build machine. Declaring package dependency on dotnet* doesn't fix this. I probably should add termux_setup_dotnet later.

That would definitely be good for standardization.

neurospace369

This comment was marked as spam.

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

Thank u

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

It built successfully 🥳 but there's files packaging issue i believe

@TomJo2000
Copy link
Member

It built successfully 🥳 but there's files packaging issue i believe

You don't seem to have pushed the successful build yet.
The commits on this branch will also need to be squashed and the commit message fixed.
If you would like assistance with that please say so, it seems to be a recurring problem with your PRs.

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

It built successfully 🥳 but there's files packaging issue i believe

You don't seem to have pushed the successful build yet.

You can check the CI log that it built fine, there is error in file checking after successfully building

@TomJo2000
Copy link
Member

Alright so Jellyfin's sqlite library isn't linking correctly yet.

ERROR: ./lib/jellyfin/libe_sqlite3.so contains undefined symbols:
     7: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND dlopen
     8: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pthread_mutexattr_settype
    10: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND sinh
    11: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND log2
    18: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND atan2
    19: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tanh
    20: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND atanh
    21: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND cosh
    29: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND fmod
    30: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND acosh
    31: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND acos
    33: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND dlclose
    45: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND sin
    49: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND atan
    52: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND asin
    55: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND exp
    56: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pthread_mutex_trylock
    59: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND dlerror
    60: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND trunc
    62: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tan
    63: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND dlsym
    65: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pthread_join
    67: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND cos
    69: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pthread_create
    71: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND log
    73: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pow
    75: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pthread_mutexattr_init
    77: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND log10
    78: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND pthread_mutexattr_destroy
    79: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND sqrt
    80: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND asinh
  • Is there a configure option to use the system version of libsqlite?
  • If there is not, find out what libraries need to be added to LDFLAGS

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

The commits on this branch will also need to be squashed and the commit message fixed. If you would like assistance with that please say so, it seems to be a recurring problem with your PRs.

Sorry, I know it, i had thought to squash later. My mistakee. I'm not able to squash now because i sync with upstream using github web mistake.
(There's a option in github web to update branch/sync repo, i used that)
I'm dumb update with upstream in a new branch

@TomJo2000
Copy link
Member

I'm not able to squash now because i sync with upstream using github web mistake. (There's a option in github web to update branch/sync repo, i used that) I'm dumb update with upstream in a new branch

Yeah please be careful to select Update with rebase instead of Update with merge commit when updating your branch from the GitHub web interface.
Merge commits unnecessarily complicate the git history and especially for a feature branch like a PR you just want a simple "branch out, merge in" structure.
A merge based workflow just really isn't ideal for that type of work.
I can fix the commits before merging this PR, you can just focus on getting the remaining build issue resolved for now.

@TomJo2000
Copy link
Member

Or @truboxl can do it I suppose.

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

Squash commits nicely now 😊

@TomJo2000
Copy link
Member

The build options from Arch's official jellyfin-server package will probably work.
https://gitlab.archlinux.org/archlinux/packaging/packages/jellyfin-server/-/blob/main/PKGBUILD?ref_type=heads#L64-72

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

The build options from Arch's official jellyfin-server package will probably work. https://gitlab.archlinux.org/archlinux/packaging/packages/jellyfin-server/-/blob/main/PKGBUILD?ref_type=heads#L64-72

Yeah what about --self-containd option?

@TomJo2000
Copy link
Member

In alpine why is it? --no-self-containd https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/jellyfin/APKBUILD#L20-L24

Seems to be an alternate form of --self-contained false

Co-authored-by: TomIO <43716232+TomJo2000@users.noreply.github.com>

Co-authored-by: Jia Yuan Lo <jylo06g@gmail.com>
@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

After this pr merge, i need someone to check whether jellyfin runs in Nvidia Shield Pro because unlike other android boxed Shield Pro CPU architecture is arm64

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

Even --self-contained=false issue.
I think it should he handled in freebsd way https://codeberg.org/FreeBSD/freebsd-ports/src/commit/93ae5ca9b65bf3768fc55aca3761f5cf7470bb7d/multimedia/jellyfin/Makefile#L446
They are using a separate libsqlite.so file i guess,

@truboxl
Copy link
Contributor

truboxl commented Feb 3, 2025

This PR has derailed.

Dotnet does not build lib*.so files AFAIK. Probably they are fetched from nuget.org. The check fails because those libs are for Desktop Linux (linux-${arch}) and won't work for Android (linux-bionic-${arch}). You need to recompile the libs or request the maintainer to build them.

For libe_sqlite3.so:
https://github.com/ericsink/SQLitePCL.raw
https://github.com/ericsink/cb

Other libs need to be checked too.

--self-contained is for packaging with runtime included. Duplicating files and wasting space at best. By default --no-self-contained is implied.

Please stop request outside reviewers' review. Only the Termux team members will approve and merge PRs.

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

@kcubeterm review i hadn't requested, i dont know how it happened

Isn't linux-bionic-${arch} for ubuntu?
I think there's android--${arch} for android.
nuGet provides *.so files for android also https://www.nuget.org/packages/SkiaSharp.NativeAssets.Android/3.118.0-preview.2.3

Jellyfin depends on https://github.com/mono/SkiaSharp .
I had built and run jellyfin successfully in termux but got libskiasharp.so related error. So liie libe_sqlite3.so libskiasharp.so also need to build

[15:47:09] [INF] [1] Main: Jellyfin version: 10.10.5
[15:47:09] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /data/data/com.termux/files/home/.local/share/jellyfin/log]"]
[15:47:09] [INF] [1] Main: Arguments: ["/data/data/com.termux/files/home/jellyfin-10.10.5/builddir/jellyfin.dll", "--nowebclient"]
[15:47:09] [INF] [1] Main: Operating system: Linux 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12)
[15:47:09] [INF] [1] Main: Architecture: X64
[15:47:10] [INF] [1] Main: 64-Bit Process: True
[15:47:10] [INF] [1] Main: User Interactive: True
[15:47:10] [INF] [1] Main: Processor count: 2
[15:47:10] [INF] [1] Main: Program data path: /data/data/com.termux/files/home/.local/share/jellyfin
[15:47:10] [INF] [1] Main: Log directory path: /data/data/com.termux/files/home/.local/share/jellyfin/log
[15:47:10] [INF] [1] Main: Config directory path: /data/data/com.termux/files/home/.config/jellyfin
[15:47:10] [INF] [1] Main: Cache path: /data/data/com.termux/files/home/.cache/jellyfin
[15:47:10] [INF] [1] Main: Temp directory path: /data/data/com.termux/files/usr/tmp/jellyfin
[15:47:10] [INF] [1] Main: Web resources path: /data/data/com.termux/files/home/jellyfin-10.10.5/builddir/jellyfin-web
[15:47:10] [INF] [1] Main: Application directory: /data/data/com.termux/files/home/jellyfin-10.10.5/builddir/
[15:47:10] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Marking following migrations as applied because this is a fresh install: ["CreateNetworkConfiguration", "MigrateMusicBrainzTimeout", "MigrateNetworkConfiguration", "MigrateEncodingOptions"]
[15:47:11] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /data/data/com.termux/files/home/.cache/jellyfin
[15:47:12] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["192.168.1.83", "127.0.0.1"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
[15:47:12] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
[15:47:12] [FTL] [1] Main: Error while starting server
System.TypeInitializationException: The type initializer for 'Jellyfin.Drawing.Skia.SkiaEncoder' threw an exception.
 ---> System.DllNotFoundException: libSkiaSharp
   at SkiaSharp.SKImageFilter.CreateMatrixConvolution(SKSizeI kernelSize, ReadOnlySpan`1 kernel, Single gain, Single bias, SKPointI kernelOffset, SKShaderTileMode tileMode, Boolean convolveAlpha, SKImageFilter input, CropRect 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() in /data/data/com.termux/files/home/jellyfin-10.10.5/src/Jellyfin.Drawing.Skia/SkiaEncoder.cs:line 41
   --- End of inner exception stack trace ---
   at Jellyfin.Server.CoreAppHost.RegisterServices(IServiceCollection serviceCollection) in /data/data/com.termux/files/home/jellyfin-10.10.5/Jellyfin.Server/CoreAppHost.cs:line 65
   at Emby.Server.Implementations.ApplicationHost.Init(IServiceCollection serviceCollection) in /data/data/com.termux/files/home/jellyfin-10.10.5/Emby.Server.Implementations/ApplicationHost.cs:line 448
   at Jellyfin.Server.Program.<>c__DisplayClass8_0.<StartServer>b__0(IServiceCollection services) in /data/data/com.termux/files/home/jellyfin-10.10.5/Jellyfin.Server/Program.cs:line 142
   at Microsoft.Extensions.Hosting.HostingHostBuilderExtensions.<>c__DisplayClass9_0.<ConfigureServices>b__0(HostBuilderContext context, IServiceCollection collection)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig) in /data/data/com.termux/files/home/jellyfin-10.10.5/Jellyfin.Server/Program.cs:line 140
[15:47:12] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[15:47:12] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing PluginManage

@aicynide
Copy link
Author

aicynide commented Feb 3, 2025

I would like to know whether any C# program successfully packaged in termux

@TomJo2000
Copy link
Member

I think Jellyfin would be the first to be merged.

But there is a draft PR for powershell.

@aicynide
Copy link
Author

aicynide commented Feb 4, 2025

For libe_sqlite3.so: https://github.com/ericsink/SQLitePCL.raw https://github.com/ericsink/cb

They do provide for Xamarian Android, which i think may work in termux?

@aicynide
Copy link
Author

aicynide commented Feb 4, 2025

Jellyfin is fork of emby, and emby supports running their server in any android devices from FireTV stick to Nvidia Shield and any kitkat potato phone
I mean do they build the sqlite , skiasharp libraries their self?
How they manage to get the apk in 32mb 😭 https://github.com/MediaBrowser/Emby.Releases/blob/master/android/emby-android-google-arm64-v8a-release.apk
(Emby is proprietary and close-source btw)

@mexsrc
Copy link

mexsrc commented Feb 15, 2025

So liie libe_sqlite3.so libskiasharp.so also need to build

( @aicynide ) — While i'm searching for Linux variant of Skiasharp's build dependency, I found Tizen Studio as build dependency of Skiasharp, but I don't wanna to let Skiasharp become first to ported into Termux repo's package under (Samsung) Tizen topic and decided to end up developing Skiasharp as Termux's port for Termux repo.

It's reason why Skiasharp offer Tizen Studio as it's build dependency, which it's because Skiasharp's contributor never copy Visual Studio from it's Windows-styled dependency.

I just developing nuget as port of Termux for Termux repo, and planned to request my nuget-included suggested changes to your committed code instead.

1927921-4071655126

@neurospace369

This comment was marked as spam.

@aicynide
Copy link
Author

@mexsrc thanks!
I can see in https://repology.org/project/jellyfin/versions Arch Linux uses nuget .exe binary

@aicynide
Copy link
Author

@mexsrc will you upload skiasharp native binary for termux in nuget?

@TomJo2000
Copy link
Member

It should be built from source in the build regardless.
A precompiled version, while useful to end users, does not meet the criteria for our package build system.

@mexsrc
Copy link

mexsrc commented Feb 23, 2025

A precompiled version, while useful to end users, does not meet the criteria for our package build system.

( @TomJo2000 ) — I properly prefer to "skipping Skiasharp's source extraction" because I doesn't want to let Jellyfin as Termux-ported streaming media under Tizen topic....

Seriously, I don't mind I will just give up developing precompiled version of Skiasharp for Termux repository if "skipping Skiasharp's source extraction" feature is permanently removed for what you said about not meeting criteria, and with this case physically, I never firstly developing compiled version of Skiasharp for Termux repository.

It's because the reason I managed to do is I hate Tizen topic mark (Tizen Studio) version of Termux package but not belonging to my cancelled pull request that I received under my lockable account "ReeaoX". I promise I hope Jellyfin isn't marked as Tizen topic variant of Termux package that can be choice to prevent Tizen topic wanter of Termux (Visual Studio (code-oss) is Microsoft-ish than Tizen Studio).

Will you upload skiasharp native binary for termux in nuget?.

( @aicynide )
Not yet.

@TomJo2000
Copy link
Member

I'm sorry that previous comment is entirely incoherent and I cannot decipher what you are proposing.
I recognize this might be a language barrier so I'll try to extrapolate based on what I think you meant.

Please be very aware that maintaining a precompiled version of skiasharp for Termux outside of the termux-packages build system and repository would be an indefinite, and not inconsiderable amount of work compared to simply packaging it in here with a build script.

We already embed a Skia build into the gw package.

termux_step_make() {
local SKIA_URL_AARCH64="https://github.com/JetBrains/skia-build/releases/download/m93-87e8842e8c/Skia-m93-87e8842e8c-android-Release-arm64.zip"
local SKIA_CHECKSUM_AARCH64="7286fe634cfcd499ef1232b9bdc6b08220daebde0de483639ed498a1dc1ec62e"
local SKIA_URL_X86="https://github.com/JetBrains/skia-build/releases/download/m93-87e8842e8c/Skia-m93-87e8842e8c-android-Release-x86.zip"
local SKIA_CHECKSUM_X86="e79868a2b791ec44673f981b68d5cb658dad3fcef97932ac7b4a80c3dd329e87"
local SKIA_URL_X64="https://github.com/JetBrains/skia-build/releases/download/m93-87e8842e8c/Skia-m93-87e8842e8c-android-Release-x64.zip"
local SKIA_CHECKSUM_X64="1546e41c0b2edc401639e1ed0dd32d9e8b30d478f1c4a5c345ee82f2a5e1b829"
mkdir -p lib/skia && cd lib/skia/
case "$TERMUX_ARCH" in
aarch64)
termux_download "$SKIA_URL_AARCH64" "${TERMUX_PKG_CACHEDIR}/skia-${TERMUX_ARCH}.zip" "$SKIA_CHECKSUM_AARCH64"
;;
i686)
termux_download "$SKIA_URL_X86" "${TERMUX_PKG_CACHEDIR}/skia-${TERMUX_ARCH}.zip" "$SKIA_CHECKSUM_X86"
;;
x86_64)
termux_download "$SKIA_URL_X64" "${TERMUX_PKG_CACHEDIR}/skia-${TERMUX_ARCH}.zip" "$SKIA_CHECKSUM_X64"
;;
*)
termux_error_exit "No architecture '$TERMUX_ARCH' defined for Skia download."
;;
esac
unzip -o "${TERMUX_PKG_CACHEDIR}/skia-${TERMUX_ARCH}.zip"
cd ../../
OLD_SKIA=1 make -j "$TERMUX_PKG_MAKE_PROCESSES"
}

And have a python-skia-pathops package as a dependency for manim.
https://github.com/termux/termux-packages/blob/master/packages/python-skia-pathops/build.sh

Either embedding the skiasharp build into the package build for jellyfin-server, or packaging it as a separate package and having Jellyfin depend on it would be far more sustainable solutions.

@aicynide
Copy link
Author

Thank u

At this point its not possible for me to port jellyfin to termux although its not hard enough, because of dependencies issue

Current known nuget/dotnet library dependencies issues are with:

  • sqlite
  • SkiaSharp

In future, Anyone interested in porting jellyfin to android, try to get SkiaSharp and SqLitePCL dev/maintainer provide build for android/termux

@aicynide
Copy link
Author

can anyone confirm whether its issue with only libe_sqlite.so and not with SkiaSharp

@aicynide
Copy link
Author

@truboxl we can patch csporj file to

<Content Include="libe_sqlite3.so">
   <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

@aicynide
Copy link
Author

libe_sqlite.so needed to be built in termux_step_pre_configure() or termux_step_make ?

@TomJo2000
Copy link
Member

The author of this PR got himself banned.
We may need to reopen this PR for it to move ahead, keeping it open for now.

@NORALDM
Copy link
Contributor

NORALDM commented Mar 29, 2025

I've managed to compile both libSkiaSharp and libe_sqlite for Termux, though there's a PR over at libSkiaSharp to add linux-bionic support. Even with those dependencies resolved however, it still depends on jellyfin-ffmpeg which can be compiled using mostly the same configure options as the ffmpeg package. I'm curious as to if that should be bundled into a separate package or if it should be added into the build for jellyfin.

@TomJo2000
Copy link
Member

I've managed to compile both libSkiaSharp and libe_sqlite for Termux, though there's a PR over at libSkiaSharp to add linux-bionic support.

Even with those dependencies resolved however, it still depends on jellyfin-ffmpeg which can be compiled using mostly the same configure options as the ffmpeg package. I'm curious as to if that should be bundled into a separate package or if it should be added into the build for jellyfin.

That would seem to be a similar situation to what we have with audacity.
In that case audacity-ffmpeg is being shipped as a subpackage,
and the FFMPEG build is embedded in the audacity build.sh

termux_step_pre_configure() {
local _FFMPEG_PREFIX=${TERMUX_PREFIX}/opt/${TERMUX_PKG_NAME}
LDFLAGS="-Wl,-rpath=${_FFMPEG_PREFIX}/lib ${LDFLAGS}"
local _ARCH
case ${TERMUX_ARCH} in
arm ) _ARCH=armeabi-v7a ;;
i686 ) _ARCH=x86 ;;
* ) _ARCH=$TERMUX_ARCH ;;
esac
mkdir -p _ffmpeg-${_FFMPEG_VERSION}
pushd _ffmpeg-${_FFMPEG_VERSION}
$TERMUX_PKG_SRCDIR/ffmpeg-${_FFMPEG_VERSION}/configure \
--prefix=${_FFMPEG_PREFIX} \
--cc=${CC} \
--pkg-config=false \
--arch=${_ARCH} \
--cross-prefix=llvm- \
--enable-cross-compile \
--target-os=android \
--disable-version3 \
--disable-static \
--enable-shared \
--disable-all \
--disable-autodetect \
--disable-doc \
--enable-avcodec \
--enable-avformat \
--disable-asm
make -j ${TERMUX_PKG_MAKE_PROCESSES}
make install
popd
local lib
for lib in libavcodec libavformat libavutil; do
local pc=${TERMUX_PREFIX}/lib/pkgconfig/${lib}.pc
if [ -e ${pc} ]; then
mv ${pc}{,.tmp}
fi
done
export PKG_CONFIG_PATH=${_FFMPEG_PREFIX}/lib/pkgconfig
CPPFLAGS="-I${_FFMPEG_PREFIX}/include ${CPPFLAGS}"
CPPFLAGS+=" -Dushort=u_short -Dulong=u_long"
CXXFLAGS+=" -std=c++17"
# Adding `image-compiler` we built in host_build step
export PATH="$TERMUX_PKG_HOSTBUILD_DIR/Release/bin:$PATH"
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/audacity"
# For some reason `image-compiler` fails to find it's libraries in our custom prefix, let's help it.
export LD_LIBRARY_PATH="$TERMUX_PKG_HOSTBUILD_DIR/prefix/usr/lib/x86_64-linux-gnu"
}

TERMUX_SUBPKG_DESCRIPTION="Minimal FFmpeg libraries for Audacity"
TERMUX_SUBPKG_INCLUDE="
opt/audacity/lib/
share/doc/audacity-ffmpeg/
"

@NORALDM
Copy link
Contributor

NORALDM commented Mar 30, 2025

Jellyfin seems to be affected by #23076. The problem seems to be that the system provided version of libSystem.Security.Cryptography.Native.OpenSsl.so doesn't have $PREFIX/lib in its rpath, so libcrypto.so.3 and libssl.so.3 aren't found.

@NORALDM
Copy link
Contributor

NORALDM commented Apr 2, 2025

The version of jellyfin that my local build.sh creates works properly on most stuff I've tested, though the --nonetchange option seems to be necessary on most, if not all devices. We could either add a shim script that starts jellyfin with nonetchange by default, or modify https://github.com/jellyfin/jellyfin/blob/master/Jellyfin.Server/StartupOptions.cs by replacing nonetchange with something along the lines of netchange, to enable detection of network changes.

@TomJo2000
Copy link
Member

@TomJo2000 TomJo2000 closed this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Package]: Jellyfin
6 participants