• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problem with build on Ubuntu - PIE object

TheLinuxGuy

New Member
Joined
Aug 20, 2018
Messages
1
Reaction score
0
Hey, I've got several problems with building OTClient on Ubuntu 18.04.

Here is my log after make ./otclient:

Code:
/usr/bin/x86_64-linux-gnu-ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libogg.a(framing.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libogg.a(bitwise.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
CMakeFiles/otclient.dir/build.make:3857: recipe for target 'otclient' failed
make[3]: *** [otclient] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/otclient.dir/all' failed
make[2]: *** [CMakeFiles/otclient.dir/all] Error 2
CMakeFiles/Makefile2:111: recipe for target 'CMakeFiles/otclient.dir/rule' failed
make[1]: *** [CMakeFiles/otclient.dir/rule] Error 2
Makefile:177: recipe for target 'otclient' failed
make: *** [otclient] Error 2

I've no knowledge about CMake, make or any C/C++ building-related stuff. Hope you guys could help me?

Thanks in advance.
 
I had to edit this line to:
Code:
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fPIC -no-pie -Wl,-Map=${PROJECT_NAME}.map")
to make it work.
 
Back
Top