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

compilation failure on centos74-aarch64

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 10.5
    • 10.5.4
    • Compiling
    • None

    Description

      /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.5.4/storage/innobase/include/buf0buf.h: In member function ‘rw_lock_t* buf_pool_t::page_hash_lock(ulint) [with bool exclusive = true; ulint = long unsigned int]’:
      /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.5.4/storage/innobase/include/buf0buf.h:1708:3:error: could not split insn
         }
         ^
      (insn 148 867 534 (parallel [
                  (set (mem/v:SI (reg/v/f:DI 19 x19 [orig:73 latch ] [73]) [-1  S4 A32])
                      (unspec_volatile:SI [
                              (plus:SI (mem/v:SI (reg/v/f:DI 19 x19 [orig:73 latch ] [73]) [-1  S4 A32])
                                  (const_int 536870912 [0x20000000]))
                              (const_int 4 [0x4])
                          ] UNSPECV_ATOMIC_OP))
                  (clobber (reg:CC 66 cc))
                  (clobber (reg:SI 1 x1))
                  (clobber (reg:SI 0 x0))
              ]) /usr/include/c++/4.8.2/bits/atomic_base.h:614 1802 {atomic_addsi}
           (expr_list:REG_UNUSED (reg:CC 66 cc)
              (expr_list:REG_UNUSED (reg:SI 1 x1)
                  (expr_list:REG_UNUSED (reg:SI 0 x0)
                      (nil)))))
      

      Attachments

        Issue Links

          Activity

            I think that we should primarily address this by trying to update the compiler, like we recently did on POWER.

            If that is really impossible, we could add some preprocessor magic to lower the optimization level or to simplify some code.

            The build failure is most likely related to the increased the use of inline functions that access std::atomic data, in MDEV-15053.

            marko Marko Mäkelä added a comment - I think that we should primarily address this by trying to update the compiler, like we recently did on POWER. If that is really impossible, we could add some preprocessor magic to lower the optimization level or to simplify some code. The build failure is most likely related to the increased the use of inline functions that access std::atomic data, in MDEV-15053 .

            marko and serg Which gcc version should I go with? We don't want to introduce new incompatibilities, but this might be a chance to have at least one builder with a much more modern toolchain.

            For reference, on the centos74-aarch64-build VM we currently have: gcc 4.8.5-16, binutils 2.27-11, and cmake 3.14.0

            dbart Daniel Bartholomew added a comment - marko and serg Which gcc version should I go with? We don't want to introduce new incompatibilities, but this might be a chance to have at least one builder with a much more modern toolchain. For reference, on the centos74-aarch64-build VM we currently have: gcc 4.8.5-16, binutils 2.27-11, and cmake 3.14.0
            dbart Daniel Bartholomew added a comment - - edited

            Tried a test build with cmake . -DBUILD_CONFIG=mysql_release -DCMAKE_COMMAND_DEP=cmake -DRPM=centos74 -O2, but that didn't work.

            Same error as in the description.

            I'll try some builds editing out a workaround to see if that helps, and I'll also try with a newer gcc.

            dbart Daniel Bartholomew added a comment - - edited Tried a test build with cmake . -DBUILD_CONFIG=mysql_release -DCMAKE_COMMAND_DEP=cmake -DRPM=centos74 -O2 , but that didn't work. Same error as in the description. I'll try some builds editing out a workaround to see if that helps, and I'll also try with a newer gcc.

            When using gcc 4.9.4, the main part of the build completes, but the cpack packaging step fails with the following:

            *** ERROR: No build ID note found in /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM/mariadb-10.5.4-linux-aarch64/backup/usr/bin/mariadb-backup
            error: Bad exit status from /var/tmp/rpm-tmp.e9nNab (%install)
                Bad exit status from /var/tmp/rpm-tmp.e9nNab (%install)
             ***
            CPackRPM:Debug:    - /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM/rpmbuildMariaDB-backup.out
            CPackRPM:Debug: *** Building target platforms: aarch64
            Building for target aarch64
            Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XJe7pa
            Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.e9nNab
            extracting debug info from /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM/mariadb-10.5.4-linux-aarch64/backup/usr/bin/mariadb-backup
             
             
            RPM build errors:
             ***
            CMake Error at /usr/local/share/cmake-3.14/Modules/Internal/CPack/CPackRPM.cmake:1799 (message):
              RPM package was not generated!
              /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM
            Call Stack (most recent call first):
              /usr/local/share/cmake-3.14/Modules/Internal/CPack/CPackRPM.cmake:1870 (cpack_rpm_generate_package)
              /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/cmake/Internal/CPack/CPackRPM.cmake:54 (include)
            

            dbart Daniel Bartholomew added a comment - When using gcc 4.9.4, the main part of the build completes, but the cpack packaging step fails with the following: *** ERROR: No build ID note found in /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM/mariadb-10.5.4-linux-aarch64/backup/usr/bin/mariadb-backup error: Bad exit status from /var/tmp/rpm-tmp.e9nNab (%install) Bad exit status from /var/tmp/rpm-tmp.e9nNab (%install) *** CPackRPM:Debug: - /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM/rpmbuildMariaDB-backup.out CPackRPM:Debug: *** Building target platforms: aarch64 Building for target aarch64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XJe7pa Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.e9nNab extracting debug info from /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM/mariadb-10.5.4-linux-aarch64/backup/usr/bin/mariadb-backup     RPM build errors: *** CMake Error at /usr/local/share/cmake-3.14/Modules/Internal/CPack/CPackRPM.cmake:1799 (message): RPM package was not generated! /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/_CPack_Packages/Linux/RPM Call Stack (most recent call first): /usr/local/share/cmake-3.14/Modules/Internal/CPack/CPackRPM.cmake:1870 (cpack_rpm_generate_package) /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/build/cmake/Internal/CPack/CPackRPM.cmake:54 (include)

            Looks like the errors are fixed in the latest pushes into 10.5: https://buildbot.askmonty.org/buildbot/builders/kvm-rpm-centos74-aarch64/builds/8265

            dbart Daniel Bartholomew added a comment - Looks like the errors are fixed in the latest pushes into 10.5: https://buildbot.askmonty.org/buildbot/builders/kvm-rpm-centos74-aarch64/builds/8265

            I'm guessing this commit from marko is what fixed it.

            dbart Daniel Bartholomew added a comment - I'm guessing this commit from marko is what fixed it.

            Yes, it seems that MDEV-15053 caused this build failure by making more code inline and by expanding the use of std:atomic. Apparently, that resulted in some expanded functions being too large for the old compiler to handle on the ARMv8 target.

            MDEV-22877 probably fixed this by replacing the inline function buf_page_hash_get_locked() and by eliminating some redundant invocations of buf_pool_t::page_hash_lock<false>(). Those calls were never needed when the caller is already holding buf_pool.mutex.

            marko Marko Mäkelä added a comment - Yes, it seems that MDEV-15053 caused this build failure by making more code inline and by expanding the use of std:atomic . Apparently, that resulted in some expanded functions being too large for the old compiler to handle on the ARMv8 target. MDEV-22877 probably fixed this by replacing the inline function buf_page_hash_get_locked() and by eliminating some redundant invocations of buf_pool_t::page_hash_lock<false>() . Those calls were never needed when the caller is already holding buf_pool.mutex .

            People

              marko Marko Mäkelä
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.