Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33429

Compilation of MariaDB 10.11.7 fails on arm32, sizeof(MYSQL) is wrong

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 10.11.7
    • 10.11.8
    • Compiling
    • None
    • Ubuntu 20.04 - 32 bit

    Description

      After compiling mariadb 10.11.7 source with

      cmake . -DINSTALL_MYSQLTESTDIR=
      make
      make package

      make package fails

      Pls advice?

      [  0%] Built target libfmt
      [  0%] Built target abi_check
      ...
      [ 99%] Built target mariadb-admin
      [100%] Built target mariadb-conv
      [100%] Built target my_print_defaults
      [100%] Built target resolveip
      [100%] Built target innochecksum
      [100%] Built target mariadbd-safe-helper
      [100%] Built target replace
      [100%] Built target resolve_stack_dump
      [100%] Built target mariadb-waitpid
      [100%] Built target perror
      [100%] Built target bug25714
      [100%] Building C object tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o
      In file included from /ssd/mariadb-10.11.7/tests/mysql_client_fw.c:16,
                       from /ssd/mariadb-10.11.7/tests/mysql_client_test.c:38:
      /ssd/mariadb-10.11.7/tests/mysql_client_fw.c: In function ‘main’:
      /ssd/mariadb-10.11.7/include/my_global.h:384:18: error: size of array ‘compile_time_assert’ is negative
        384 |     typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \
            |                  ^~~~~~~~~~~~~~~~~~~
      /ssd/mariadb-10.11.7/tests/mysql_client_fw.c:1438:3: note: in expansion of macro ‘compile_time_assert’
       1438 |   compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656);
            |   ^~~~~~~~~~~~~~~~~~~
      make[2]: *** [tests/CMakeFiles/mariadb-client-test.dir/build.make:63: tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:10675: tests/CMakeFiles/mariadb-client-test.dir/all] Error 2
      make: *** [Makefile:163: all] Error 2
      

      Attachments

        Issue Links

          Activity

            Follow-up: I imported 10.11.8 in Debian, dropped the temporary patch and uploaded with the result that x32 is now failing (it wasn't failing on the previous 10.11.7-5 revision):

            https://buildd.debian.org/status/fetch.php?pkg=mariadb&arch=x32&ver=1%3A10.11.8-1&stamp=1716020141&raw=0

            [ 67%] Building C object tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o
            cd /<<PKGBUILDDIR>>/builddir/tests && /usr/bin/cc -DHAVE_CONFIG_H -DMYSQL_CLIENT -D_FILE_OFFSET_BITS=64 -I/<<PKGBUILDDIR>>/libmariadb/include -I/<<PKGBUILDDIR>>/builddir/libmariadb/include -I/<<PKGBUILDDIR>>/wsrep-lib/include -I/<<PKGBUILDDIR>>/wsrep-lib/wsrep-API/v26 -I/<<PKGBUILDDIR>>/builddir/include -I/<<PKGBUILDDIR>>/include/providers -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/client -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -O2 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing  -Wno-uninitialized -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wdeclaration-after-statement -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Wvla -Wwrite-strings -std=gnu99   -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o -MF CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o.d -o CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o -c /<<PKGBUILDDIR>>/tests/mysql_client_test.c
            In file included from /<<PKGBUILDDIR>>/tests/mysql_client_fw.c:16,
                             from /<<PKGBUILDDIR>>/tests/mysql_client_test.c:38:
            /<<PKGBUILDDIR>>/tests/mysql_client_fw.c: In function ‘main’:
            /<<PKGBUILDDIR>>/include/my_global.h:384:18: error: size of array ‘compile_time_assert’ is negative
              384 |     typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \
                  |                  ^~~~~~~~~~~~~~~~~~~
            /<<PKGBUILDDIR>>/tests/mysql_client_fw.c:1442:3: note: in expansion of macro ‘compile_time_assert’
             1442 |   compile_time_assert(sizeof(MYSQL) == 1272);
                  |   ^~~~~~~~~~~~~~~~~~~
            make[4]: *** [tests/CMakeFiles/mariadb-client-test.dir/build.make:79: tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o] Error 1
            make[4]: Leaving directory '/<<PKGBUILDDIR>>/builddir'
            make[3]: *** [CMakeFiles/Makefile2:10668: tests/CMakeFiles/mariadb-client-test.dir/all] Error 2
            

            otto Otto Kekäläinen added a comment - Follow-up: I imported 10.11.8 in Debian, dropped the temporary patch and uploaded with the result that x32 is now failing (it wasn't failing on the previous 10.11.7-5 revision): https://buildd.debian.org/status/fetch.php?pkg=mariadb&arch=x32&ver=1%3A10.11.8-1&stamp=1716020141&raw=0 [ 67%] Building C object tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o cd /<<PKGBUILDDIR>>/builddir/tests && /usr/bin/cc -DHAVE_CONFIG_H -DMYSQL_CLIENT -D_FILE_OFFSET_BITS=64 -I/<<PKGBUILDDIR>>/libmariadb/include -I/<<PKGBUILDDIR>>/builddir/libmariadb/include -I/<<PKGBUILDDIR>>/wsrep-lib/include -I/<<PKGBUILDDIR>>/wsrep-lib/wsrep-API/v26 -I/<<PKGBUILDDIR>>/builddir/include -I/<<PKGBUILDDIR>>/include/providers -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/client -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -O2 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wdeclaration-after-statement -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Wvla -Wwrite-strings -std=gnu99 -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o -MF CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o.d -o CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o -c /<<PKGBUILDDIR>>/tests/mysql_client_test.c In file included from /<<PKGBUILDDIR>>/tests/mysql_client_fw.c:16, from /<<PKGBUILDDIR>>/tests/mysql_client_test.c:38: /<<PKGBUILDDIR>>/tests/mysql_client_fw.c: In function ‘main’: /<<PKGBUILDDIR>>/include/my_global.h:384:18: error: size of array ‘compile_time_assert’ is negative 384 | typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \ | ^~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/tests/mysql_client_fw.c:1442:3: note: in expansion of macro ‘compile_time_assert’ 1442 | compile_time_assert(sizeof(MYSQL) == 1272); | ^~~~~~~~~~~~~~~~~~~ make[4]: *** [tests/CMakeFiles/mariadb-client-test.dir/build.make:79: tests/CMakeFiles/mariadb-client-test.dir/mysql_client_test.c.o] Error 1 make[4]: Leaving directory '/<<PKGBUILDDIR>>/builddir' make[3]: *** [CMakeFiles/Makefile2:10668: tests/CMakeFiles/mariadb-client-test.dir/all] Error 2

            for reference

            X32 is an ABI for amd64/x86_64 CPUs using 32-bit integers, longs and pointers.

            https://wiki.debian.org/X32Port

            serg Sergei Golubchik added a comment - for reference X32 is an ABI for amd64/x86_64 CPUs using 32-bit integers, longs and pointers. https://wiki.debian.org/X32Port

            otto, could you please open a new bug report for this? Thanks

            serg Sergei Golubchik added a comment - otto , could you please open a new bug report for this? Thanks

            Sure, filed now as MDEV-34195

            otto Otto Kekäläinen added a comment - Sure, filed now as MDEV-34195

            Applied https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/d702720f56598f57354dd99421769d69966dbaae on 10.6.18 before upload to Ubuntu. Without it armhf builds failed.

            otto Otto Kekäläinen added a comment - Applied https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/d702720f56598f57354dd99421769d69966dbaae on 10.6.18 before upload to Ubuntu. Without it armhf builds failed.

            People

              serg Sergei Golubchik
              vincent.lemoine@iwa-consult.nl V H Lemoine
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.