[Linux][Bug] UE4Editor linux fails to load libGL

The editor on linux fails with the error in the following link.
OpenSuse 13.2 AMD64

How I ran the editor, not the LD_LIBRARY_PATH is temp fix for modules on OpenSuse

./UE4Editor
./UE4Editor -opengl4
LD_LIBRARY_PATH=“:lib64:/usr/lib64/:.:” ./UE4Editor
LD_LIBRARY_PATH=“:lib64:/usr/lib64/:.:” ./UE4Editor -opengl4
LD_LIBRARY_PATH=“:.:” ./UE4Editor -opengl4
LD_LIBRARY_PATH=“:.:” ./UE4Editor

nVidia drivers 346.47

Forgot to mention this is with epic/master branch.

Hey -

Do you receive this error while working in the editor or when trying to compile the editor for use the first time? At what point does the message appear? Do you get the same error if you try compiling the 4.7 branch of the engine?

If you haven’t seen it yet there is a tutorial created by a community member that can help walk through how to setup UE4 on Linux: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums that may help as well.

Cheers

I get this running the editor, I don’t get the same problem with epic/4.7.

Hey -

I’ve logged this bug for further investigation. Since the master branch is constantly being updated you may want to get the latest version and check if you’re still blocked. Keep in mind that the master branch is not as stable of a build since it has not gone through the same testing process as a releases branch. As such it is good for testing upcoming features however we do not encourage development on the master branch.

Cheers

This same error seems to be present in the current 4.8 branch as well;

[2015.05.14-20.55.16:596][  0]LogHAL:Error: LinuxSplash_InitSplashResources() : Splash screen window could not be created! SDL_Error: Failed loading libGL.so.1: dlopen: cannot load any more object with static TLS
Assertion failed: false [File:/home/omar/Modding/UE4/UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/Linux/OpenGLLinux.cpp] [Line: 809] 
Unable to dynamically load libGL: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������n
.
[2015.05.14-20.55.16:646][  0]LogLinux:Error: appError called: Assertion failed: Assertion failed: false [File:/home/omar/Modding/UE4/UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/Linux/OpenGLLinux.cpp] [Line: 809] 
Unable to dynamically load libGL: ??????????????????????????????n
.

Signal 11 caught.

In my case, this is running on Arch Linux. 4.7.x used to boot without problems.

In general whether or not you encounter this error depends on two factors:

  1. how many shared objects that use static TLS are loaded
  2. what is the value DTV_SURPLUS in your glibc.

Ubuntu 14.10 and later set it to 32, while Ubuntu 14.04 and earlier had 14 - both are known to work. Maybe for some reason on Arch more libraries happen to use static TLS (e.g. a difference in mesa/libGL) or DTV_SURPLUS has a lower value (unlikely).

There’s a backlogged bug to get rid of the need to have a static TLS in UE4’s shared objects to reduce the pressure on number of slots, but this is not a priority given that things work on 14.04 and 15.04.

Thanks for the info but unless the number of slots used by UE4 has increased with 4.8, neither should be a problem because, as I mentioned before, 4.7.x works fine on the same system.

Did the amount of slots used by UE4 increase with 4.8?

Callstack for reference:

[Callstack]  02  0x00007f204b912501  ReportCrash(FLinuxCrashContext const&)
[Callstack]  03  0x000000000042e7fb  EngineCrashHandler(FGenericCrashContext const&)
[Callstack]  04  0x00007f204b915d28  PlatformCrashHandler(int, siginfo_t*, void*)
[Callstack]  05  0x00007f204c38c740  /usr/lib/libpthread.so.0(+0x10740) [0x7f204c38c740]
[Callstack]  06  0x00007f204b91fabc  FOutputDeviceLinuxError::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&)
[Callstack]  07  0x00007f204b9cf935  FOutputDevice::Logf(wchar_t const*, ...)
[Callstack]  08  0x00007f204b9b3a40  FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...)
[Callstack]  09  0x00007f2027be24cf  PlatformInitOpenGL()
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  24 (X_ConvertSelection)
  Resource id in failed request:  0x0
  Serial number of failed request:  229
  Current serial number in output stream:  230
[Callstack]  10  0x00007f20463fe78a  PlatformCrea

You can readelf --dynamic *.so | grep STATIC_TLS | wc -l on both 4.7 and 4.8 and compare. I don’t know of any reason to increase, but it might have (e.g. someone added a __thread variable somewhere). However since we are still not seeing that on Ubuntu 14.04 this makes it suspicious.

Both give the value 5 for me so it stayed the same across engine versions so it must be something else.

When checking the logs, they are the same up to the crash.
4.7 continues normally and starts initializing OpenGL and outputting the extensions so nothing special there. It still works fine.

The latest code on the 4.8 branch shows the following instead:
https://gist.github.com/Omar007/fb9fddacc449f9f003d1

Since last time, the error now actually shows text as opposed to ‘?’ and the callstack is now completed properly (previously it would get cut-off (as you can see in my previous post)).
Other than that, nothing seems to have changed and 4.7 works perfectly fine whereas 4.8 still does not.

I’ll keep you posted if I happen to find out anything else.

LinuxNativeDialogs changed in 4.8. Remove all libLND-*.so (in Engine\Binaries\ThirdParty\LinuxNativeDialogs.…) except libLND.so itself and see if it gets you any further.

(I’m not sure if libLND will fail to initialize in that case - if it fails, leave one of libLND-*, e.g. gtk2)

I’m not sure it did. I don’t really see much change, other than that the error changed to an X error and that the callstack is now cut-off again.
https://gist.github.com/Omar007/aa2b48d41163491507f7

Error is the same if I leave one of the libLND-* files.

Hey Omar007-

Does the same error occur for you if you’re running on Ubuntu with the same graphics drivers and desktop environment? If so can you list how you setup the system and where the crash occurred exactly (trying to install the editor, when opening a project, etc.)?

I have a similar error in archlinux and it was fixed by recompiling glibc to support 32 DTV_SURPLUS instead of 14.

I have a gut feeling that the problem is with my NVIDIA optimus card – I use Bumblebee / Primusrun to use the graphics switching capabilities and I suspect it has some sort of overhead for static TLS. When I have time I’ll go back to the 14 slots and enable the card without usage of bumblebee / primusrun and report back.

Also, see Linux Editor error on launch - Platform & Builds - Unreal Engine Forums

It’s still a big issue. The editor crash when I compiled the 4.10 editor under Arch Linux. link text. I have a NVIDIA GTX 275.

Hey Dangerous_I-

Did you use the 4.10 branch or the Release branch when building the engine? At what point did the editor crash (during compile, opening a project, etc.)?