otclient icon indicating copy to clipboard operation
otclient copied to clipboard

I'm getting an error at the end of the compilation

Open curruwilla opened this issue 3 years ago • 4 comments

I'm getting an error at the end of the compilation, look this:

image

How can I fix and compile without errors?

I followed the step by step: image

I'm using UBUNTU 20.04 LTS - 64bits

curruwilla avatar Feb 25 '22 01:02 curruwilla

UP! I'm also having the same problem, how to fix it? Note: I'm using Ubuntu 20.04 LTS - 64bits

kleberholtz avatar Apr 04 '22 07:04 kleberholtz

Can you try applying the following change to the src/framework/CMakeLists.txt file and see if that helps?

diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt
index cb74320d..3fea96cc 100644
--- a/src/framework/CMakeLists.txt
+++ b/src/framework/CMakeLists.txt
@@ -285,7 +285,7 @@ else()
         set(SYSTEM_LIBRARIES "")
     else()
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
-        set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -rdynamic -Wl,-rpath,./libs") # rdynamic is needed by backtrace.h used in crash handler
+        set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -lm -rdynamic -Wl,-rpath,./libs") # rdynamic is needed by backtrace.h used in crash handler
         set(SYSTEM_LIBRARIES dl rt)
     endif()
 endif()

Alternatively you can also try disabling the sound framework if you don't need it via -DFRAMEWORK_SOUND=OFF CMake argument.

diath avatar Apr 04 '22 13:04 diath

The change in CMakeLists.txt didn't work, however with the option -DFRAMEWORK_SOUND=OFF it worked just fine! thankful.

kleberholtz avatar Apr 04 '22 14:04 kleberholtz

There workaround to the issue is here: https://otland.net/threads/otclient-problems-compiling-on-ubuntu-20.270236/

wioxjk avatar Jul 20 '22 18:07 wioxjk