undefined reference to gettid, reallocarray, fcntl64, getrandom

I updated unreal from git to the latest and since the clang toochain was upgraded, libudev no longer links properly.
I tried to fix it same was last time (with v16_clang-9.0.1-centos7) buy adding a symlink to the system in .../Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/ but now I get linker errors.

codyw@cody-gpu1:/link/UnrealEngine$ make
bash "/link/UnrealEngine/Engine/Build/BatchFiles/Linux/" CrashReportClient Linux Shipping
Fixing inconsistent case in filenames.
Setting up Mono
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe CrashReportClient Linux Shipping
Using 'git status' to determine working set for adaptive non-unity build (/link/UnrealEngine).
Creating makefile for CrashReportClient (Build.version is newer)
Performing 2 actions (12 in parallel)
[1/2] Link (lld) UnrealHeaderTool
ld.lld: error: /link/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-    centos7/x86_64-unknown-linux-gnu/usr/lib64/ undefined reference to gettid
ld.lld: error: /link/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/ undefined reference to reallocarray
ld.lld: error: /link/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/ undefined reference to fcntl64
ld.lld: error: /link/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/ undefined reference to getrandom
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:327: CrashReportClient-Linux-Shipping] Error 6`

nm shows the symbols are in

codyw@cody-gpu1:~$ nm -D 
"/link/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/" |grep "gettid\|reallocarray\|fcntl64\|getrandom"
             U fcntl64
             U getrandom
             U gettid
             U reallocarray

System Info:

KDE neon User Edition 5.20
Linux 5.4.0-58-generic x86_64

System: KDE neon User Edition 5.20
Desktop: KDE
Shell: /usr/share/xsessions/plasma
Win Man: KWin
Server: x11
plasmashell 5.20.4
kwin 5.20.4
Qt: 5.15.2
KDE Framework: 5.77.0

The problem comes from a newer version of

/link/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/usr/lib64/ needs to be at least <1.6.17

I downloaded 1.6.4 from the xenial libudev1 package (libudev1_229-4ubuntu21.27_amd64.deb) from Ubuntu – Error and extracted the file and Unreal compiled.

By linking libudev that way you likely created an issue for your game’s binaries, as you now depend on that library which you don’t redistribute. The proper way to handle such a dependency is to add the libudev files to Engine/Source/ThirdParty and make sure the packaging code will pick it up and include in the build (similarly to how e.g. OpenAL is done). First thing you need to do though is to make sure the license is compatible for bundling it with your game.

When you just add libudev to the toolchain, you will be able to link the binary on your system, but it will depend on library which won’t be included in the build (unless you again manually put it each time you produce a build).

Very true about licensing. I would compile on Windows for distribution but right now I’m just trying to get the editor to compile.