x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

CrashReportClient compile error

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/fabian/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/fabian/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/fabian/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/fabian/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/fabian/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 [fabian@fabian-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?

Product Version: UE 4.18
Tags:
more ▼

asked Feb 04 '18 at 11:46 AM in Linux

avatar image

supagu
61 5 7 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

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.

more ▼

answered Feb 04 '18 at 05:46 PM

avatar image

RCL STAFF
2.6k 59 6 87

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Feb 04 '18 at 11:01 PM

avatar image

supagu
61 5 7 11

avatar image aknarts Feb 05 '18 at 12:40 PM

Hi, check out the patches used by the aur package 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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Feb 07 '18 at 10:10 AM

avatar image

supagu
61 5 7 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question