Problems with clang 3.9 and ThirdPaty linkers

undefinedMethod
Tue, 01 Nov 2016 19:42:37 +0000
Platform & Builds

Hi

Been having problems building on Linux, Arch recently moved to clang 3.9. I updated my kernel today and am now unable to use clang 3.5.

Tried building 4.13, then 4.14. I modified the toolchain to supress warnings which caused clang to fail. Under Epic employee advice I am now trying to build the master branch. The warnings are supressed or addressed by default. Curiously I still get the same errors with thirdparty linkers. Excerpt from log and terminal output below. I am unsure how to recompile with -fPIC.

libraries with errors, zlib, jemalloc, sdl2

/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_dspaudio.c.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_alsa_audio.c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_pulseaudio.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11xinput2.c.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11keyboard.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11mouse.c.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11window.c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(imKStoUCS.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11opengles.c.o): relocation R_X86_64_32S against hidden symbol `X11_GL_LoadLibrary' can not be used when making a shared object
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11opengl.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11shape.c.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11clipboard.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_x11framebuffer.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(edid-parse.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/lib/Linux/x86_64-unknown-linux-gnu/libSDL2.a(SDL_audiodev.c.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: UBT ERROR: Failed to produce item: /mnt/Media/Developer/unreal/UnrealEngine/Engine/Binaries/Linux/BlankProgram
Total build time: 33.41 seconds
make: *** [Makefile:228: BlankProgram] Error 5

11 posts - 1 participant