Unable to build UE 4.20 on Linux

This bug report is actually meant for the 4.20 branch but I couldn’t select it in the dropdown list.

Building on Arch Linux with clang 6.0.0 fails almost immediately:

------- Build details --------
Using system toolchain.
Using clang (/usr/bin/clang++) version '6.0.0' (string), 6 (major), 0 (minor), 0 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using ar and ranlib: /usr/bin/ar, /usr/bin/ranlib
Using fast way to relink  circularly dependent libraries (no FixDeps).
Compiler is set up to generate position independent executables by default, but we're suppressing it.
------------------------------
Performing 20 actions (4 in parallel)
[3/20] Compile Module.Core.2_of_9.cpp
[1/20] Compile Module.Core.4_of_9.cpp
[2/20] Compile Module.Core.3_of_9.cpp
[4/20] Compile Module.Core.1_of_9.cpp
[5/20] Link (ld) libUnrealHeaderTool-BuildSettings.so
clang-6.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
/usr/bin/ld: /home/dominator/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/BuildSettings/Module.BuildSettings.cpp.o: relocation R_X86_64_32 against `.rodata.str4.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)

It looks like the -nopie argument doesn’t take effect so maybe that’s the reason for the build failing?

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks