Adam Majer changed bug 1195343
What Removed Added
Status NEW RESOLVED
Resolution --- UPSTREAM
Summary cmangos issues building with boost cmangos issues building with boost because it cannot find static libraries
Flags needinfo?(zombie.ryushu@zoho.com)  

Comment # 9 on bug 1195343 from
It looks like the CMakeLists.txt are setup to only link with static libraries
and only find static boost libraries. Since we do not provide static libraries
but only dynamic libraries (this way we can fix problem code in one library
without rebuilding the world), naturally, the static versions cannot be found.
The minimum patch that fixes build of cmangos is

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -193,7 +193,7 @@ endif()

 # Be sure to search only static lib
 add_definitions(-DBOOST_ALL_NO_LIB)
-set(Boost_USE_STATIC_LIBS ON)
+# set(Boost_USE_STATIC_LIBS ON)
 set(Boost_NO_BOOST_CMAKE ON)   # should fix build for boost 1.71
 #set(Boost_DEBUG ON)

A better patch would just remove all of these lines,

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7086d58c..91881cc63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,10 +191,6 @@ if(WIN32 AND NOT "$ENV{BOOST_ROOT}" STREQUAL "")
   set(BOOST_LIBRARYDIR "${BOOST_LIBRARYDIR};$ENV{BOOST_ROOT}\\stage")
 endif()

-# Be sure to search only static lib
-add_definitions(-DBOOST_ALL_NO_LIB)
-set(Boost_USE_STATIC_LIBS ON)
-set(Boost_NO_BOOST_CMAKE ON)   # should fix build for boost 1.71
 #set(Boost_DEBUG ON)

 if(MSVC)

One think you should also take care when building on Leap, is that these
sources require the <filesystem> header which is not available with default
compiler. Make sure to use g++-10 instead. So, export CXX=g++-10 before running
cmake in the build directory and then check that it selected it instead of the
default g++-7

I will close this bug as it's mostly an issue with upstream CMake usage and
their expectation to only use static libraries.


You are receiving this mail because: