• 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!

[Ubuntu 18.04 ] Problems compiling OtClient

godorluis

New Member
Joined
Feb 19, 2011
Messages
1
Reaction score
0
Hello Everyone!.

I have been struggling around with compiling OTClient on Ubuntu 18.04. I followed instructions on git and after using the make command, i get this output.

I noticed OtClient repository said something about Linking CXX problems, so i installed as mentioned there the required libraries but i still havent been able to compile otclient. Is there anyone here who may who what im doing wrong?.

Code:
[100%] Linking CXX executable otclient
/usr/bin/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/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/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[2]: *** [otclient] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/otclient.dir/all' failed
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
 
If anyone need fix for it. In CMakeLists.txt replace:
Code:
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=${PROJECT_NAME}.map")
With:
Code:
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -no-pie -Wl,-Map=${PROJECT_NAME}.map")
Then type again "cmake .." in "build" folder and "make".
 
Back
Top