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

Compile error in debug mode on s390x (srw_lock.cc)

Details

    Description

      Tried to compile the server in debug mode on s390x but I ran into a compile error in srw_lock.cc (https://github.com/MariaDB/server/blob/10.11/storage/innobase/sync/srw_lock.cc#L121).

      [ 65%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/sync/srw_lock.cc.o
      /home/tester/server/storage/innobase/sync/srw_lock.cc: In function ?bool xtest()?:
      /home/tester/server/storage/innobase/sync/srw_lock.cc:121:17: error: ?__builtin_ttest? was not declared in this scope; did you mean ?__builtin_tend??
        121 |     _HTM_STATE (__builtin_ttest ()) == _HTM_TRANSACTIONAL;
            |                 ^~~~~~~~~~~~~~~
            |                 __builtin_tend
      /home/tester/server/storage/innobase/sync/srw_lock.cc:121:5: error: ?_HTM_STATE? was not declared in this scope
        121 |     _HTM_STATE (__builtin_ttest ()) == _HTM_TRANSACTIONAL;
            |     ^~~~~~~~~~
      /home/tester/server/storage/innobase/sync/srw_lock.cc:121:40: error: ?_HTM_TRANSACTIONAL? was not declared in this scope
        121 |     _HTM_STATE (__builtin_ttest ()) == _HTM_TRANSACTIONAL;
            |                                        ^~~~~~~~~~~~~~~~~~
      make[2]: *** [storage/innobase/CMakeFiles/innobase.dir/build.make:1406: storage/innobase/CMakeFiles/innobase.dir/sync/srw_lock.cc.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:5108: storage/innobase/CMakeFiles/innobase.dir/all] Error 2
      make: *** [Makefile:166: all] Error 2
      

      Attachments

        Issue Links

          Activity

            Nayana Nayana added a comment - srw_lock.cc file is added in v10.6 . https://github.com/MariaDB/server/commit/1fdc161d8faeb18acf0ccea9b33ad64f0b596f79#diff-13da78db7fb5204cfaa088afbd124d86be0b8f05eb1ded19b0a00fcd20576206
            danblack Daniel Black added a comment -

            quite right. Looking forward to PR.

            danblack Daniel Black added a comment - quite right. Looking forward to PR.
            Nayana Nayana added a comment - PR raised - https://github.com/MariaDB/server/pull/2745

            Thank you. Based on what I found, the __builtin_tx_nesting_depth() is specific to the s390x (not to POWER) and it was introduced at the same time with the htm target attribute, in GCC 6.5 (or possibly in some earlier release of GCC 6; the documentation I found was for GCC 6.5).

            By the way, there is a unit test innodb_sync-t that should exercise this.

            cmake -DWITH_UNIT_TESTS=ON .
            cmake --build .
            storage/innobase/unittest/innodb_sync-t
            cd mysql-test
            ./mtr --parallel=auto --suite=unit
            

            The unit test program innodb_sync-t is run by the test unit.innodb_sync.

            marko Marko Mäkelä added a comment - Thank you. Based on what I found, the __builtin_tx_nesting_depth() is specific to the s390x (not to POWER) and it was introduced at the same time with the htm target attribute, in GCC 6.5 (or possibly in some earlier release of GCC 6; the documentation I found was for GCC 6.5). By the way, there is a unit test innodb_sync-t that should exercise this. cmake -DWITH_UNIT_TESTS=ON . cmake --build . storage/innobase/unittest/innodb_sync-t cd mysql-test ./mtr --parallel=auto --suite=unit The unit test program innodb_sync-t is run by the test unit.innodb_sync .
            Nayana Nayana added a comment -

            Executed above steps and all tests are passing.

            Nayana Nayana added a comment - Executed above steps and all tests are passing.

            People

              marko Marko Mäkelä
              vivkong Vivian Kong
              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.