aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-09-29 20:13:15 +0200
committerRiccardo Spagni <ric@spagni.net>2014-09-29 20:13:15 +0200
commit99945a5c47feabb9347fa41f63746c221c138eaa (patch)
tree6541ce3b1d0a2e09248e65baea2407cf44e6ac05
parentRevert "low risk, potentially varint overflow bug patched thanks to BBR" (diff)
downloadmonero-99945a5c47feabb9347fa41f63746c221c138eaa.tar.xz
dependencies enforced, send que error message log level moved
-rw-r--r--CMakeLists.txt19
-rw-r--r--README.md4
-rw-r--r--cmake/FindUnbound.cmake10
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.inl2
4 files changed, 24 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5655bfc83..e908e0dfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,19 +30,26 @@
cmake_minimum_required(VERSION 2.8.6)
+if(NOT WIN32)
+ string(ASCII 27 Esc)
+ set(ColourReset "${Esc}[m")
+ set(BoldRed "${Esc}[1;31m")
+endif()
+
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if (NOT DEFINED ENV{DEVELOPER_LOCAL_TOOLS})
- message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env")
+ message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env (not required)")
set(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
elseif ("$ENV{DEVELOPER_LOCAL_TOOLS}" EQUAL 1)
- message(STATUS "found: env DEVELOPER_LOCAL_TOOLS = 1")
+ message(STATUS "Found: env DEVELOPER_LOCAL_TOOLS = 1")
set(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT ON)
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost installation" ON)
else()
message(STATUS "found: env DEVELOPER_LOCAL_TOOLS = 0")
set(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
endif()
+
message(STATUS "BOOST_IGNORE_SYSTEM_PATHS defaults to ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT}")
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost ins tallation" $BOOST_IGNORE_SYSTEM_PATHS_DEFAULT)
@@ -178,9 +185,15 @@ if(STATIC)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
+
+if(NOT Boost_FOUND)
+ MESSAGE(FATAL_ERROR "${BoldRed}Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.53 or 1.55+) or the equivalent${ColourReset}")
+endif()
+
if((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 54))
- message(SEND_ERROR "Boost version 1.54 is unsupported, more details are available here http://goo.gl/RrCFmA")
+ message(FATAL_ERROR "${BoldRed}Boost version 1.54 is unsupported due to a bug (see: http://goo.gl/RrCFmA), please install Boost 1.53 or 1.55 and above${ColourReset}")
endif()
+
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
if(MINGW)
set(Boost_LIBRARIES "${Boost_LIBRARIES};pthread;mswsock;ws2_32")
diff --git a/README.md b/README.md
index 6f5b45d8d..72883cbd9 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ Parts of the project are originally copyright (c) 2012-2013 The Cryptonote devel
### On Unix and Linux:
-Dependencies: GCC 4.7.3 or later, CMake 2.8.6 or later, Unbound 1.4.16 or later, and Boost 1.53 or later (except 1.54, [more details here](http://goo.gl/RrCFmA)).
+Dependencies: GCC 4.7.3 or later, CMake 2.8.6 or later, libunbound 1.4.16 or later (note: Unbound is not a dependency, libunbound is), and Boost 1.53 or later (except 1.54, [more details here](http://goo.gl/RrCFmA)).
**Basic Process:**
@@ -77,7 +77,7 @@ Alternatively, it can be built in an easier and more automated fashion using Hom
### On Windows:
-Dependencies: mingw-w64, msys2, CMake 2.8.6 or later, Unbound 1.4.16 or later, and Boost 1.53 or 1.55 (except 1.54, [more details here](http://goo.gl/RrCFmA), and 1.56 as it causes an internal compiler error on mingw-w64).
+Dependencies: mingw-w64, msys2, CMake 2.8.6 or later, libunbound 1.4.16 or later (note: Unbound is not a dependency, libunbound is), and Boost 1.53 or 1.55 (except 1.54, [more details here](http://goo.gl/RrCFmA), and 1.56 as it causes an internal compiler error on mingw-w64).
**Preparing the Build Environment**
diff --git a/cmake/FindUnbound.cmake b/cmake/FindUnbound.cmake
index 8d6f4ae72..af3382fff 100644
--- a/cmake/FindUnbound.cmake
+++ b/cmake/FindUnbound.cmake
@@ -25,7 +25,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-MESSAGE("Looking for libunbound")
+MESSAGE(STATUS "Looking for libunbound")
FIND_PATH(UNBOUND_INCLUDE_DIR
NAMES unbound.h
@@ -40,14 +40,14 @@ FIND_PATH(UNBOUND_INCLUDE_DIR
find_library(UNBOUND_LIBRARIES unbound)
IF(UNBOUND_INCLUDE_DIR)
- MESSAGE(STATUS "Found unbound include in ${UNBOUND_INCLUDE_DIR}")
+ MESSAGE(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
IF(UNBOUND_LIBRARIES)
- MESSAGE(STATUS "Found unbound library")
+ MESSAGE(STATUS "Found libunbound library")
set(UNBOUND_INCLUDE ${UNBOUND_INCLUDE_DIR})
set(UNBOUND_LIBRARY ${UNBOUND_LIBRARIES})
ELSE()
- MESSAGE(FATAL_ERROR "Could not find unbound library")
+ MESSAGE(FATAL_ERROR "${BoldRed}Could not find libunbound library, please make sure you have installed libunbound or libunbound-dev or the equivalent${ColourReset}")
ENDIF()
ELSE()
- MESSAGE(FATAL_ERROR "Could not find unbound library")
+ MESSAGE(FATAL_ERROR "${BoldRed}Could not find libunbound library, please make sure you have installed libunbound or libunbound-dev or the equivalent${ColourReset}")
ENDIF()
diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl
index 4b4189eb4..db3f9e322 100644
--- a/contrib/epee/include/net/abstract_tcp_server2.inl
+++ b/contrib/epee/include/net/abstract_tcp_server2.inl
@@ -304,7 +304,7 @@ PRAGMA_WARNING_DISABLE_VS(4355)
if(m_send_que.size() > ABSTRACT_SERVER_SEND_QUE_MAX_COUNT)
{
send_guard.unlock();
- LOG_ERROR("send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(" << ABSTRACT_SERVER_SEND_QUE_MAX_COUNT << "), shutting down connection");
+ LOG_PRINT_L2("send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(" << ABSTRACT_SERVER_SEND_QUE_MAX_COUNT << "), shutting down connection");
close();
return false;
}