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

For those who are still looking for a way to run on Linux UE4.27.Work fine after package #83

Open
eusru opened this issue Feb 24, 2022 · 2 comments

Comments

@eusru
Copy link

eusru commented Feb 24, 2022

No description provided.

@eusru eusru changed the title For those who are still looking for a way to run on Linux. For those who are still looking for a way to run on Linux UE4.27.Work fine after package Feb 24, 2022
@eusru
Copy link
Author

eusru commented Feb 24, 2022

What to say at the beginning:
the core issue is the directory is wrong after compile VLC on Linux. Some .so files can not be correctly found and load.
So I just fix this issue to make sure Program can find .so files.
You don't need edit directory to be the same as me,but the core issue is the same.

  1. Follow this guy's methodhttps://github.com/ue4plugins/VlcMedia/issues/17#issuecomment-348637265,but we just only need to do at the third step ,because there are some directory are wrong and some files UE4 program can not find and load them at runtime. After you have done the First three steps,continue to follow my method below .

  2. Edit VlcMedia.Build.cs and Vlc.cpp files
    Vlc.cpp
    Before :
    #if PLATFORM_LINUX const FString LibDir = FPaths::Combine(*VlcDir, TEXT("Linux"),TEXT("x86_64-unknown-linux-gnu"), TEXT("lib"));
    After:
    #if PLATFORM_LINUX const FString LibDir = FPaths::Combine(*VlcDir, TEXT("Linux")/*TEXT("x86_64-unknown-linux-gnu")*/, TEXT("lib"));

    VlcMedia.Build.cs
    Before:
    if (Target.Platform == UnrealTargetPlatform.Linux) { VlcDirectory = Path.Combine(VlcDirectory, Target.Architecture,"lib"); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlc.so")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlc.so.5")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlc.so.5.6.0")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlccore.so")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlccore.so.9")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlccore.so.9.0.0")); }
    After:
    if (Target.Platform == UnrealTargetPlatform.Linux) { VlcDirectory = Path.Combine(VlcDirectory, /*Target.Architecture*/"lib"); System.Console.WriteLine("VLCDirectory ============" + VlcDirectory);//to print lib file directory to make sure is correct RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlc.so")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlc.so.5")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlc.so.5.6.0")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlccore.so")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlccore.so.9")); RuntimeDependencies.Add(Path.Combine(VlcDirectory, "libvlccore.so.9.0.0")); }

3.Go to /yourProjetct/Plugins/VlcMedia/ThirdParty/vlc/Linux/
Create folder named "lib"
Go to /yourProjetct/Plugins/VlcMedia/ThirdParty/vlc/Linux/x86_64-unknown-linux-gnu
find "vlc" folder.Copy it to lib folder which we have just created.
Go to /yourProjetct/Plugins/VlcMedia/ThirdParty/vlc/Linux/x86_64-unknown-linux-gnu
Search these.so files and copy them to lib folder which we have just created.

  •  libvlc.so
    
  •  libvlc.so.5
    
  •  libvlc.so.5.6.0
    
  •  libvlccore.so
    
  •  libvlccore.so.9
    
  •  libvlccore.so.9.0.0
    

    If you don't have this folder and files ,check the first step ,make sure you have correctly link and compile vlc on Linux

4.Compile your Project . No other words,now is working fine at runtime .

@behome
Copy link

behome commented Dec 6, 2022

I try to run the vlc media player on 4.27.2. It complie well, but it shutdown when opening media file source with vlc media player.

Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554 
CommonUnixCrashHandler: Signal=11
[2022.12.06-03.14.28:092][ 97]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000000

[2022.12.06-03.14.28:092][ 97]LogCore: Fatal error!

0x00007fcea02d4c33 libUE4Editor-MediaUtils.so!FMediaPlayerFacade::GetPlayerName() const [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/MediaUtils/Private/MediaPlayerFacade.cpp:358]
0x00007fcd9bf3932c libUE4Editor-MediaPlayerEditor.so!SMediaPlayerEditorInfo::HandleMediaPlayerMediaEvent(EMediaEvent) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Plugins/Media/MediaPlayerEditor/Source/MediaPlayerEditor/Private/Widgets/SMediaPlayerEditorInfo.cpp:130]
0x00007fcd9bfa0b5d libUE4Editor-MediaPlayerEditor.so!TBaseSPMethodDelegateInstance<false, SMediaPlayerEditorInfo, (ESPMode)0, void (EMediaEvent), FDefaultDelegateUserPolicy>::ExecuteIfSafe(EMediaEvent) const [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Core/Public/Delegates/DelegateInstancesImpl.h:307]
0x00007fce907c9bef libUE4Editor-MediaAssets.so!TMulticastDelegate<void (EMediaEvent), FDefaultDelegateUserPolicy>::Broadcast(EMediaEvent) const [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl:955]
0x00007fce907af80c libUE4Editor-MediaAssets.so!UMediaPlayer::HandlePlayerMediaEvent(EMediaEvent) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/MediaAssets/Private/Assets/MediaPlayer.cpp:895]
0x00007fce907d9922 libUE4Editor-MediaAssets.so!TBaseUObjectMethodDelegateInstance<false, UMediaPlayer, void (EMediaEvent), FDefaultDelegateUserPolicy>::ExecuteIfSafe(EMediaEvent) const [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Core/Public/Delegates/DelegateInstancesImpl.h:609]
0x00007fcea02e64ef libUE4Editor-MediaUtils.so!TMulticastDelegate<void (EMediaEvent), FDefaultDelegateUserPolicy>::Broadcast(EMediaEvent) const [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl:955]
0x00007fcea02db433 libUE4Editor-MediaUtils.so!FMediaPlayerFacade::ProcessEvent(EMediaEvent) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/MediaUtils/Private/MediaPlayerFacade.cpp:1787]
0x00007fcea02de94a libUE4Editor-MediaUtils.so!FMediaPlayerFacade::TickFetch(FTimespan, FTimespan) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/MediaUtils/Private/MediaPlayerFacade.cpp:1982]
0x00007fce9851a8c9 libUE4Editor-Media.so!FMediaClock::TickFetch() [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Media/Private/MediaClock.cpp:32]
0x00007fce9851d6c8 libUE4Editor-Media.so!FMediaModule::TickPostEngine() [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Media/Private/MediaModule.cpp:169]
0x00007fce9f266677 libUE4Editor-UnrealEd.so!UEditorEngine::Tick(float, bool) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:1778]
0x00007fce9fd766d2 libUE4Editor-UnrealEd.so!UUnrealEdEngine::Tick(float, bool) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/UnrealEdEngine.cpp:423]
0x0000000000237fd0 UE4Editor!FEngineLoop::Tick() [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:4915]
0x0000000000246efa UE4Editor!GuardedMain(char16_t const*) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp:180]
0x00007fcea780b056 libUE4Editor-UnixCommonStartup.so!CommonUnixMain(int, char**, int (*)(char16_t const*), void (*)()) [/home/linxiong/Drive5T/workspace/UnrealEngine/Engine/Source/Runtime/Unix/UnixCommonStartup/Private/UnixCommonStartup.cpp:264]
0x00007fce9d65ac87 libc.so.6!__libc_start_main(+0xe6)
0x00000000002304d9 UE4Editor!_start()

[2022.12.06-03.14.28:140][ 97]LogExit: Executing StaticShutdownAfterError

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

No branches or pull requests

2 participants