Build fixes
- add autoconf dep for jemalloc - add libuv for macos
This commit is contained in:
parent
c01c129700
commit
6fda19d4f1
|
@ -1,6 +1,6 @@
|
|||
|
||||
local default_deps_base='libsystemd-dev libboost-program-options-dev libboost-system-dev libboost-test-dev ' +
|
||||
'libsqlite3-dev libsodium-dev libssl-dev pkg-config';
|
||||
'libsqlite3-dev libsodium-dev libssl-dev pkg-config autoconf';
|
||||
local default_deps_nocxx='libsodium-dev ' + default_deps_base; // libsodium-dev needs to be >= 1.0.18
|
||||
local default_deps='g++ ' + default_deps_nocxx; // g++ sometimes needs replacement
|
||||
local docker_base = 'registry.oxen.rocks/lokinet-ci-';
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
Storage server for Loki Service Nodes
|
||||
|
||||
Requirements:
|
||||
* Boost >= 1.66 (for boost.beast)
|
||||
* Boost >= 1.66 (for boost.program_options)
|
||||
* OpenSSL >= 1.1.1a (for X25519 curves)
|
||||
* sodium >= 1.0.17 (for ed25119 to curve25519 conversion)
|
||||
* autoconf (for building jemalloc)
|
||||
|
||||
You can, however, download and build static versions these dependencies
|
||||
as part of the build by adding the `-DBUILD_STATIC_DEPS=ON` option to cmake.
|
||||
You can, however, download and build static versions these dependencies (other than autoconf) as
|
||||
part of the build by adding the `-DBUILD_STATIC_DEPS=ON` option to cmake.
|
||||
|
||||
Can use `RelWithDebInfo` instead of `Release` if you want to include debug symbols to provide developers with valueable core dumps from crashes.
|
||||
Also make sure you don't have an older (than 4.3.0) libzmq header in /usr/local/include, if so please install a new version.
|
||||
|
|
|
@ -42,6 +42,12 @@ set(ZMQ_SOURCE zeromq-${ZMQ_VERSION}.tar.gz)
|
|||
set(ZMQ_HASH SHA512=e198ef9f82d392754caadd547537666d4fba0afd7d027749b3adae450516bcf284d241d4616cad3cb4ad9af8c10373d456de92dc6d115b037941659f141e7c0e
|
||||
CACHE STRING "libzmq source hash")
|
||||
|
||||
set(LIBUV_VERSION 1.41.0 CACHE STRING "libuv version")
|
||||
set(LIBUV_MIRROR ${LOCAL_MIRROR} https://dist.libuv.org/dist/v${LIBUV_VERSION}
|
||||
CACHE STRING "libuv mirror(s)")
|
||||
set(LIBUV_SOURCE libuv-v${LIBUV_VERSION}.tar.gz)
|
||||
set(LIBUV_HASH SHA512=33613fa28e8136507300eba374351774849b6b39aab4e53c997a918d3bc1d1094c6123e0e509535095b14dc5daa885eadb1a67bed46622ad3cc79d62dc817e84
|
||||
CACHE STRING "libuv source hash")
|
||||
|
||||
|
||||
include(ExternalProject)
|
||||
|
@ -162,6 +168,16 @@ function(build_external target)
|
|||
)
|
||||
endfunction()
|
||||
|
||||
if (WIN32 OR (APPLE AND NOT IOS))
|
||||
build_external(libuv
|
||||
CONFIGURE_COMMAND ./autogen.sh && ./configure ${cross_host} ${cross_rc} --prefix=${DEPS_DESTDIR} --with-pic --disable-shared --enable-static "CC=${deps_cc}" "CFLAGS=${deps_CFLAGS}"
|
||||
BUILD_BYPRODUCTS
|
||||
${DEPS_DESTDIR}/lib/libuv.a
|
||||
${DEPS_DESTDIR}/include/uv.h
|
||||
)
|
||||
add_static_target(libuv libuv_external libuv.a)
|
||||
target_link_libraries(libuv INTERFACE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
|
||||
set(openssl_configure ./config)
|
||||
|
|
|
@ -95,9 +95,16 @@ target_link_libraries(uSockets OpenSSL::SSL OpenSSL::Crypto)
|
|||
# On Windows uSockets uses libuv for its event loop; on Mac kqueue is the default, but that seems to
|
||||
# not be reliable on older macos versions (like 10.12), so we use libuv on macos as well.
|
||||
if (WIN32 OR (APPLE AND NOT IOS))
|
||||
add_subdirectory(libuv EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(uSockets uv_a)
|
||||
target_compile_definitions(uSockets PUBLIC LIBUS_USE_LIBUV)
|
||||
if(BUILD_STATIC_DEPS)
|
||||
target_link_libraries(uSockets libuv)
|
||||
else()
|
||||
if(STATIC)
|
||||
pkg_check_modules(LIBUV libuv-static REQUIRED IMPORTED_TARGET)
|
||||
else()
|
||||
pkg_check_modules(LIBUV libuv REQUIRED IMPORTED_TARGET)
|
||||
endif()
|
||||
target_link_libraries(uSockets PkgConfig::LIBUV)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue