Compiling with Clang 4.0.1 fails on CentOS 7

Hi! I’ve been working on getting UE4 up and running on our CentOS 7 machines. I’m currently evaluating different debuggers.

When I started this process, I was using Clang 3.5, which came with CentOS 7. For the most part, everything built and ran fine (apart from a few tweaks that I’ve submitted as pull requests in GitHub).

I’m now attempting to test the LLDB Debugger extension for VSCode. The debugger fails to fire up lldb. The full output I get is:

--- Checking version ---
lldb version 3.5.0 ( revision )
Warning: The version of your LLDB was detected as 3.5.0, which had never been tested with this extension. Please consider upgrading to least version 3.9.1.
--- Checking Python ---
lldb: unrecognized option '-b'
error: unknown or ambiguous option

The version of lldb I have makes no mention of the “-b” option. So I decided to track down a newer version of llvm.

I found an official RH “extras” repo that has version 4.0.1 of llvm. With this, I don’t get the errors when attempting to launch the debugger (unforunately, the debugger appears to launch and then immediately close, but I’m thinking that’s a question for another post). However, if I attempt to do a full rebuild of the game, I get a pretty generic build error: ERROR: UBT ERROR: Failed to produce item: /home/pbaxter/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-UnrealEd-Linux-Debug.so

Looking further up the line, I believe the problem is either caused by a couple of these lines:

error: __NO_INLINE__ predefined macro was disabled in PCH file but is currently enabled
1 error generated.

Or by several errors in stdexcept.cpp.o along this line:

ThirdParty/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu/libc++.a(stdexcept.cpp.o): In function `std::logic_error::logic_error(char const*)':
F:/build/llvm/projects/libcxx/src/stdexcept.cpp:(.text._ZNSt11logic_errorC2EPKc+0x0): multiple definition of `std::logic_error::logic_error(char const*)'
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libstdc++_nonshared.a(cow-stdexcept.o):(.text._ZNSt11logic_errorC2EPKc+0x0): first defined here

For the first error, I have no idea what the problem might be. For the second error, it looks like maybe it’s attempting to use both the locally installed libstdc++ and the packaged libc++. I was under the impression Unreal was set up to exclude the local libstdc++ in favor of its packaged libc++ implementation.

Anyone run into this before? Any idea what I’m doing wrong?

Thanks!