#1006530 mariadb-10.6: FTBFS on x32: undefined reference to misc functions and files (regression from MariaDB 10.5)

Package:
src:mariadb-10.6
Source:
mariadb-10.6
Submitter:
Otto Kekäläinen
Date:
2022-05-25 04:57:03 UTC
Severity:
normal
Tags:
#1006530#5
Date:
2022-02-26 23:21:25 UTC
From:
To:
Builds on x32 currently fail due to unknown reasons. See log at
https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.6&arch=x32&ver=1%3A10.6.7-2%7Eexp1&stamp=1645782519&raw=0

There are a lot of misc errors, but they don't make much sense to me:

CheckFunctionExists.c:17: undefined reference to `pthread_getspecific'
CheckFunctionExists.c:17: undefined reference to `floor'
CheckTypeSize/SIZEOF_SOCKLEN_T.c:28:22: error: ‘socklen_t’ undeclared
here (not in a function)
cc: error: unrecognized command-line option ‘-Wunused-private-field’
CheckFunctionExists.c:17: undefined reference to `PCRE2regcomp'
src.cxx:6:47: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive]
src.c:6:38: error: ‘struct dirent’ has no member named ‘d_namlen’; did
you mean ‘d_name’?

Example of error in full context:

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_ef995/fast &&
gmake[2]: Entering directory
'/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp'
/usr/bin/gmake  -f CMakeFiles/cmTC_ef995.dir/build.make
CMakeFiles/cmTC_ef995.dir/build
gmake[3]: Entering directory '/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ef995.dir/src.c.o
/usr/bin/cc -DPACKAGE=test -DSTRUCT_DIRENT_HAS_D_NAMLEN
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE
-D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS  -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=.
-specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
-Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector
--param=ssp-buffer-size=4  -o CMakeFiles/cmTC_ef995.dir/src.c.o -c
/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp/src.c
/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp/src.c:6:38: error:
‘struct dirent’ has no member named ‘d_namlen’; did you mean ‘d_name’?
    6 |   (void)sizeof(((struct dirent *)0)->d_namlen);
      |                                      ^~~~~~~~
      |                                      d_name
gmake[3]: *** [CMakeFiles/cmTC_ef995.dir/build.make:78:
CMakeFiles/cmTC_ef995.dir/src.c.o] Error 1
gmake[3]: Leaving directory '/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp'
gmake[2]: *** [Makefile:127: cmTC_ef995/fast] Error 2
gmake[2]: Leaving directory '/<<PKGBUILDDIR>>/builddir/CMakeFiles/CMakeTmp'

Please help!

Build history of mariadb-10.5 when builds still passed:
https://buildd.debian.org/status/logs.php?pkg=mariadb-10.5&arch=x32

This seems to be quite similar to Bug#1006528 for sh4, so perhaps
fixing this issue could solve two archs at the same time.

#1006530#10
Date:
2022-03-15 04:22:15 UTC
From:
To:
The error is earlier in the logs:
#1006530#15
Date:
2022-05-02 07:14:20 UTC
From:
To:
On Tue, 15 Mar 2022 15:22:15 +1100 Daniel Black <daniel@mariadb.org> wrote:
 > The error is earlier in the logs:
 >
 > -- Looking for sched_getcpu - found
 > -- Could NOT find PMEM (missing: PMEM_LIBRARIES PMEM_INCLUDE_DIR)
 > CMake Error at storage/innobase/CMakeLists.txt:345 (MESSAGE):
 > WITH_PMEM=ON cannot be satisfied
 >
 > When the configure stage fails, the builds outputs the
 > CMakeOutput/Error logs to complement this error earlier in the logs.
 > In this case its not useful but other times it is.
 >
 > so the architecture test in debian/rules isn't right as it adds
WITH_PMEM=ON.
 >

WITH_PMEM=ON doesn't seem explicitly added to the options on x32, so I'm
wondering if WITH_PMEM=OFF shouldn't be added explicitly on
architectures where libpmem is not available/supported

#1006530#20
Date:
2022-05-04 08:50:29 UTC
From:
To:
Hi!

The problem here is the use of DEB_HOST_ARCH_CPU which is "amd64" on x32. It
has to be DEB_HOST_ARCH. Changing it to DEB_HOST_ARCH fixes the problem for me.

For consistency, I would also fix the use here:

# Cross building requires stack direction instruction
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

Adrian

#1006530#25
Date:
2022-05-04 16:16:28 UTC
From:
To:
Thanks John for researching this!

Since you are close to solving it, would you like to finalize it by
submitting a MR at
https://salsa.debian.org/mariadb-team/mariadb-server?

https://salsa.debian.org/mariadb-team/mariadb-server/-/wikis/Contributing-to-MariaDB-packaging-in-Debian

#1006530#30
Date:
2022-05-07 13:37:58 UTC
From:
To:
Hi Otto!

I think the change is trivial enough that you can make it yourself. It
will probably take me longer to read through the howto and prepare a proper
pull request than it takes you just to fix the issue.

So, please go ahead.

Thanks,
Adrian

#1006530#35
Date:
2022-05-23 05:19:02 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
mariadb-10.6, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1006530@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Otto Kekäläinen <otto@debian.org> (supplier of updated mariadb-10.6 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 22 May 2022 16:44:02 -0700
Source: mariadb-10.6
Binary: libmariadb-dev libmariadb-dev-compat libmariadb3 libmariadbd19 libmariadbd-dev mariadb-common mariadb-client-core-10.6 mariadb-client-10.6 mariadb-server-core-10.6 mariadb-server-10.6 mariadb-server mariadb-client mariadb-backup mariadb-plugin-connect mariadb-plugin-s3 mariadb-plugin-rocksdb mariadb-plugin-oqgraph mariadb-plugin-mroonga mariadb-plugin-spider mariadb-plugin-gssapi-server mariadb-plugin-gssapi-client mariadb-plugin-cracklib-password-check mariadb-test mariadb-test-data
Architecture: source
Version: 1:10.6.8-1
Distribution: unstable
Urgency: medium
Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Changed-By: Otto Kekäläinen <otto@debian.org>
Description:
 libmariadb-dev - MariaDB database development files
 libmariadb-dev-compat - MariaDB Connector/C, compatibility symlinks
 libmariadb3 - MariaDB database client library
 libmariadbd-dev - MariaDB embedded database, development files
 libmariadbd19 - MariaDB embedded database, shared library
 mariadb-backup - Backup tool for MariaDB server
 mariadb-client - MariaDB database client (metapackage depending on the latest vers
 mariadb-client-10.6 - MariaDB database client binaries
 mariadb-client-core-10.6 - MariaDB database core client binaries
 mariadb-common - MariaDB common configuration files
 mariadb-plugin-connect - Connect storage engine for MariaDB
 mariadb-plugin-cracklib-password-check - CrackLib Password Validation Plugin for MariaDB
 mariadb-plugin-gssapi-client - GSSAPI authentication plugin for MariaDB client
 mariadb-plugin-gssapi-server - GSSAPI authentication plugin for MariaDB server
 mariadb-plugin-mroonga - Mroonga storage engine for MariaDB
 mariadb-plugin-oqgraph - OQGraph storage engine for MariaDB
 mariadb-plugin-rocksdb - RocksDB storage engine for MariaDB
 mariadb-plugin-s3 - Amazon S3 archival storage engine for MariaDB
 mariadb-plugin-spider - Spider storage engine for MariaDB
 mariadb-server - MariaDB database server (metapackage depending on the latest vers
 mariadb-server-10.6 - MariaDB database server binaries
 mariadb-server-core-10.6 - MariaDB database core server files
 mariadb-test - MariaDB database regression test suite
 mariadb-test-data - MariaDB database regression test suite - data files
Closes: 1006530
Changes:
 mariadb-10.6 (1:10.6.8-1) unstable; urgency=medium
 .
   * New upstream version 10.6.8. Includes security fixes for
   - CVE-2022-27376
   - CVE-2022-27377
   - CVE-2022-27378
   - CVE-2022-27379
   - CVE-2022-27380
   - CVE-2022-27381
   - CVE-2022-27382
   - CVE-2022-27383
   - CVE-2022-27384
   - CVE-2022-27386
   - CVE-2022-27387
   - CVE-2022-27444
   - CVE-2022-27445
   - CVE-2022-27446
   - CVE-2022-27447
   - CVE-2022-27448
   - CVE-2022-27449
   - CVE-2022-27451
   - CVE-2022-27452
   - CVE-2022-27455
   - CVE-2022-27456
   - CVE-2022-27457
   - CVE-2022-27458
 .
   [ Daniel Black ]
   * Move client programs to client package from MariaDB server package
 .
   [ Tuukka Pasanen ]
   * MDEV-12275: Add switch '--silent' to SySV init upgrade
   * Allow to use Perl DBD::mysl with mariadb-report (MDEV-28376)
 .
   [ Andreas Hasenack ]
   * Disable LTO on Ubuntu
 .
   [ Faustin Lammler ]
   * Use archive.mariadb.org as official watch source
 .
   [ Laurent Bigonville ]
   * Fix pmem availability check (Closes: #1006530)
 .
   [ Otto Kekäläinen ]
   * Update breaks/replaces to accommodate the moved mariadb-binlog et al
   * Use pmem also on riscv64
   * Add Bulgarian and Chinese translations for error messages
   * Use proper pid namespace
   * Add upstream PR#2129 to fix wsrep_sst_backup packaging
   * Deb: Move my_print_defaults to MariaDB client core package
   * Deb: Ensure the not-installed list is up-to-date
   * Install all available man pages in appropriate packages
Checksums-Sha1:
 684e0ebe098a64304abc312bae061b7b3485eba7 4818 mariadb-10.6_10.6.8-1.dsc
 0fd2ed9e95ccbbc7299ba6d6945aad45a0e9332c 85544534 mariadb-10.6_10.6.8.orig.tar.gz
 078f745737f282182268cc4b4ddff58ae8ce9060 195 mariadb-10.6_10.6.8.orig.tar.gz.asc
 3452fa72aa69de3f2f431a07b0e40b80cde7cf37 224832 mariadb-10.6_10.6.8-1.debian.tar.xz
 24bfd40d26902e714dff063117c662ec2bcd5f9c 9307 mariadb-10.6_10.6.8-1_source.buildinfo
Checksums-Sha256:
 d4f56e95835edb4e0e2f49818b7fd6abf42cd08aae741c9e52bb4292a3a25668 4818 mariadb-10.6_10.6.8-1.dsc
 713abb0b937083291fd9ac0f6377a6b55d847d911e5793fe84953cc2e58e07e1 85544534 mariadb-10.6_10.6.8.orig.tar.gz
 1c87d228854a5c2fa22975ec94682667358a2d624c94698f842524182d9c0958 195 mariadb-10.6_10.6.8.orig.tar.gz.asc
 457af5cee8ddd48d9386760266458eb466bb47eb2338974834c3c0990ea9dfc7 224832 mariadb-10.6_10.6.8-1.debian.tar.xz
 6d3848d407f527fff5398f9d67355852641618f5b4e5369484fd0e79067116bb 9307 mariadb-10.6_10.6.8-1_source.buildinfo
Files:
 db03e8dc52a52fb22f5fa0e273a58ef0 4818 database optional mariadb-10.6_10.6.8-1.dsc
 02812560704bbfab0739b0016a777699 85544534 database optional mariadb-10.6_10.6.8.orig.tar.gz
 a29e58fd38db9a5e7aa3efd5f855161d 195 database optional mariadb-10.6_10.6.8.orig.tar.gz.asc
 49d191826bd743353318e8a9079701a8 224832 database optional mariadb-10.6_10.6.8-1.debian.tar.xz
 0e46acc9c02af308e1d5333e3ac573be 9307 database optional mariadb-10.6_10.6.8-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmbRSsR88dMO0U+RvvthEn87o2ogFAmKLFmEACgkQvthEn87o
2ohopxAApxaTsXgnghVCqtRIbGqKvmJlVxFmpjZF30Um3HTmkGl8uQYNfTxQTkPw
XEGEjLh7u/QuHbyFbZhoOojztLGO5dTNrM38sIYAou7NkbbY+2cloGbNrRxwZcIe
jZJ9FW3zDpgbBlkC3znQMfRxz+bjAXDouvMEpwOeq3quKP2M3puqVRbIrh7xT7ab
Jmsb8ShTcxA3TuiIr8JHsWp5woy+97T2fplkLhcakzjbOGeOPhHL6WTdPLzbcITk
yIntGemLTHITN1eLfgz80ijrtTbrBiqlbcbh/U6zSNCS+Rfe0oEJBe+5PZG5Xxhb
8ELj0yV2kZdkeNNsnUiBgDHZqdPDeUjamyuOkkbF+4rdg7DlAJgYUQiJ6NToK1Be
ZGp3scGM7NYL7VTNtwkoyoV5HpVTfgq7WPe4t4iMsiHb+l8F5JIWxlTHikCtAz/S
S4jnfzV7rYagsBv3X8c5i0DDb9fdPjTww2soj37fB+ac/SEaaM7ZMN+I6ANchdSI
bsgpYek5cNqPTwMpasOnRE0PM3JXYTi195Z943B/iOmLEivi16JPsJ/6FHj2Edcu
htr7elFC813KqpwcbdeUyS96vqVzFVkcBv47OTun0RzBZ9sT6Le/Smb3M5FzKe3N
UpbKnsk3szY1PYb6PvJbrNtK0FHL2Ww5jlOYOjqASXlaNDUAyN4=
=Guhe
-----END PGP SIGNATURE-----

#1006530#40
Date:
2022-05-25 04:49:18 UTC
From:
To:
Thanks!

I just wanted to follow up and notify that x32 now indeed builds and
test suite passed too:
https://buildd.debian.org/status/package.php?p=mariadb-10.6