# CrashReportClient compile error

**URL:** <https://forums.unrealengine.com/t/crashreportclient-compile-error/416378>\
**Category:** Platform & Builds\
**Tags:** error, Linux, unreal-engine, link, compile, question\
**Created:** [February 4, 2018, 11:46am UTC](https://forums.unrealengine.com/t/crashreportclient-compile-error/416378 "2018-02-04T11:46:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f9756538](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f9756538](https://forums.unrealengine.com/u/anonymous_user_f9756538)\
**Post date:** [February 4, 2018, 11:46am UTC](https://forums.unrealengine.com/t/crashreportclient-compile-error/416378/1 "2018-02-04T11:46:22Z")

</div>

I am trying to build UnrealEngine and have hit a link error trying to compile CrashReportClient:

[49/49] Link CrashReportClient-Linux-Development  
/usr/bin/ld: /home//Projects/DogFight/Build/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8//lib//Linux/x86\_64-unknown-linux-gnu/libz.a(compress.o): relocation R\_X86\_64\_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /home//Projects/DogFight/Build/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8//lib//Linux/x86_64-unknown-linux-gnu/libz.a(deflate.o): relocation R_X86_64_32S against symbol `zcalloc’ can not be used when making a shared object; recompile with -fPIC e

…

/usr/bin/ld: /home//Projects/DogFight/Build/UnrealEngine/Engine/Source/ThirdParty/FreeType2/FreeType2-2.6/Lib/Linux/x86\_64-unknown-linux-gnu/libfreetype.a(ftlzw.c.o): relocation R\_X86\_64\_32S against `.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /home//Projects/DogFight/Build/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8//lib//Linux/x86_64-unknown-linux-gnu/libz.a(uncompr.o): relocation R_X86_64_32 against `.rodata’ can not be used when making a shared object; recompile with -fPIC  
/usr/bin/ld: final link failed: Nonrepresentable section on output  
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)  
ERROR: UBT ERROR: Failed to produce item: /home//Projects/DogFight/Build/UnrealEngine/Engine/Binaries/Linux/CrashReportClient-Linux-Development  
Total build time: 96.92 seconds (Local executor: 0.00 seconds)  
make: \*\*\* [Makefile:253: CrashReportClient] Error 5  
[@-pc UnrealEngine]$ ^C

it seems that it wants me to compile with the flag -fPIC. How do I resolve this issue? I do not know how to set this compile flag.

My OS is Manjaro arch.

I tried editing LinuxToolChain.cs to add it and re-ran ./GenerateProjectFiles.sh, but I get the same error.  
I see that LinuxToolChain.cs will use -fPIC if bIsBuildingDLL is set to true, perhaps this is the correct way to fix the problem? But how do I do that?

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [February 4, 2018, 5:46pm UTC](https://forums.unrealengine.com/t/crashreportclient-compile-error/416378/2 "2018-02-04T17:46:06Z")

</div>

This is because Arch (and a number of related distros) configure clang and gcc to produce position-independent executables by default. You may attempt to fix that in LinuxToolChain.cs by adding -fno-PIE but the fix may not be as straightforward.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f9756538](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f9756538](https://forums.unrealengine.com/u/anonymous_user_f9756538)\
**Post date:** [February 4, 2018, 11:01pm UTC](https://forums.unrealengine.com/t/crashreportclient-compile-error/416378/3 "2018-02-04T23:01:44Z")

</div>

Thank you for your help, but it still does not work.

I added in the line:

Result += " -fno-PIE"; in GetCLArguments\_Global

then ran ./GenerateProjectFiles.sh then make. I still have the same problem.  
If that is the correct way to do it, I will try setting up ubuntu in a VM if there are no other solutions.

---

<div class="post-metadata">

**Author:** ![Acheta\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Acheta\_Games](https://forums.unrealengine.com/u/Acheta_Games)\
**Post date:** [February 5, 2018, 12:40pm UTC](https://forums.unrealengine.com/t/crashreportclient-compile-error/416378/4 "2018-02-05T12:40:13Z")

</div>

Hi, check out the patches used by the aur package [aur.git - AUR Package Repositories](https://aur.archlinux.org/cgit/aur.git/tree/?h=unreal-engine) they help with making the current version of the engine buildable. If you need some older version do go back in the repository to that version.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f9756538](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f9756538](https://forums.unrealengine.com/u/anonymous_user_f9756538)\
**Post date:** [February 7, 2018, 10:10am UTC](https://forums.unrealengine.com/t/crashreportclient-compile-error/416378/5 "2018-02-07T10:10:21Z")

</div>

Thats! that is perfect! I managed to get building on manjaro.
