Announcement

Collapse
No announcement yet.

[Linux] OS specific loading shared library fault

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [Linux] OS specific loading shared library fault

    Howdy! So finally I am able to port the UT code as per UE 4.22 and compile the code on Linux (yay!). Now I am facing a loading fault specific to OS (I am using the Ubuntu 16.04) in the editor
    Code:
    [2019.06.22-05.51.43:702][  0]LogCore: Warning: dlopen failed: /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/libUE4Editor-UnrealTournament.so: undefined symbol: _ZN12AUTCharacter21UTServerMove_ValidateEf19FVector_NetQuantizeS0_hffP19UPrimitiveComponent5FNamehh
    [2019.06.22-05.51.43:703][  0]LogModuleManager: Warning: ModuleManager: Unable to load module '/home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/libUE4Editor-UnrealTournament.so' because the file couldn't be loaded by the OS.
    [2019.06.22-05.51.45:295][  0]LogCore: Warning: dlopen failed: /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/libUE4Editor-UnrealTournament.so: undefined symbol: _ZN12AUTCharacter21UTServerMove_ValidateEf19FVector_NetQuantizeS0_hffP19UPrimitiveComponent5FNamehh
    [2019.06.22-05.51.45:295][  0]LogModuleManager: Warning: ModuleManager: Unable to load module '/home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/libUE4Editor-UnrealTournamentEditor.so' because the file couldn't be loaded by the OS.
    The snap shot is attached (sorry about the image quality).

    Any suggestion along this direction is highly appreciated!
    https://ravimohan.net/
    https://github.com/ravimohan1991

    #2
    UPDATE:
    I surfed the web and one reason I understood was that the dependencies might be unavailable. So I ran ldd command on the shared library with the result
    Code:
    the_cowboy@quark:~/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux$ ldd libUE4Editor-UnrealTournament.so
        linux-vdso.so.1 =>  (0x00007ffc7f3a7000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8107dcd000)
        libUE4Editor-Slate.so => not found
        libUE4Editor-SlateCore.so => not found
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
        libUE4Editor-Engine.so => not found
        libUE4Editor-InputCore.so => not found
        libUE4Editor-AIModule.so => not found
        libUE4Editor-OnlineSubsystem.so => /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/./../../../../UnrealEngine/Engine/Plugins/Online/OnlineSubsystem/Binaries/Linux/libUE4Editor-OnlineSubsystem.so (0x00007f8107aaf000)
        libUE4Editor-OnlineSubsystemUtils.so => /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/./../../../../UnrealEngine/Engine/Plugins/Online/OnlineSubsystemUtils/Binaries/Linux/libUE4Editor-OnlineSubsystemUtils.so (0x00007f8107873000)
        libUE4Editor-RenderCore.so => not found
        libUE4Editor-Navmesh.so => not found
        libUE4Editor-WebBrowser.so => not found
        libUE4Editor-Json.so => not found
        libUE4Editor-JsonUtilities.so => not found
        libUE4Editor-HTTP.so => not found
        libUE4Editor-UMG.so => not found
        libUE4Editor-Party.so => /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/./../../../../UnrealEngine/Engine/Plugins/Online/OnlineFramework/Binaries/Linux/libUE4Editor-Party.so (0x00007f810b575000)
        libUE4Editor-Qos.so => /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/./../../../../UnrealEngine/Engine/Plugins/Online/OnlineFramework/Binaries/Linux/libUE4Editor-Qos.so (0x00007f81077e7000)
        libUE4Editor-BlueprintContext.so => /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/./libUE4Editor-BlueprintContext.so (0x00007f8107791000)
        libUE4Editor-EngineSettings.so => not found
        libUE4Editor-PakFile.so => not found
        libUE4Editor-AppFramework.so => not found
        libUE4Editor-RHI.so => not found
        libUE4Editor-MoviePlayer.so => not found
        libUE4Editor-GithubStubs.so => /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Binaries/Linux/./libUE4Editor-GithubStubs.so (0x00007f8107771000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8107569000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8107260000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8106e96000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8106c80000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f810b540000)
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
        libUE4Editor-Sockets.so => not found
        libUE4Editor-JsonUtilities.so => not found
        libUE4Editor-Json.so => not found
        libUE4Editor-ImageCore.so => not found
        libUE4Editor-Sockets.so => not found
        libUE4Editor-Voice.so => not found
        libUE4Editor-PacketHandler.so => not found
        libUE4Editor-AudioMixer.so => not found
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
        libUE4Editor-Engine.so => not found
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
        libUE4Editor-Engine.so => not found
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
        libUE4Editor-Engine.so => not found
        libUE4Editor-Json.so => not found
        libUE4Editor-Icmp.so => not found
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
        libUE4Editor-Engine.so => not found
        libUE4Editor-UMG.so => not found
        libUE4Editor-Core.so => not found
        libUE4Editor-CoreUObject.so => not found
    The unavailability of the dependencies is apparent. So I tried
    Code:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/the_cowboy/unrealworks/UnrealEngine/Engine/Binaries/Linux/
    but still getting the same error despite the fact that now it recognizes all the dependencies!
    Last edited by The-Cowboy; 06-22-2019, 12:35 PM.
    https://ravimohan.net/
    https://github.com/ravimohan1991

    Comment


      #3
      Ok for the creatures watching this thread, I made some progress. The idea is to demangle the symbol which for Linux goes like this
      Code:
       c++filt _ZN12AUTCharacter21UTServerMove_ValidateEf19FVector_NetQuantizeS0_hffP19UPrimitiveComponent5FNamehh
      generating the result
      Code:
      AUTCharacter::UTServerMove_Validate(float, FVector_NetQuantize, FVector_NetQuantize, unsigned char, float, float, UPrimitiveComponent*, FName, unsigned char, unsigned char)
      Now this routine is nowhere declared in the UTCharacter class. One would guess routine declaration should resolve the issue. The code is compiling as I write here. Will report if this works!
      Last edited by The-Cowboy; 06-24-2019, 02:59 AM.
      https://ravimohan.net/
      https://github.com/ravimohan1991

      Comment


        #4
        More updates on the topic. I am getting the following compile error
        Code:
        /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Source/UnrealTournament/Public/UTCharacter.h:285:10: error: class member cannot be redeclared
        
        bool UTServerMove_Validate(float TimeStamp, FVector_NetQuantize InAccel, FVector_NetQuantize ClientLoc, unsigned char something1, float ViewYaw, float ViewPitch, UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, unsigned char something2, unsigned char something3);
        
        ^
        
        /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Source/UnrealTournament/Public/UTCharacter.h:272:2: note: previous declaration is here
        
        GENERATED_UCLASS_BODY()
        
        ^
        
        /home/the_cowboy/unrealworks/UnrealEngine/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h:592:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
        
        #define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
        
        ^
        
        /home/the_cowboy/unrealworks/UnrealEngine/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h:588:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
        
        #define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY);
        
        ^
        
        /home/the_cowboy/unrealworks/UnrealEngine/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h:584:37: note: expanded from macro 'BODY_MACRO_COMBINE'
        
        #define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)
        
        ^
        
        note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
        
        <scratch space>:28:1: note: expanded from here
        
        UnrealTournament_Source_UnrealTournament_Public_UTCharacter_h_272_GENERATED_BODY_LEGACY
        
        ^
        
        /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Intermediate/Build/Linux/B4D820EA/UE4Editor/Inc/UnrealTournament/UTCharacter.generated.h:3586:2: note: expanded from macro 'UnrealTournament_Source_UnrealTournament_Public_UTCharacter_h_272_GENERATED_BODY_LEGACY'
        
        UnrealTournament_Source_UnrealTournament_Public_UTCharacter_h_272_RPC_WRAPPERS \
        
        ^
        
        /home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/Intermediate/Build/Linux/B4D820EA/UE4Editor/Inc/UnrealTournament/UTCharacter.generated.h:161:15: note: expanded from macro 'UnrealTournament_Source_UnrealTournament_Public_UTCharacter_h_272_RPC_WRAPPERS'
        
        virtual bool UTServerMove_Validate(float , FVector_NetQuantize , FVector_NetQuantize , uint8 , float , float , UPrimitiveComponent* , FName , uint8 , uint8 ); \
        when I declare the method definition in the UTCharacter.h file. Note that the "collision" is there even with different argument list and somehow GENERATED_UCLASS_BODY() is involved.

        In other words, how does

        Code:
        virtual bool UTServerMove_Validate(float , FVector_NetQuantize , FVector_NetQuantize , uint8 , float , float , UPrimitiveComponent* , FName , uint8 , uint8 );
        gets written (with different signature) in the .generated.h file is beyond me.
        Last edited by The-Cowboy; 06-24-2019, 10:12 PM.
        https://ravimohan.net/
        https://github.com/ravimohan1991

        Comment


          #5
          Yeehaw, by commenting out unwanted declarations in the code, my OS was able to load the shared object binaries and now UT loads up in the Editor!
          https://ravimohan.net/
          https://github.com/ravimohan1991

          Comment

          Working...
          X