You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-3624 Move jemalloc to an LD_PRELOAD
Linking will become an issue for the unified build and it is an issue for jemalloc 5.x. Instead we will LD_PRELOAD on the forked ColumnStore specific processes.
This commit is contained in:
@ -153,17 +153,6 @@ if (NOT SNAPPY_FOUND)
|
||||
MESSAGE(FATAL_ERROR "Snappy not found please install snappy-devel for CentOS/RedHat or libsnappy-dev for Ubuntu/Debian")
|
||||
endif()
|
||||
|
||||
# Jemalloc has issues with SLES 12, so disable for now
|
||||
IF (EXISTS "/etc/SuSE-release")
|
||||
SET(JEMALLOC_LIBRARIES "")
|
||||
ELSE ()
|
||||
INCLUDE (FindJeMalloc)
|
||||
if (NOT JEMALLOC_FOUND)
|
||||
message(FATAL_ERROR "jemalloc not found!")
|
||||
SET(JEMALLOC_LIBRARIES "")
|
||||
endif()
|
||||
ENDIF ()
|
||||
|
||||
FIND_PROGRAM(AWK_EXECUTABLE awk DOC "path to the awk executable")
|
||||
if(NOT AWK_EXECUTABLE)
|
||||
message(FATAL_ERROR "awk not found!")
|
||||
@ -199,7 +188,7 @@ ENDIF()
|
||||
|
||||
SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed")
|
||||
|
||||
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client ${JEMALLOC_LIBRARIES})
|
||||
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client)
|
||||
SET (ENGINE_OAM_LIBS oamcpp alarmmanager)
|
||||
SET (ENGINE_BRM_LIBS brm idbdatafile cacheutils rwlock ${ENGINE_OAM_LIBS} ${ENGINE_COMMON_LIBS})
|
||||
SET (ENGINE_EXEC_LIBS joblist execplan windowfunction joiner rowgroup funcexp udfsdk regr dataconvert common compress querystats querytele thrift threadpool ${ENGINE_BRM_LIBS})
|
||||
|
@ -1,44 +0,0 @@
|
||||
# - Try to find jemalloc headers and libraries.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(JeMalloc)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# JEMALLOC_ROOT_DIR Set this variable to the root installation of
|
||||
# jemalloc if the module has problems finding
|
||||
# the proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# JEMALLOC_FOUND System has jemalloc libs/headers
|
||||
# JEMALLOC_LIBRARIES The jemalloc library/libraries
|
||||
# JEMALLOC_INCLUDE_DIR The location of jemalloc headers
|
||||
|
||||
find_path(JEMALLOC_ROOT_DIR
|
||||
NAMES include/jemalloc/jemalloc.h
|
||||
)
|
||||
|
||||
find_library(JEMALLOC_LIBRARIES
|
||||
NAMES jemalloc
|
||||
HINTS ${JEMALLOC_ROOT_DIR}/lib
|
||||
)
|
||||
|
||||
find_path(JEMALLOC_INCLUDE_DIR
|
||||
NAMES jemalloc/jemalloc.h
|
||||
HINTS ${JEMALLOC_ROOT_DIR}/include
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
|
||||
JEMALLOC_LIBRARIES
|
||||
JEMALLOC_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
JEMALLOC_ROOT_DIR
|
||||
JEMALLOC_LIBRARIES
|
||||
JEMALLOC_INCLUDE_DIR
|
||||
)
|
@ -8,7 +8,7 @@
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# SNAPPY_ROOT_DIR Set this variable to the root installation of
|
||||
# jemalloc if the module has problems finding
|
||||
# snappy if the module has problems finding
|
||||
# the proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
@ -28,7 +28,7 @@ find_library(SNAPPY_LIBRARIES
|
||||
|
||||
find_path(SNAPPY_INCLUDE_DIR
|
||||
NAMES snappy.h
|
||||
HINTS ${JEMALLOC_ROOT_DIR}/include
|
||||
HINTS ${SNAPPY_ROOT_DIR}/include
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -65,11 +65,11 @@ if (EXISTS "/etc/debian_version")
|
||||
set(DEBIAN_VERSION_NUMBER "${CMAKE_MATCH_1}")
|
||||
endif ()
|
||||
if ("${DEBIAN_VERSION_NUMBER}" EQUAL "8")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1, libjemalloc1")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1, libjemalloc1 net-tools")
|
||||
elseif ("${DEBIAN_VERSION_NUMBER}" EQUAL "9")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1v5, libreadline5, libjemalloc1")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1v5, libreadline5, libjemalloc1 net-tools")
|
||||
else()
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libboost-all-dev, libreadline-dev, rsync, libsnappy1v5, net-tools, libjemalloc1")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libboost-all-dev, libreadline-dev, rsync, libsnappy1v5, net-tools, libjemalloc1 net-tools")
|
||||
endif ()
|
||||
|
||||
SET(CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_DEPENDS "mariadb-columnstore-libs")
|
||||
|
@ -87,13 +87,13 @@ IF (EXISTS "/etc/SuSE-release")
|
||||
set(SUSE_VERSION_NUMBER "${CMAKE_MATCH_1}")
|
||||
ENDIF ()
|
||||
if (${REDHAT_VERSION_NUMBER} EQUAL 6)
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "mariadb-columnstore-libs" "mariadb-columnstore-shared" "snappy")
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "mariadb-columnstore-libs" "mariadb-columnstore-shared" "snappy" "net-tools")
|
||||
# Disable auto require as this will also try to pull Boost via RPM
|
||||
SET(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
elseif (${SUSE_VERSION_NUMBER} EQUAL 12)
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "mariadb-columnstore-libs" "libsnappy1" "jemalloc")
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "mariadb-columnstore-libs" "libsnappy1" "jemalloc" "net-tools")
|
||||
else ()
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "mariadb-columnstore-libs" "snappy" "jemalloc")
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "mariadb-columnstore-libs" "snappy" "jemalloc" "net-tools")
|
||||
endif()
|
||||
|
||||
SETA(CPACK_RPM_storage-engine_PACKAGE_REQUIRES "mariadb-columnstore-libs")
|
||||
|
@ -49,7 +49,7 @@ if [ $vflg -gt 0 ]; then
|
||||
fi
|
||||
|
||||
while [ $keep_going -ne 0 ]; do
|
||||
$exename $args
|
||||
LD_PRELOAD=libjemalloc.so $exename $args
|
||||
if [ -e ${lopt}/StopColumnstore ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
@ -60,7 +60,7 @@ set(CMAKE_INSTALL_RPATH $ORIGIN $ORIGIN/../lib)
|
||||
add_library(storagemanager SHARED ${storagemanager_SRCS})
|
||||
add_dependencies(storagemanager marias3)
|
||||
target_compile_definitions(storagemanager PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS)
|
||||
target_link_libraries(storagemanager boost_system boost_thread boost_filesystem boost_regex pthread ${S3API_DEPS} ${JEMALLOC_LIBRARIES})
|
||||
target_link_libraries(storagemanager boost_system boost_thread boost_filesystem boost_regex pthread ${S3API_DEPS})
|
||||
set_property(TARGET storagemanager PROPERTY CXX_STANDARD 11)
|
||||
|
||||
add_executable(StorageManager src/main.cpp)
|
||||
|
Reference in New Issue
Block a user