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

10.1.24 does not compile on architectures without 64-bit atomics

Details

    Description

      Attempting to compile mariadb 10.1.24 on 32-bit MIPS fails with this error:

      In file included from /«PKGBUILDDIR»/storage/innobase/lock/lock0wait.cc:29:0:
      /«PKGBUILDDIR»/storage/innobase/include/srv0mon.h:649:8: error: 'ib_mutex_t' does not name a type
       extern ib_mutex_t monitor_mutex;
              ^~~~~~~~~~
      storage/innobase/CMakeFiles/innobase.dir/build.make:1334: recipe for target 'storage/innobase/CMakeFiles/innobase.dir/lock/lock0wait.cc.o' failed
      

      This appears to be caused by this change from MDEV-12674:
      https://github.com/MariaDB/server/commit/ff166093741df0bd91ba24e02714ef882073c51b#diff-088335ea9de1d271e432c61d4c8c12e6L39

      Adding the missing #include "sync0types.h" again fixes the issue.

      Attachments

        Issue Links

          Activity

            This needs to be backported to 10.0.31 as well to get security updates into Debian and Ubuntu, where .31 stopped building on certain platforms. Here the regression is visible on PowerPC (the old one, not 64-bit): https://bugs.launchpad.net/ubuntu/+source/mariadb-10.0/+bug/1698689

            cvicentiu will look into the issue later this week

            otto Otto Kekäläinen added a comment - This needs to be backported to 10.0.31 as well to get security updates into Debian and Ubuntu, where .31 stopped building on certain platforms. Here the regression is visible on PowerPC (the old one, not 64-bit): https://bugs.launchpad.net/ubuntu/+source/mariadb-10.0/+bug/1698689 cvicentiu will look into the issue later this week

            The reason why xtradb works even without the # include "sync0types.h" is due to how "univ.i" (included by srv0mon.h) includes other files and how those files subsequently include "sync0types.h". This difference in behaviour comes from the HOTBACKUP extention that Percona has added to xtradb.

            cvicentiu Vicențiu Ciorbaru added a comment - The reason why xtradb works even without the # include "sync0types.h" is due to how "univ.i" (included by srv0mon.h ) includes other files and how those files subsequently include "sync0types.h" . This difference in behaviour comes from the HOTBACKUP extention that Percona has added to xtradb.

            otto, sorry, I missed your request to backport this to 10.0. I just did that under MDEV-13705.

            marko Marko Mäkelä added a comment - otto , sorry, I missed your request to backport this to 10.0. I just did that under MDEV-13705 .

            jcowgill, are you able to compile 10.2.7 without any patches related to this? This fix was merged to 10.2 (potentially incorrectly; that is why I ask) a day after your comment, and first released in 10.2.7.

            marko Marko Mäkelä added a comment - jcowgill , are you able to compile 10.2.7 without any patches related to this? This fix was merged to 10.2 (potentially incorrectly; that is why I ask) a day after your comment, and first released in 10.2.7.
            jcowgill James Cowgill added a comment -

            @marko, I can confirm that this particular bug is fixed in 10.2.7 (the original error goes away). However, I can't build 10.2.7 on mips without any patches because there are some other atomics issues. I needed a patch similar to this one applied in Debian to build it:
            https://sources.debian.net/src/mariadb-10.1/10.1.25-1/debian/patches/c11_atomics.patch/

            jcowgill James Cowgill added a comment - @marko, I can confirm that this particular bug is fixed in 10.2.7 (the original error goes away). However, I can't build 10.2.7 on mips without any patches because there are some other atomics issues. I needed a patch similar to this one applied in Debian to build it: https://sources.debian.net/src/mariadb-10.1/10.1.25-1/debian/patches/c11_atomics.patch/

            People

              marko Marko Mäkelä
              jcowgill James Cowgill
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.