Building on Linux fails

Hey comrades!

Trying to build promoted branch. Getting weird error:

Parsing headers for CrashReportClient
  Running UnrealHeaderTool CrashReportClient "/home/cmr/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -NoEnginePlugins
/home/cmr/UnrealEngine/Engine/Binaries/Linux/UnrealHeaderTool: error while loading shared libraries: libUnrealHeaderTool-Core.so: cannot open shared object file: No such file or directory
Error: UnrealHeaderTool failed for target 'CrashReportClient' (platform: Linux, module info: /home/cmr/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest, exit code: 127 (127)).
make: *** [Makefile:257: CrashReportClient-Linux-Shipping] Error 127

The thing is… there IS a library in ./Engine/Binaries/Linux subdir. And I have no idea why it cannot see the lib.
Fedora 28, Clang 6. And, as far as I remember, there were no problems back on Debian 9.

Hi,

I do expect that you ran all the ./Setup.sh, ./GenerateProjectFiles.sh and such right? You can try adding the directory to LD_PRELOAD variable and try it with that.

On other topic, why promoted? Trying to build the 4.20?

Edit: checked for the clang6 support and apparently it is there for the promoted branch

Yup, expected right. Tried LD_PRELOAD by your suggestion - it started to complain about other libs. But LD_LIBRARY_PATH did the trick, and building passed. But now the engine itself cannot see its libs in the same folder so it needs the same trick. Weird. Looks like I’ve messed something up in my system (when?!). Well, it also crashes because of SteamVR (never happened before), so I’ll need to dig deeper.

As of “why promoted” - looking in advance if the editor is still broken. Maybe I’ll switch to release branch one day. But it feels like a looong time from now. For general use I have a Windows installation anyway.

Thanks for your help!

Edit: oh, I got it…

LogCore: Warning: dlopen failed: libopenvr_api.so: cannot open shared object file: No such file or directory
LogModuleManager: Warning: ModuleManager: Unable to load module '/home/cmr/UnrealEngine/Engine/Plugins/Runtime/Steam/SteamVR/Binaries/Linux/libUE4Editor-SteamVR.so' because the file couldn't be loaded by the OS.

Definitely something with the system. How cute.

I already have 4.19 built for Linux and Windows on my machine. Today, I tried to build 4.20 branch on my Linux first. Unfortunately, I faced the same issue. I’ve never had this issue building UE4 with older releases.

Running UnrealHeaderTool CrashReportClient “/opt/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -NoEnginePlugins
/opt/UnrealEngine/Engine/Binaries/Linux/UnrealHeaderTool: error while loading shared libraries: libUnrealHeaderTool-Core.so: cannot open shared object file: No such file or directory
Error: UnrealHeaderTool failed for target ‘CrashReportClient’ (platform: Linux, module info: /opt/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest, exit code: 127 (127)).
Makefile:257: recipe for target ‘CrashReportClient-Linux-Shipping’ failed
make: *** [CrashReportClient-Linux-Shipping] Error 127

Same error!

For anyone coming across this, I solved it using by setting LD_LIBRARY_PATH to ‘/opt/UnrealEngine/Engine/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Experimental/AlembicImporter/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Editor/CryptoKeys/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Media/ImgMedia/Binaries/Linux’.

I don’t use SteamVR in my project so I don’t have to include it in LD_LIBRARY_PATH. That’s definitely a bug in the engine or something has just changed since I have 4.19 on both my work and home PCs and it works fine but not 4.20.

I am using the Master Branch and I set the variable LD_LIBRARY_PATH to the mention links (with changes to where I install my copy), though I am still getting the same make error.

most of those directories don’t exist in my unrealengine directory structure.
All of these - “/opt/UnrealEngine/Engine/Plugins/Experimental/AlembicImporter/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Editor/CryptoKeys/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Media/ImgMedia/Binaries/Linux”.

Thank you for any ideas you can throw my way. :slight_smile:

Set LD_LIBRARY_PATH to ‘/opt/UnrealEngine/Engine/Binaries/Linux/’ when you are building.

After you built the engine. Those directories will appear. Then you can populate LD_LIBRARY_PATH with those directories. Note that, the LD_LIBRARY_PATH I posted above was for my own project. I disabled many plugins in my .uproject files. So, you’ll probably need more directories get added to your LD_LIBRARY_PATH when running the engine.

I build Release, Debug, and DebugGame successfully from 4.20 branch like this:

$ LD_LIBRARY_PATH="/opt/UnrealEngine/Engine/Binaries/Linux/" make
$ LD_LIBRARY_PATH="/opt/UnrealEngine/Engine/Binaries/Linux/" make UE4Editor-Linux-Debug
$ LD_LIBRARY_PATH="/opt/UnrealEngine/Engine/Binaries/Linux/" make UE4Editor-Linux-DebugGame

Then I run my engine like this (for DebugGame variant, drop -debug for Release; for Debug in addition to dropping -debug you have to run UE4Editor-Linux-Debug):

$ cd /opt/UnrealEngine
$ LD_LIBRARY_PATH="/opt/UnrealEngine/Engine/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Experimental/AlembicImporter/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Editor/CryptoKeys/Binaries/Linux/:/opt/UnrealEngine/Engine/Plugins/Media/ImgMedia/Binaries/Linux" ./Engine/Binaries/Linux/UE4Editor "/home/babaei/dev/GodsOfDeceit/GodsOfDeceit.uproject" -opengl4 -debug -nosound

Hope that helps!

Thank you :slight_smile:

This helped.