Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

31 views
Skip to first unread message

Otto Kekäläinen

unread,
Feb 26, 2022, 6:30:03 PM2/26/22
to
Source: mariadb-10.6
Version: 1:10.6.7-1
Tags: confirmed, help, ftbfs
User: debia...@lists.debian.org
Usertags: x32

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.

Daniel Black

unread,
Mar 15, 2022, 12:30:03 AM3/15/22
to
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.

Laurent Bigonville

unread,
May 2, 2022, 3:20:03 AM5/2/22
to
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

John Paul Adrian Glaubitz

unread,
May 4, 2022, 5:00:03 AM5/4/22
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

--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

Otto Kekäläinen

unread,
May 4, 2022, 12:30:04 PM5/4/22
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

John Paul Adrian Glaubitz

unread,
May 7, 2022, 9:40:03 AM5/7/22
to
Hi Otto!

On 5/4/22 18:16, Otto Kekäläinen wrote:
> 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?

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,

Otto Kekäläinen

unread,
May 25, 2022, 1:00:03 AM5/25/22
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
0 new messages