• 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 compilation (Ubuntu)

MAquu

New Member
Joined
Nov 20, 2017
Messages
3
Reaction score
0
[ 98%] Building CXX object CMakeFiles/otclient.dir/src/client/uisprite.cpp.o
[ 99%] Building CXX object CMakeFiles/otclient.dir/src/main.cpp.o
[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 shared 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 shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
 
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