Skip to content

Commit 3d94523

Browse files
author
Sergei Golubchik
committed
MDEV-6613 build system endianness test fails for ppc64le (i.e. Ubuntu)
* remove bundled jemalloc, use the system one * force jemalloc in release builds on linux
1 parent ae3cc4f commit 3d94523

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+22
-45902
lines changed

cmake/build_configurations/mysql_release.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ IF(UNIX)
123123
SET(WITH_EXTRA_CHARSETS all CACHE STRING "")
124124

125125
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
126+
SET(WITH_JEMALLOC "yes" CACHE STRING "")
126127

127128
IF(NOT IGNORE_AIO_CHECK)
128129
# Ensure aio is available on Linux (required by InnoDB)

cmake/jemalloc.cmake

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,23 @@
1-
# old cmake does not have ExternalProject file
2-
IF(CMAKE_VERSION VERSION_LESS "2.8.6")
3-
MACRO (CHECK_JEMALLOC)
4-
ENDMACRO()
5-
RETURN()
6-
ENDIF()
1+
INCLUDE (CheckLibraryExists)
72

8-
INCLUDE(ExternalProject)
3+
SET(WITH_JEMALLOC auto CACHE STRING
4+
"Build with jemalloc (possible values are 'yes', 'no', 'auto')")
95

10-
MACRO (USE_BUNDLED_JEMALLOC)
11-
SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/extra/jemalloc")
12-
SET(BINARY_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/extra/jemalloc/build")
13-
SET(LIBJEMALLOC "libjemalloc")
14-
SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence")
15-
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt
16-
LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug)
6+
MACRO (CHECK_JEMALLOC)
7+
# compatibility with old WITH_JEMALLOC values
8+
IF(WITH_JEMALLOC STREQUAL "bundled")
9+
MESSAGE(FATAL_ERROR "MariaDB no longer bundles jemalloc")
1710
ENDIF()
18-
19-
IF(CMAKE_GENERATOR MATCHES "Makefiles")
20-
SET(MAKE_COMMAND ${CMAKE_MAKE_PROGRAM})
21-
ELSE() # Xcode/Ninja generators
22-
SET(MAKE_COMMAND make)
11+
IF(WITH_JEMALLOC STREQUAL "system")
12+
SET(WITH_JEMALLOC "yes")
2313
ENDIF()
24-
25-
ExternalProject_Add(jemalloc
26-
PREFIX extra/jemalloc
27-
SOURCE_DIR ${SOURCE_DIR}
28-
BINARY_DIR ${BINARY_DIR}
29-
STAMP_DIR ${BINARY_DIR}
30-
CONFIGURE_COMMAND "${SOURCE_DIR}/configure" ${JEMALLOC_CONFIGURE_OPTS}
31-
BUILD_COMMAND ${MAKE_COMMAND} "build_lib_static"
32-
INSTALL_COMMAND ""
33-
)
34-
ADD_LIBRARY(libjemalloc STATIC IMPORTED)
35-
SET_TARGET_PROPERTIES(libjemalloc PROPERTIES IMPORTED_LOCATION "${BINARY_DIR}/lib/libjemalloc_pic.a")
36-
ADD_DEPENDENCIES(libjemalloc jemalloc)
37-
ENDMACRO()
38-
39-
IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR APPLE)
40-
# Linux and OSX are the only systems where bundled jemalloc can be built without problems,
41-
# as they both have GNU make and jemalloc actually compiles.
42-
# Also, BSDs use jemalloc as malloc already
43-
SET(WITH_JEMALLOC_DEFAULT "yes")
44-
ELSE()
45-
SET(WITH_JEMALLOC_DEFAULT "no")
46-
ENDIF()
4714

48-
SET(WITH_JEMALLOC ${WITH_JEMALLOC_DEFAULT} CACHE STRING
49-
"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
50-
51-
MACRO (CHECK_JEMALLOC)
52-
IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes")
15+
IF(WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto")
5316
CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC)
5417
IF (HAVE_JEMALLOC)
5518
SET(LIBJEMALLOC jemalloc)
56-
ELSEIF (WITH_JEMALLOC STREQUAL "system")
57-
MESSAGE(FATAL_ERROR "system jemalloc is not found")
5819
ELSEIF (WITH_JEMALLOC STREQUAL "yes")
59-
SET(trybundled 1)
20+
MESSAGE(FATAL_ERROR "jemalloc is not found")
6021
ENDIF()
6122
ENDIF()
62-
IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled)
63-
USE_BUNDLED_JEMALLOC()
64-
ENDIF()
6523
ENDMACRO()

debian/dist/Debian/control

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Priority: optional
44
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
55
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
66
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
7-
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev
7+
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev, libjemalloc-dev
88
Standards-Version: 3.8.3
99
Homepage: http://mariadb.org/
1010
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
@@ -146,7 +146,7 @@ Description: MariaDB database client binaries
146146

147147
Package: mariadb-server-core-5.5
148148
Architecture: any
149-
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version})
149+
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}), libjemalloc1
150150
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5
151151
Conflicts: mariadb-server-5.1 (<< 5.1.60),
152152
mariadb-server-5.2 (<< 5.2.10),
@@ -191,7 +191,7 @@ Architecture: any
191191
Suggests: tinyca, mailx, mariadb-test
192192
Recommends: libhtml-template-perl
193193
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
194-
Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version})
194+
Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}), libjemalloc1
195195
Provides: mariadb-server, mysql-server, virtual-mysql-server
196196
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
197197
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,

debian/dist/Ubuntu/control

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Priority: optional
44
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
55
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
66
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
7-
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev
7+
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev, libjemalloc-dev
88
Standards-Version: 3.8.2
99
Homepage: http://mariadb.org/
1010
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
@@ -146,7 +146,7 @@ Description: MariaDB database client binaries
146146

147147
Package: mariadb-server-core-5.5
148148
Architecture: any
149-
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version})
149+
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}), libjemalloc1
150150
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5
151151
Conflicts: mysql-server-5.0,
152152
mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
@@ -185,7 +185,7 @@ Architecture: any
185185
Suggests: tinyca, mailx, mariadb-test
186186
Recommends: libhtml-template-perl
187187
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
188-
Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version})
188+
Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}), libjemalloc1
189189
Provides: mariadb-server, mysql-server, virtual-mysql-server
190190
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
191191
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,

extra/jemalloc/COPYING

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)