Skip to content

Commit 0268b87

Browse files
committed
deb: columnstore not 32bit
Columnstore badly failed on 32bit. The way Debian triggers somehow doesn't detect the amd64 in the architecture of columnstore so we explicitly disable it to prevent failures on x86_32. The architecture from the control file is sufficient to not build of arm64 and other unsupported achitectures so we don't need to disable columnstore by default. The logic around not building columnstore on Travis/Gitlab ci can be preserved with a autobake-deb.sh restructure.
1 parent 30d33d8 commit 0268b87

File tree

2 files changed

+17
-24
lines changed

2 files changed

+17
-24
lines changed

debian/autobake-deb.sh

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,17 @@ set -e
1717
# building the deb packages here.
1818
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
1919

20-
# Take the files and part of control from MCS directory
21-
if [[ -d storage/columnstore/columnstore/debian ]]
22-
then
23-
cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/
24-
echo >> debian/control
25-
cat storage/columnstore/columnstore/debian/control >> debian/control
26-
27-
# ColumnStore is explicitly disabled in the native build, so allow it now
28-
# when build it when triggered by autobake-deb.sh
29-
sed '/-DPLUGIN_COLUMNSTORE=NO/d' -i debian/rules
30-
fi
31-
3220
# General CI optimizations to keep build output smaller
3321
if [[ $TRAVIS ]] || [[ $GITLAB_CI ]]
3422
then
3523
# On both Travis and Gitlab the output log must stay under 4MB so make the
3624
# build less verbose
37-
sed '/Add support for verbose builds/,/^$/d' -i debian/rules
38-
3925
# MCOL-4149: ColumnStore builds are so slow and big that they must be skipped on
4026
# both Travis-CI and Gitlab-CI
41-
sed 's|$(CMAKEFLAGS)|$(CMAKEFLAGS) -DPLUGIN_COLUMNSTORE=NO|' -i debian/rules
42-
sed "/Package: mariadb-plugin-columnstore/,/^$/d" -i debian/control
27+
sed -e '/Add support for verbose builds/,/^$/d' \
28+
-e '/ColumnStore is part of the build/,/^$/d' \
29+
-e 's|$(CMAKEFLAGS)|$(CMAKEFLAGS) -DPLUGIN_COLUMNSTORE=NO|' \
30+
-i debian/rules
4331
fi
4432

4533
# Don't build or try to put files in a package for selected plugins and components on Travis-CI

debian/rules

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ else
3838
NUMJOBS = 1
3939
endif
4040

41-
# RocksDB cannot build on 32-bit platforms
42-
ifeq (32,$(DEB_HOST_ARCH_BITS))
43-
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
44-
endif
45-
4641
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
4742
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),alpha amd64 arm arm64 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64))
4843
CMAKEFLAGS += -DSTACK_DIRECTION=-1
@@ -74,15 +69,26 @@ ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
7469
dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --builddirectory=builddir-native
7570
dh_auto_build --builddirectory=builddir-native -- import_executables
7671
endif
72+
73+
# ColumnStore is part of the build
74+
ifneq (32,$(DEB_HOST_ARCH_BITS))
75+
# Take the files and part of control from MCS directory
76+
cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/
77+
# Don't include twice
78+
grep -q '^Package: mariadb-plugin-columnstore$$' debian/control || \
79+
echo >> debian/control && \
80+
cat storage/columnstore/columnstore/debian/control >> debian/control
81+
endif
82+
7783
echo "server:Version=$(DEB_VERSION)" >> debian/substvars
7884

79-
# Don't build ColumnStore as part of the native build, only build it when
80-
# triggered by autobake-deb.sh. Saves build time and disk space.
85+
# RocksDB and Column Store cannot build on 32-bit platforms
8186
PATH=$${MYSQL_BUILD_PATH:-"/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin"} \
8287
NO_UPDATE_BUILD_VERSION=1 \
8388
dh_auto_configure --builddirectory=$(BUILDDIR) -- \
8489
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
8590
$(CMAKEFLAGS) \
91+
$(if $(findstring $(DEB_HOST_ARCH_BITS),32),-DPLUGIN_ROCKSDB=NO -DPLUGIN_COLUMNSTORE=NO) \
8692
$(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,-DIMPORT_EXECUTABLES=$(CURDIR)/builddir-native/import_executables.cmake) \
8793
-DCOMPILATION_COMMENT="mariadb.org binary distribution" \
8894
-DMYSQL_SERVER_SUFFIX="-$(DEB_VERSION_REVISION)" \
@@ -92,7 +98,6 @@ endif
9298
-DPLUGIN_TOKUDB=NO \
9399
-DPLUGIN_CASSANDRA=NO \
94100
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
95-
-DPLUGIN_COLUMNSTORE=NO \
96101
-DDEB=$(DEB_VENDOR)
97102

98103
# This is needed, otherwise 'make test' will run before binaries have been built

0 commit comments

Comments
 (0)