[debian-mysql] Bug#971579: mariadb-10.5 FTCBFS: multiple reasons
Helmut Grohne
helmut at subdivi.de
Fri Oct 2 06:07:19 BST 2020
Source: mariadb-10.5
Version: 1:10.5.5-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs
Control: tags 920365 + wontfix
Control: close 920365
Hi Otto,
great news. I managed to make mariadb cross buildable. It wasn't that
hard in the end, I just got a number of things wrong on the road, which
made it take a little longer. Instead of detailing on the problems
encountered, I'm attaching a patch with a descriptive changelog. If you
have any questions on why a particular change is needed, don't hesitate
to ask. Integrating this may not be entirely trivial as you already
cherry picked the dh_auto_configure part into git, but this patch is
against the unstable version.
One aspect I'd like to highlight is that mariadb wants to know the stack
direction and you cannot determine this during cross compilation. For
that reason, mariadb includes the stack direction for each architecture.
Updating it will be required for new architectures from time to time.
Hope this works for you.
Do note however that making mariadb cross buildable implies not turning
mariadb_config into a shell script. Doing so would require running
mariadb_config during build, which we cannot do during cross builds. It
was only ever meant as s stop-gap solution and the real solution is
using pkg-config. So I'll have to send a lot of patches to mariadb users
to make them stop using mariadb_config, which is fundamentally
incompatible with cross compilation. Thus closing that bug. There is
nothing we can do about that on the mariadb side anymore.
Thanks for your cooperation with this matter
Helmut
-------------- next part --------------
diff --minimal -Nru mariadb-10.5-10.5.5/debian/changelog mariadb-10.5-10.5.5/debian/changelog
--- mariadb-10.5-10.5.5/debian/changelog 2020-09-25 18:56:59.000000000 +0200
+++ mariadb-10.5-10.5.5/debian/changelog 2020-09-26 08:00:12.000000000 +0200
@@ -1,3 +1,15 @@
+mariadb-10.5 (1:10.5.5-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Add native dependencies on gnutls, libedit and ncurses.
+ + Use a native perl interpreter during build.
+ + Let dh_auto_configure pass -DCMAKE_SYSTEM_NAME to cmake.
+ + Keep default CMAKE_BUILD_TYPE=RelWithDebInfo instead of debhelper's None.
+ + Cache the per-architecture stack direction.
+
+ -- Helmut Grohne <helmut at subdivi.de> Sat, 26 Sep 2020 08:00:12 +0200
+
mariadb-10.5 (1:10.5.5-1) unstable; urgency=medium
* New upstream version 10.5.5 (Closes: #968895)
diff --minimal -Nru mariadb-10.5-10.5.5/debian/control mariadb-10.5-10.5.5/debian/control
--- mariadb-10.5-10.5.5/debian/control 2020-09-24 00:19:37.000000000 +0200
+++ mariadb-10.5-10.5.5/debian/control 2020-09-26 08:00:12.000000000 +0200
@@ -17,12 +17,15 @@
libcrack2-dev (>= 2.9.0),
libcurl4-openssl-dev | libcurl4-dev,
libedit-dev,
+ libedit-dev:native,
libgnutls28-dev (>= 3.3.24),
+ libgnutls28-dev:native (>= 3.3.24),
libjemalloc-dev [linux-any],
libjudy-dev,
libkrb5-dev,
liblz4-dev,
libncurses5-dev (>= 5.0-6~),
+ libncurses5-dev:native (>= 5.0-6~),
libnuma-dev [!armhf],
libpam0g-dev,
libpcre2-dev,
@@ -31,7 +34,7 @@
libxml2-dev,
libzstd-dev (>= 1.3.3),
lsb-release,
- perl,
+ perl:any,
po-debconf,
psmisc,
unixodbc-dev,
diff --minimal -Nru mariadb-10.5-10.5.5/debian/rules mariadb-10.5-10.5.5/debian/rules
--- mariadb-10.5-10.5.5/debian/rules 2020-09-17 22:17:28.000000000 +0200
+++ mariadb-10.5-10.5.5/debian/rules 2020-09-26 08:00:12.000000000 +0200
@@ -22,8 +22,7 @@
RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead?
TMP:=$(CURDIR)/debian/tmp
-CC := $(DEB_HOST_GNU_TYPE)-gcc
-CXX := $(DEB_HOST_GNU_TYPE)-g++
+-include /usr/share/dpkg/buildtools.mk
# According to Debian Policy version 4.2.0 builds should be as verbose as
# possible unless 'terse' is specifically passed.
@@ -53,6 +52,15 @@
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
endif
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+ifneq (,$(filter $(DEB_HOST_ARCH_CPU),alpha amd64 arm arm64 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64))
+CMAKEFLAGS += -DSTACK_DIRECTION=-1
+endif
+ifneq (,$(filter $(DEB_HOST_ARCH_CPU),hppa))
+CMAKEFLAGS += -DSTACK_DIRECTION=1
+endif
+endif
+
ifeq ($(DEB_HOST_ARCH),riscv64)
# riscv64 is currently very slow.
TESTCASE_TIMEOUT=120
@@ -75,7 +83,7 @@
@echo "RULES.$@"
dh_testdir
dh_testroot
- rm -rf $(BUILDDIR) builddir-native
+ rm -rf $(BUILDDIR) builddir-native extra/readline
[ ! -f debian/mysql-test-unstable-tests.orig ] || \
mv debian/mysql-test-unstable-tests.orig mysql-test/unstable-tests
@@ -94,12 +102,10 @@
# Remove -DWITH_SSL=bundle if you want to use system OpenSSL, otherwise
# the server will use YaSSL and Connector/C will use GnuTLS.
# Don't build ColumnStore, not mature enough for Debian yet.
- mkdir -p $(BUILDDIR) && cd $(BUILDDIR) && \
- sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
- CC=${CC} \
- CXX=${CXX} \
- NO_UPDATE_BUILD_VERSION=1 \
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
+ NO_UPDATE_BUILD_VERSION=1 \
+ dh_auto_configure --builddirectory=$(BUILDDIR) -- \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$(CMAKEFLAGS) \
$(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,-DIMPORT_EXECUTABLES=$(CURDIR)/builddir-native/import_executables.cmake) \
-DCOMPILATION_COMMENT="$(DEB_VENDOR) $(RELEASE)" \
@@ -113,7 +119,7 @@
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DPLUGIN_COLUMNSTORE=NO \
-DWITH_INNODB_SNAPPY=ON \
- -DDEB=$(DEB_VENDOR) ..'
+ -DDEB=$(DEB_VENDOR)
# This is needed, otherwise 'make test' will run before binaries have been built
override_dh_auto_build:
More information about the pkg-mysql-maint
mailing list