Skip to content
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

Update nativelibs to latest version #6013

Merged
merged 1 commit into from Oct 4, 2023
Merged

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Oct 3, 2023

No description provided.

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

Looking into the linux failures.

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

I dunno.

After some extremely crude attempts to try and force github runners to output LD_DEBUG output (which I eventually succeeded in doing by creating an entire fresh game project that just shows a video and terminates after 5 seconds - see https://github.com/ppy/osu-framework/compare/master...bdach:osu-framework:war-crime-documentary?expand=1 - apparently you cannot extract LD_DEBUG output out of unit tests), all I have is this log: log.txt

The relevant portion being:

2023-10-03T11:02:10.7416441Z       3273:	find library=libavutil.so [0]; searching
2023-10-03T11:02:10.7417360Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7437130Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7437666Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font FontAwesome-Solid!
2023-10-03T11:02:10.7438999Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavutil.so
2023-10-03T11:02:10.7439460Z [runtime] 2023-10-03 11:02:10 [debug]: Loading Font FontAwesome-Regular...
2023-10-03T11:02:10.7440232Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil.so
2023-10-03T11:02:10.7440734Z       3273:	  trying file=/lib/libavutil.so
2023-10-03T11:02:10.7441198Z       3273:	  trying file=/usr/lib/libavutil.so
2023-10-03T11:02:10.7448664Z       3273:	
2023-10-03T11:02:10.7449139Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font FontAwesome-Regular!
2023-10-03T11:02:10.7450291Z       3273:	find library=libavutil.so.56 [0]; searching
2023-10-03T11:02:10.7450774Z [runtime] 2023-10-03 11:02:10 [debug]: Loading Font FontAwesome-Brands...
2023-10-03T11:02:10.7451999Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7452447Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font FontAwesome-Brands!
2023-10-03T11:02:10.7453779Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7454449Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font Roboto-RegularItalic!
2023-10-03T11:02:10.7456665Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavutil.so.56
2023-10-03T11:02:10.7457140Z [runtime] 2023-10-03 11:02:10 [debug]: Loading Font Roboto-Bold...
2023-10-03T11:02:10.7466043Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font Roboto-Bold!
2023-10-03T11:02:10.7466827Z [runtime] 2023-10-03 11:02:10 [debug]: Loading Font Roboto-BoldItalic...
2023-10-03T11:02:10.7478408Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font Roboto-BoldItalic!
2023-10-03T11:02:10.7479355Z [runtime] 2023-10-03 11:02:10 [debug]: Loading Font RobotoCondensed-Regular...
2023-10-03T11:02:10.7490409Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font RobotoCondensed-Regular!
2023-10-03T11:02:10.7491464Z [runtime] 2023-10-03 11:02:10 [debug]: Loading Font RobotoCondensed-Bold...
2023-10-03T11:02:10.7502949Z [runtime] 2023-10-03 11:02:10 [debug]: Loaded Font RobotoCondensed-Bold!
2023-10-03T11:02:10.7505084Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil.so.56
2023-10-03T11:02:10.7505684Z       3273:	  trying file=/lib/libavutil.so.56
2023-10-03T11:02:10.7506356Z       3273:	  trying file=/usr/lib/libavutil.so.56
2023-10-03T11:02:10.7506771Z       3273:	
2023-10-03T11:02:10.7627487Z       3273:	find library=libavcodec.so [0]; searching
2023-10-03T11:02:10.7627832Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7628570Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7629089Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavcodec.so
2023-10-03T11:02:10.7629802Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavcodec.so
2023-10-03T11:02:10.7630190Z       3273:	  trying file=/lib/libavcodec.so
2023-10-03T11:02:10.7630528Z       3273:	  trying file=/usr/lib/libavcodec.so
2023-10-03T11:02:10.7630768Z       3273:	
2023-10-03T11:02:10.7631084Z       3273:	find library=libavcodec.so.58 [0]; searching
2023-10-03T11:02:10.7631420Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7632044Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7632546Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavcodec.so.58
2023-10-03T11:02:10.7633033Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavcodec.so.58
2023-10-03T11:02:10.7633399Z       3273:	  trying file=/lib/libavcodec.so.58
2023-10-03T11:02:10.7633751Z       3273:	  trying file=/usr/lib/libavcodec.so.58
2023-10-03T11:02:10.7633982Z       3273:	
2023-10-03T11:02:10.7634313Z       3273:	find library=libavformat.so [0]; searching
2023-10-03T11:02:10.7634647Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7635234Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7635742Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavformat.so
2023-10-03T11:02:10.7636214Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavformat.so
2023-10-03T11:02:10.7636716Z       3273:	  trying file=/lib/libavformat.so
2023-10-03T11:02:10.7637230Z       3273:	  trying file=/usr/lib/libavformat.so
2023-10-03T11:02:10.7637650Z       3273:	
2023-10-03T11:02:10.7637985Z       3273:	find library=libavutil.so.56 [0]; searching
2023-10-03T11:02:10.7638312Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7638931Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7639456Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavutil.so.56
2023-10-03T11:02:10.7640306Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil.so.56
2023-10-03T11:02:10.7640705Z       3273:	  trying file=/lib/libavutil.so.56
2023-10-03T11:02:10.7641087Z       3273:	  trying file=/usr/lib/libavutil.so.56
2023-10-03T11:02:10.7641336Z       3273:	
2023-10-03T11:02:10.7641684Z       3273:	find library=libswscale.so [0]; searching
2023-10-03T11:02:10.7642050Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7642928Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7643458Z       3273:	  trying file=/lib/x86_64-linux-gnu/libswscale.so
2023-10-03T11:02:10.7643971Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libswscale.so
2023-10-03T11:02:10.7644508Z       3273:	  trying file=/lib/libswscale.so
2023-10-03T11:02:10.7644851Z       3273:	  trying file=/usr/lib/libswscale.so
2023-10-03T11:02:10.7645106Z       3273:	
2023-10-03T11:02:10.7972090Z       3273:	find library=avutil.so [0]; searching
2023-10-03T11:02:10.7972812Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7973994Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7974831Z       3273:	  trying file=/lib/x86_64-linux-gnu/avutil.so
2023-10-03T11:02:10.7975860Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/avutil.so
2023-10-03T11:02:10.7976236Z       3273:	  trying file=/lib/avutil.so
2023-10-03T11:02:10.7976551Z       3273:	  trying file=/usr/lib/avutil.so
2023-10-03T11:02:10.7976789Z       3273:	
2023-10-03T11:02:10.7977164Z       3273:	find library=libva-drm.so.2 [0]; searching
2023-10-03T11:02:10.7977498Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7978140Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7978627Z       3273:	  trying file=/lib/x86_64-linux-gnu/libva-drm.so.2
2023-10-03T11:02:10.7979570Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libva-drm.so.2
2023-10-03T11:02:10.7980055Z       3273:	  trying file=/lib/libva-drm.so.2
2023-10-03T11:02:10.7980448Z       3273:	  trying file=/usr/lib/libva-drm.so.2
2023-10-03T11:02:10.7980669Z       3273:	
2023-10-03T11:02:10.7980993Z       3273:	find library=libavutil.so [0]; searching
2023-10-03T11:02:10.7981318Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7981901Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7982384Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavutil.so
2023-10-03T11:02:10.7982836Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil.so
2023-10-03T11:02:10.7983165Z       3273:	  trying file=/lib/libavutil.so
2023-10-03T11:02:10.7983469Z       3273:	  trying file=/usr/lib/libavutil.so
2023-10-03T11:02:10.7983701Z       3273:	
2023-10-03T11:02:10.7985778Z       3273:	find library=avutil [0]; searching
2023-10-03T11:02:10.7986108Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7987951Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7988932Z       3273:	  trying file=/lib/x86_64-linux-gnu/avutil
2023-10-03T11:02:10.7989664Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/avutil
2023-10-03T11:02:10.7989986Z       3273:	  trying file=/lib/avutil
2023-10-03T11:02:10.7990305Z       3273:	  trying file=/usr/lib/avutil
2023-10-03T11:02:10.7991353Z       3273:	
2023-10-03T11:02:10.7991879Z       3273:	find library=libavutil [0]; searching
2023-10-03T11:02:10.7992395Z       3273:	 search cache=/etc/ld.so.cache
2023-10-03T11:02:10.7993035Z       3273:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T11:02:10.7993507Z       3273:	  trying file=/lib/x86_64-linux-gnu/libavutil
2023-10-03T11:02:10.7993924Z       3273:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil
2023-10-03T11:02:10.7994255Z       3273:	  trying file=/lib/libavutil
2023-10-03T11:02:10.7994564Z       3273:	  trying file=/usr/lib/libavutil
2023-10-03T11:02:10.7994794Z       3273:	
2023-10-03T11:02:10.8612100Z [runtime] 2023-10-03 11:02:10 [verbose]: VideoDecoder faulted: System.DllNotFoundException: Unable to load shared library 'avutil' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libavutil: cannot open shared object file: No such file or directory
2023-10-03T11:02:10.8614888Z [runtime] 2023-10-03 11:02:10 [verbose]: at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError)
2023-10-03T11:02:10.8616583Z [runtime] 2023-10-03 11:02:10 [verbose]: at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
2023-10-03T11:02:10.8618096Z [runtime] 2023-10-03 11:02:10 [verbose]: at System.Runtime.InteropServices.NativeLibrary.Load(String libraryName, Assembly assembly, Nullable`1 searchPath)
2023-10-03T11:02:10.8620631Z [runtime] 2023-10-03 11:02:10 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.<>c.<CreateFuncs>b__67_0(String name) in /home/runner/work/osu-framework/osu-framework/osu.Framework/Graphics/Video/VideoDecoder.cs:line 832
2023-10-03T11:02:10.8621974Z [runtime] 2023-10-03 11:02:10 [verbose]: at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__6_607(UInt64 size)
2023-10-03T11:02:10.8623008Z [runtime] 2023-10-03 11:02:10 [verbose]: at FFmpeg.AutoGen.ffmpeg.av_malloc(UInt64 size)
2023-10-03T11:02:10.8624334Z [runtime] 2023-10-03 11:02:10 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.prepareDecoding() in /home/runner/work/osu-framework/osu-framework/osu.Framework/Graphics/Video/VideoDecoder.cs:line 338
2023-10-03T11:02:10.8626331Z [runtime] 2023-10-03 11:02:10 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.StartDecoding() in /home/runner/work/osu-framework/osu-framework/osu.Framework/Graphics/Video/VideoDecoder.cs:line 210

tl;dr: Apparently the game is not even trying to load the new binaries. For whatever reason. It's just not seeing them, at all.

I give up for now. @FreezyLemon If you have any brilliant ideas, they'd be appreciated right about now, because otherwise we just revert everything I guess?

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

I guess telling the dynamic linker to forcibly use the new libraries, as in 1be8f82, appears to work (new-log.txt). But it doesn't answer why this used to do the right thing automatically before and now doesn't.

@FreezyLemon
Copy link
Contributor

Not sure how urgent this is, but I'll take a look later today. Might be related to prefix/libdir changes in the build script.

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

It's not very urgent, so it can wait a few hours, but generally things have moved forward considerably what with the merging and deploying, and as such we're in a bit of a limbo. Probably don't want to remain in this half-broken state for too long.

@FreezyLemon
Copy link
Contributor

Since I can't repro this locally at all (not even in a Ubuntu VM), I tried getting some info from CI: Linux has logic to load libraries via dlopen, so I added some logging to it:

diff --git a/osu.Framework/Platform/Linux/Native/Library.cs b/osu.Framework/Platform/Linux/Native/Library.cs
index 169125fd0b..dd9135e2f5 100644
--- a/osu.Framework/Platform/Linux/Native/Library.cs
+++ b/osu.Framework/Platform/Linux/Native/Library.cs
@@ -3,6 +3,8 @@
 
 #nullable disable
 
+using osu.Framework.Logging;
+
 using System;
 using System.Diagnostics;
 using System.IO;
@@ -15,6 +17,9 @@ public static class Library
         [DllImport("libdl.so.2", EntryPoint = "dlopen")]
         private static extern IntPtr dlopen(string library, LoadFlags flags);
 
+        [DllImport("libdl.so.2", EntryPoint = "dlerror")]
+        private static extern IntPtr dlerror();
+
         /// <summary>
         /// Loads a library with flags to use with dlopen. Uses <see cref="LoadFlags"/> for the flags
         ///
@@ -26,11 +31,26 @@ public static void Load(string library, LoadFlags flags)
         {
             string paths = (string)AppContext.GetData("NATIVE_DLL_SEARCH_DIRECTORIES");
             Debug.Assert(paths != null);
+            Logger.Log($"Search paths: {paths}", "linux libs");
 
             foreach (string path in paths.Split(':'))
             {
-                if (dlopen(Path.Combine(path, library), flags) != IntPtr.Zero)
+                Logger.Log("Trying " + Path.Combine(path, library), "linux libs");
+                if (dlopen(Path.Combine(path, library), flags) == IntPtr.Zero)
+                {
+                    string err = string.Empty;
+                    var errPtr = dlerror();
+                    if (errPtr != IntPtr.Zero)
+                    {
+                        err = Marshal.PtrToStringAnsi(errPtr);
+                    }
+                    Logger.Log($"Failed loading {library}: {err}", "linux libs");
+                }
+                else
+                {
+                    Logger.Log($"Successfully loaded {library}", "linux libs");
                     break;
+                }
             }
         }

This is what it logs (for libavutil.so, all ffmpeg libraries show the same pattern):

...
2023-10-03T14:49:33.0215149Z [runtime] 2023-10-03 14:49:22 [verbose]: 🔸 Step #2 load h264.mp4
2023-10-03T14:49:33.0216194Z [linux libs] 2023-10-03 14:49:22 [verbose]: Search paths: /home/runner/work/osu-framework/osu-framework/osu.Framework.Tests/bin/Debug/net6.0/runtimes/linux-x64/native/:/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/:
2023-10-03T14:49:33.0217297Z [linux libs] 2023-10-03 14:49:22 [verbose]: Trying /home/runner/work/osu-framework/osu-framework/osu.Framework.Tests/bin/Debug/net6.0/runtimes/linux-x64/native/libavutil.so
2023-10-03T14:49:33.0218082Z [linux libs] 2023-10-03 14:49:22 [verbose]: Failed loading libavutil.so:
2023-10-03T14:49:33.0219289Z [linux libs] 2023-10-03 14:49:22 [verbose]: Trying /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libavutil.so
2023-10-03T14:49:33.0220329Z [linux libs] 2023-10-03 14:49:22 [verbose]: Failed loading libavutil.so: /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libavutil.so: cannot open shared object file: No such file or directory
2023-10-03T14:49:33.0221077Z [linux libs] 2023-10-03 14:49:22 [verbose]: Trying libavutil.so
2023-10-03T14:49:33.0221892Z [linux libs] 2023-10-03 14:49:22 [verbose]: Failed loading libavutil.so: libavutil.so: cannot open shared object file: No such file or directory

The output you get from LD_DEBUG is most likely related to that last attempt at loading the library, which shouldn't happen in the first place.. It should be able to dlopen the first path and not try the others at all.

I sadly can't get any information on the error since dlerror returns a null pointer (which really shouldn't happen). I'll try again and see if I can get more info somehow.

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

I set LD_DEBUG=all for a sec - just to see what happens, I guess - and I'm even more perplexed:

2023-10-03T17:07:59.8289554Z       3243:	file=/home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/avutil.so [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8289669Z       3243:	
2023-10-03T17:07:59.8290295Z       3243:	file=/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/avutil.so [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8290399Z       3243:	
2023-10-03T17:07:59.8290863Z       3243:	file=avutil.so [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8291073Z       3243:	find library=avutil.so [0]; searching
2023-10-03T17:07:59.8291271Z       3243:	 search cache=/etc/ld.so.cache
2023-10-03T17:07:59.8291786Z       3243:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T17:07:59.8292097Z       3243:	  trying file=/lib/x86_64-linux-gnu/avutil.so
2023-10-03T17:07:59.8292423Z       3243:	  trying file=/usr/lib/x86_64-linux-gnu/avutil.so
2023-10-03T17:07:59.8292615Z       3243:	  trying file=/lib/avutil.so
2023-10-03T17:07:59.8292813Z       3243:	  trying file=/usr/lib/avutil.so
2023-10-03T17:07:59.8292917Z       3243:	
2023-10-03T17:07:59.8293009Z       3243:	
2023-10-03T17:07:59.8293972Z       3243:	file=/home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/libavutil.so [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8294737Z       3243:	file=/home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/libavutil.so [0];  generating link map
2023-10-03T17:07:59.8295070Z       3243:	  dynamic: 0x00007fa8e0c96cf0  base: 0x00007fa8e0c00000   size: 0x00000000002a6620
2023-10-03T17:07:59.8295398Z       3243:	    entry: 0x00007fa8e0c0f6b0  phdr: 0x00007fa8e0c00040  phnum:                  9
2023-10-03T17:07:59.8295500Z       3243:	
2023-10-03T17:07:59.8295656Z       3243:	
2023-10-03T17:07:59.8296385Z       3243:	file=libva-drm.so.2 [0];  needed by /home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/libavutil.so [0]
2023-10-03T17:07:59.8296691Z       3243:	find library=libva-drm.so.2 [0]; searching
2023-10-03T17:07:59.8296873Z       3243:	 search cache=/etc/ld.so.cache
2023-10-03T17:07:59.8297364Z       3243:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T17:07:59.8297693Z       3243:	  trying file=/lib/x86_64-linux-gnu/libva-drm.so.2
2023-10-03T17:07:59.8298030Z       3243:	  trying file=/usr/lib/x86_64-linux-gnu/libva-drm.so.2
2023-10-03T17:07:59.8298290Z       3243:	  trying file=/lib/libva-drm.so.2
2023-10-03T17:07:59.8298561Z       3243:	  trying file=/usr/lib/libva-drm.so.2
2023-10-03T17:07:59.8298666Z       3243:	
2023-10-03T17:07:59.8298766Z       3243:	
2023-10-03T17:07:59.8299439Z       3243:	file=/home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/libavutil.so [0];  destroying link map
2023-10-03T17:07:59.8299605Z       3243:	
2023-10-03T17:07:59.8300241Z       3243:	file=/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libavutil.so [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8300344Z       3243:	
2023-10-03T17:07:59.8300820Z       3243:	file=libavutil.so [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8301061Z       3243:	find library=libavutil.so [0]; searching
2023-10-03T17:07:59.8301253Z       3243:	 search cache=/etc/ld.so.cache
2023-10-03T17:07:59.8301746Z       3243:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T17:07:59.8302062Z       3243:	  trying file=/lib/x86_64-linux-gnu/libavutil.so
2023-10-03T17:07:59.8302382Z       3243:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil.so
2023-10-03T17:07:59.8302582Z       3243:	  trying file=/lib/libavutil.so
2023-10-03T17:07:59.8302842Z       3243:	  trying file=/usr/lib/libavutil.so
2023-10-03T17:07:59.8302955Z       3243:	
2023-10-03T17:07:59.8303056Z       3243:	
2023-10-03T17:07:59.8303998Z       3243:	file=/home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/avutil [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8304106Z       3243:	
2023-10-03T17:07:59.8304722Z       3243:	file=/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/avutil [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8304811Z       3243:	
2023-10-03T17:07:59.8305274Z       3243:	file=avutil [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8305484Z       3243:	find library=avutil [0]; searching
2023-10-03T17:07:59.8305684Z       3243:	 search cache=/etc/ld.so.cache
2023-10-03T17:07:59.8306181Z       3243:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T17:07:59.8306470Z       3243:	  trying file=/lib/x86_64-linux-gnu/avutil
2023-10-03T17:07:59.8306775Z       3243:	  trying file=/usr/lib/x86_64-linux-gnu/avutil
2023-10-03T17:07:59.8306953Z       3243:	  trying file=/lib/avutil
2023-10-03T17:07:59.8307123Z       3243:	  trying file=/usr/lib/avutil
2023-10-03T17:07:59.8307289Z       3243:	
2023-10-03T17:07:59.8307391Z       3243:	
2023-10-03T17:07:59.8308346Z       3243:	file=/home/runner/work/osu-framework/osu-framework/VideoCrash/bin/Debug/net6.0/runtimes/linux-x64/native/libavutil [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8308451Z       3243:	
2023-10-03T17:07:59.8309122Z       3243:	file=/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libavutil [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8309234Z       3243:	
2023-10-03T17:07:59.8309701Z       3243:	file=libavutil [0];  dynamically loaded by /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.22/libcoreclr.so [0]
2023-10-03T17:07:59.8309920Z       3243:	find library=libavutil [0]; searching
2023-10-03T17:07:59.8310101Z       3243:	 search cache=/etc/ld.so.cache
2023-10-03T17:07:59.8310607Z       3243:	 search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib		(system search path)
2023-10-03T17:07:59.8310909Z       3243:	  trying file=/lib/x86_64-linux-gnu/libavutil
2023-10-03T17:07:59.8311225Z       3243:	  trying file=/usr/lib/x86_64-linux-gnu/libavutil
2023-10-03T17:07:59.8311409Z       3243:	  trying file=/lib/libavutil
2023-10-03T17:07:59.8311606Z       3243:	  trying file=/usr/lib/libavutil

What is it even doing here?

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

You know sometimes you just go down the depths of madness and decide to yourself "yes, this problem is so cursed, that it's time to write a C program". And you do, and get this back:

2023-10-03T17:46:43.5674857Z ##[group]Run gcc main.c && LD_DEBUG=libs ./a.out
2023-10-03T17:46:43.5675172Z �[36;1mgcc main.c && LD_DEBUG=libs ./a.out�[0m
2023-10-03T17:46:43.5731918Z shell: /usr/bin/bash -e {0}
2023-10-03T17:46:43.5732322Z env:
2023-10-03T17:46:43.5732538Z   OSU_EXECUTION_MODE: SingleThread
2023-10-03T17:46:43.5732787Z   OSU_TESTS_LOCAL_HTTPBIN: 1
2023-10-03T17:46:43.5733020Z   DOTNET_ROOT: /usr/share/dotnet
2023-10-03T17:46:43.5733238Z ##[endgroup]
2023-10-03T17:46:43.6692416Z       3335:	find library=libc.so.6 [0]; searching
2023-10-03T17:46:43.6698759Z       3335:	 search cache=/etc/ld.so.cache
2023-10-03T17:46:43.6700615Z       3335:	  trying file=/lib/x86_64-linux-gnu/libc.so.6
2023-10-03T17:46:43.6701887Z       3335:	
2023-10-03T17:46:43.6705328Z       3335:	
2023-10-03T17:46:43.6705882Z       3335:	calling init: /lib64/ld-linux-x86-64.so.2
2023-10-03T17:46:43.6706237Z       3335:	
2023-10-03T17:46:43.6707361Z       3335:	
2023-10-03T17:46:43.6707910Z       3335:	calling init: /lib/x86_64-linux-gnu/libc.so.6
2023-10-03T17:46:43.6708234Z       3335:	
2023-10-03T17:46:43.6709467Z       3335:	
2023-10-03T17:46:43.6709829Z       3335:	initialize program: ./a.out
2023-10-03T17:46:43.6710142Z       3335:	
2023-10-03T17:46:43.6711236Z       3335:	
2023-10-03T17:46:43.6711600Z       3335:	transferring control: ./a.out
2023-10-03T17:46:43.6711908Z       3335:	
2023-10-03T17:46:43.6714194Z       3335:	find library=libva-drm.so.2 [0]; searching
2023-10-03T17:46:43.6715444Z       3335:	 search cache=/etc/ld.so.cache
2023-10-03T17:46:43.6727887Z       3335:	 search path=/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4:/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3:/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2:/lib/x86_64-linux-gnu/tls/haswell/avx512_1/x86_64:/lib/x86_64-linux-gnu/tls/haswell/avx512_1:/lib/x86_64-linux-gnu/tls/haswell/x86_64:/lib/x86_64-linux-gnu/tls/haswell:/lib/x86_64-linux-gnu/tls/avx512_1/x86_64:/lib/x86_64-linux-gnu/tls/avx512_1:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/haswell/avx512_1/x86_64:/lib/x86_64-linux-gnu/haswell/avx512_1:/lib/x86_64-linux-gnu/haswell/x86_64:/lib/x86_64-linux-gnu/haswell:/lib/x86_64-linux-gnu/avx512_1/x86_64:/lib/x86_64-linux-gnu/avx512_1:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4:/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3:/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2:/usr/lib/x86_64-linux-gnu/tls/haswell/avx512_1/x86_64:/usr/lib/x86_64-linux-gnu/tls/haswell/avx512_1:/usr/lib/x86_64-linux-gnu/tls/haswell/x86_64:/usr/lib/x86_64-linux-gnu/tls/haswell:/usr/lib/x86_64-linux-gnu/tls/avx512_1/x86_64:/usr/lib/x86_64-linux-gnu/tls/avx512_1:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/haswell/avx512_1/x86_64:/usr/lib/x86_64-linux-gnu/haswell/avx512_1:/usr/lib/x86_64-linux-gnu/haswell/x86_64:/usr/lib/x86_64-linux-gnu/haswell:/usr/lib/x86_64-linux-gnu/avx512_1/x86_64:/usr/lib/x86_64-linux-gnu/avx512_1:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/glibc-hwcaps/x86-64-v4:/lib/glibc-hwcaps/x86-64-v3:/lib/glibc-hwcaps/x86-64-v2:/lib/tls/haswell/avx512_1/x86_64:/lib/tls/haswell/avx512_1:/lib/tls/haswell/x86_64:/lib/tls/haswell:/lib/tls/avx512_1/x86_64:/lib/tls/avx512_1:/lib/tls/x86_64:/lib/tls:/lib/haswell/avx512_1/x86_64:/lib/haswell/avx512_1:/lib/haswell/x86_64:/lib/haswell:/lib/avx512_1/x86_64:/lib/avx512_1:/lib/x86_64:/lib:/usr/lib/glibc-hwcaps/x86-64-v4:/usr/lib/glibc-hwcaps/x86-64-v3:/usr/lib/glibc-hwcaps/x86-64-v2:/usr/lib/tls/haswell/avx512_1/x86_64:/usr/lib/tls/haswell/avx512_1:/usr/lib/tls/haswell/x86_64:/usr/lib/tls/haswell:/usr/lib/tls/avx512_1/x86_64:/usr/lib/tls/avx512_1:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/haswell/avx512_1/x86_64:/usr/lib/haswell/avx512_1:/usr/lib/haswell/x86_64:/usr/lib/haswell:/usr/lib/avx512_1/x86_64:/usr/lib/avx512_1:/usr/lib/x86_64:/usr/lib		(system search path)
2023-10-03T17:46:43.6731372Z       3335:	  trying file=/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4/libva-drm.so.2
2023-10-03T17:46:43.6733125Z       3335:	  trying file=/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3/libva-drm.so.2
2023-10-03T17:46:43.6735146Z       3335:	  trying file=/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/libva-drm.so.2
2023-10-03T17:46:43.6737168Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6739000Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6740819Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6742668Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/haswell/libva-drm.so.2
2023-10-03T17:46:43.6744625Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6746454Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6748225Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6749960Z       3335:	  trying file=/lib/x86_64-linux-gnu/tls/libva-drm.so.2
2023-10-03T17:46:43.6751772Z       3335:	  trying file=/lib/x86_64-linux-gnu/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6753767Z       3335:	  trying file=/lib/x86_64-linux-gnu/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6768226Z       3335:	  trying file=/lib/x86_64-linux-gnu/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6769333Z       3335:	  trying file=/lib/x86_64-linux-gnu/haswell/libva-drm.so.2
2023-10-03T17:46:43.6770397Z       3335:	  trying file=/lib/x86_64-linux-gnu/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6771444Z       3335:	  trying file=/lib/x86_64-linux-gnu/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6772495Z       3335:	  trying file=/lib/x86_64-linux-gnu/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6773501Z       3335:	  trying file=/lib/x86_64-linux-gnu/libva-drm.so.2
2023-10-03T17:46:43.6774724Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4/libva-drm.so.2
2023-10-03T17:46:43.6775859Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3/libva-drm.so.2
2023-10-03T17:46:43.6776966Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/libva-drm.so.2
2023-10-03T17:46:43.6778106Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6779219Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6780297Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6781363Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/haswell/libva-drm.so.2
2023-10-03T17:46:43.6782454Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6783524Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6784860Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6786484Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/tls/libva-drm.so.2
2023-10-03T17:46:43.6787177Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6789527Z dlopen failed! libva-drm.so.2: cannot open shared object file: No such file or directory
2023-10-03T17:46:43.6855863Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6857392Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6858822Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/haswell/libva-drm.so.2
2023-10-03T17:46:43.6860255Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6861657Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6863059Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6864802Z       3335:	  trying file=/usr/lib/x86_64-linux-gnu/libva-drm.so.2
2023-10-03T17:46:43.6866256Z       3335:	  trying file=/lib/glibc-hwcaps/x86-64-v4/libva-drm.so.2
2023-10-03T17:46:43.6867642Z       3335:	  trying file=/lib/glibc-hwcaps/x86-64-v3/libva-drm.so.2
2023-10-03T17:46:43.6869156Z       3335:	  trying file=/lib/glibc-hwcaps/x86-64-v2/libva-drm.so.2
2023-10-03T17:46:43.6870532Z       3335:	  trying file=/lib/tls/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6871893Z       3335:	  trying file=/lib/tls/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6873236Z       3335:	  trying file=/lib/tls/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6874568Z       3335:	  trying file=/lib/tls/haswell/libva-drm.so.2
2023-10-03T17:46:43.6875918Z       3335:	  trying file=/lib/tls/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6877251Z       3335:	  trying file=/lib/tls/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6878565Z       3335:	  trying file=/lib/tls/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6879863Z       3335:	  trying file=/lib/tls/libva-drm.so.2
2023-10-03T17:46:43.6881221Z       3335:	  trying file=/lib/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6882566Z       3335:	  trying file=/lib/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6883908Z       3335:	  trying file=/lib/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6885211Z       3335:	  trying file=/lib/haswell/libva-drm.so.2
2023-10-03T17:46:43.6886540Z       3335:	  trying file=/lib/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6887885Z       3335:	  trying file=/lib/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6889198Z       3335:	  trying file=/lib/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6890486Z       3335:	  trying file=/lib/libva-drm.so.2
2023-10-03T17:46:43.6891876Z       3335:	  trying file=/usr/lib/glibc-hwcaps/x86-64-v4/libva-drm.so.2
2023-10-03T17:46:43.6893273Z       3335:	  trying file=/usr/lib/glibc-hwcaps/x86-64-v3/libva-drm.so.2
2023-10-03T17:46:43.6894679Z       3335:	  trying file=/usr/lib/glibc-hwcaps/x86-64-v2/libva-drm.so.2
2023-10-03T17:46:43.6896471Z       3335:	  trying file=/usr/lib/tls/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6898227Z       3335:	  trying file=/usr/lib/tls/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6899950Z       3335:	  trying file=/usr/lib/tls/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6901638Z       3335:	  trying file=/usr/lib/tls/haswell/libva-drm.so.2
2023-10-03T17:46:43.6903343Z       3335:	  trying file=/usr/lib/tls/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6905275Z       3335:	  trying file=/usr/lib/tls/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6906947Z       3335:	  trying file=/usr/lib/tls/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6908597Z       3335:	  trying file=/usr/lib/tls/libva-drm.so.2
2023-10-03T17:46:43.6910323Z       3335:	  trying file=/usr/lib/haswell/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6912055Z       3335:	  trying file=/usr/lib/haswell/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6913744Z       3335:	  trying file=/usr/lib/haswell/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6915414Z       3335:	  trying file=/usr/lib/haswell/libva-drm.so.2
2023-10-03T17:46:43.6917095Z       3335:	  trying file=/usr/lib/avx512_1/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6918778Z       3335:	  trying file=/usr/lib/avx512_1/libva-drm.so.2
2023-10-03T17:46:43.6920424Z       3335:	  trying file=/usr/lib/x86_64/libva-drm.so.2
2023-10-03T17:46:43.6922062Z       3335:	  trying file=/usr/lib/libva-drm.so.2
2023-10-03T17:46:43.6923318Z       3335:	
2023-10-03T17:46:43.6923673Z       3335:	
2023-10-03T17:46:43.6924159Z       3335:	calling fini: ./a.out [0]
2023-10-03T17:46:43.6924695Z       3335:	
2023-10-03T17:46:43.6936354Z ##[error]Process completed with exit code 1.

Which isn't still a solution as much as a vague hint at a direction of one, but at least it's progress?

@FreezyLemon does this tell you anything at all?

@FreezyLemon
Copy link
Contributor

Found the problem. Enabling VAAPI/VDPAU for Linux has made libva and libvdpau transitive dependencies of libavutil etc. I didn't expect dlopen to fail based on this, and it never came up during testing (my desktop distros and the ubuntu VM had the libs bundled).

So, assuming the framework does not want to impose external dependencies, these need to be included for linux targets. I also assume these should be included in the build scripts, which means this is not a quick fix...

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

So, assuming the framework does not want to impose external dependencies

Given we ship half the world already outside of glibc to have functional appimages, we most definitely do not.

However,

Enabling VAAPI/VDPAU for Linux has made libva and libvdpau transitive dependencies of libavutil etc.

Does that mean they were... disabled until now? Maybe we can just disable them again for the time being as a stopgap?

@FreezyLemon
Copy link
Contributor

FreezyLemon commented Oct 3, 2023

However,

Enabling VAAPI/VDPAU for Linux has made libva and libvdpau transitive dependencies of libavutil etc.

Does that mean they were... disabled until now? Maybe we can just disable them again for the time being as a stopgap?

I'm almost 100% sure that they are disabled on master, yes. I don't have a simple way to confirm, but some things point towards it. FFmpeg normally auto-detects the external libraries installed on the build host, and adds those to the build config (this is not the case in the updated build scripts, where it uses a static list of features). On my desktop, this includes VAAPI/VDPAU. But since the GitHub Actions runner image doesn't seem to include these, it probably wasn't enabled when they were built. I also cannot get HW decoding to work on master whatsoever, there's no mention in the runtime logs (even though there should be, even when only attempting to setup HW decoding).

As an aside & confirmation for my theory, sudo apt install libva2 libvdpau1 in the CI script fixes the test failure.

@bdach
Copy link
Collaborator

bdach commented Oct 3, 2023

Hmm. I think we should either disable video hardware accel on linux again for now (safe option) or probably work around it on CI for the time being and see what happens when we roll that out to users. @peppy @smoogipoo any opinions on how you'd wanna see this played?

@FreezyLemon
Copy link
Contributor

FreezyLemon commented Oct 4, 2023

I spent some more time on this and have a branch that includes libva and libvdpau in the build scripts. Validating and testing this will take a bit of time though.

If you just want to get this done now, you can disable & remove the Linux hwaccel libraries like this:

diff --git a/osu.Framework.NativeLibs/scripts/ffmpeg/build-linux.sh b/osu.Framework.NativeLibs/scripts/ffmpeg/build-linux.sh
index 66891d58b..763058f01 100755
--- a/osu.Framework.NativeLibs/scripts/ffmpeg/build-linux.sh
+++ b/osu.Framework.NativeLibs/scripts/ffmpeg/build-linux.sh
@@ -7,13 +7,6 @@ popd > /dev/null
 source "$SCRIPT_PATH/common.sh"

 FFMPEG_FLAGS+=(
-    --enable-vaapi
-    --enable-vdpau
-    --enable-hwaccel='h264_vaapi,h264_vdpau'
-    --enable-hwaccel='hevc_vaapi,hevc_vdpau'
-    --enable-hwaccel='vp8_vaapi,vp8_vdpau'
-    --enable-hwaccel='vp9_vaapi,vp9_vdpau'
-
     --target-os=linux
 )

Then rebuild, publish a new NativeLibs version and use that.

@peppy peppy merged commit c59f38c into ppy:master Oct 4, 2023
11 of 13 checks passed
@peppy peppy deleted the update-native-libs branch October 12, 2023 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants