mariadb: prevent building against uClibc
authorSebastian Kemper <sebastian_ml@gmx.net>
Wed, 20 Nov 2019 19:51:21 +0000 (20:51 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Wed, 20 Nov 2019 19:51:23 +0000 (20:51 +0100)
MariaDB 10.4 includes some changes in sql/sql_statistics.cc that require
std::fmin and std::fmax. But these functions aren't available when
libstdc++ is compiled against uClibc, because uClibc doesn't pass the
test when libstdc++ checks for C99 math that supports "TR1" facilities
(macro: GLIBCXX_CHECK_C99_TR1).

Hence compilation fails:

[ 90%] Building CXX object sql/CMakeFiles/sql.dir/sql_table.cc.o
/builder/shared-workdir/build/sdk/build_dir/target-arc_archs_uClibc/mariadb-10.4.10/sql/sql_statistics.cc: In member function 'void Column_statistics_collected::finish(ha_rows, double)':
/builder/shared-workdir/build/sdk/build_dir/target-arc_archs_uClibc/mariadb-10.4.10/sql/sql_statistics.cc:2533:20: error: 'fmax' is not a member of 'std'
         val = std::fmax(estimate_total_distincts * (rows - nulls) / rows, 1.0);

This commit updates package dependencies to prevent a build against
uClibc. There is no reason to waste CPU cycles on the build bots.

The dependencies are also tidied up. In the past it made sense to define
MARIADB_COMMON_DEPENDS and MARIADB_COMMON_DEPENDS_EXE, because the
server had different dependencies compared to the library. But since the
library is now in its own package we can remove the differentiation.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
utils/mariadb/Makefile

index 2cef4008366c3da8a60f722d2411976d3e82c51b..eaef830ab21b55eb70bf8dfe2476862fef4f3db4 100644 (file)
@@ -173,13 +173,11 @@ include $(INCLUDE_DIR)/nls.mk
 
 MARIADB_COMMON_DEPENDS := \
        $(ICONV_DEPENDS) \
-       +libopenssl \
-       +zlib
-
-MARIADB_COMMON_DEPENDS_EXE := \
-       $(MARIADB_COMMON_DEPENDS) \
        +libatomic \
-       +libstdcpp
+       +libopenssl \
+       +libstdcpp \
+       +zlib \
+       @!USE_UCLIBC
 
 # Pass CPPFLAGS in the CFLAGS as otherwise the build system will
 # ignore them.
@@ -235,7 +233,7 @@ define Package/mariadb-client-base
   $(call Package/mariadb/Default)
   TITLE:=MariaDB database client base
   DEPENDS:=mariadb-common \
-         $(MARIADB_COMMON_DEPENDS_EXE) \
+         $(MARIADB_COMMON_DEPENDS) \
          +libedit
 endef
 
@@ -286,7 +284,7 @@ endef
 define Package/mariadb-server-base
   $(call Package/mariadb/Default)
   DEPENDS:=mariadb-common \
-         $(MARIADB_COMMON_DEPENDS_EXE) \
+         $(MARIADB_COMMON_DEPENDS) \
          +libaio \
          +liblzma \
          +libpcre \