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

2022-05-24 Thread Otto Kekäläinen
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



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

2022-05-07 Thread John Paul Adrian Glaubitz
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,
Adrian

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



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

2022-05-04 Thread Otto Kekäläinen
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



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

2022-05-04 Thread John Paul Adrian Glaubitz
Hi!

> On Tue, 15 Mar 2022 15:22:15 +1100 Daniel Black  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

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



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

2022-05-02 Thread Laurent Bigonville

On Tue, 15 Mar 2022 15:22:15 +1100 Daniel Black  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




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

2022-02-26 Thread Otto Kekäläinen
Source: mariadb-10.6
Version: 1:10.6.7-1
Tags: confirmed, help, ftbfs
User: debian-...@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=x32=1%3A10.6.7-2%7Eexp1=1645782519=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
'/<>/builddir/CMakeFiles/CMakeTmp'
/usr/bin/gmake  -f CMakeFiles/cmTC_ef995.dir/build.make
CMakeFiles/cmTC_ef995.dir/build
gmake[3]: Entering directory '/<>/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=/<>=.
-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
/<>/builddir/CMakeFiles/CMakeTmp/src.c
/<>/builddir/CMakeFiles/CMakeTmp/src.c: In function ‘main’:
/<>/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 '/<>/builddir/CMakeFiles/CMakeTmp'
gmake[2]: *** [Makefile:127: cmTC_ef995/fast] Error 2
gmake[2]: Leaving directory '/<>/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=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.