Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 10.0.22, 10.1.9
    • Compiling
    • None
    • 10.0.22

    Description

      See patches from this thread

      1. XtraDB aborts compilation when it cannot be compiled (unsupported system), even if XtraDB is disabled from cmake command line.
      2. InnoDB relies on CHECK_C_SOURCE_RUNS which doesn't work when cross-compiling

      Attachments

        Issue Links

          Activity

            serg Sergei Golubchik created issue -

            Hi

            It seems BR2_ARCH_HAS_ATOMICS cannot be used, because for example on 32bits architectures some atomic operations may not be available even though BR2_ARCH_HAS_ATOMICS is set to true. Therefore your solution should be used.

            However I just realised that CHECK_C_SOURCE_RUNS should never be invoked by this script in buildroot because it's enclosed in

            IF(NOT CMAKE_CROSSCOMPILING)
            [...]
            ENDIF

            (https://github.com/MariaDB/server/blob/10.1/storage/innobase/CMakeLists.txt, line #75).

            Is -DCMAKE_CROSSCOMPILING supposed to passed when invoking cmake or is it supposed to be determined automatically?

            Sylvain Sylvain Raybaud added a comment - Hi It seems BR2_ARCH_HAS_ATOMICS cannot be used, because for example on 32bits architectures some atomic operations may not be available even though BR2_ARCH_HAS_ATOMICS is set to true. Therefore your solution should be used. However I just realised that CHECK_C_SOURCE_RUNS should never be invoked by this script in buildroot because it's enclosed in IF(NOT CMAKE_CROSSCOMPILING) [...] ENDIF ( https://github.com/MariaDB/server/blob/10.1/storage/innobase/CMakeLists.txt , line #75). Is -DCMAKE_CROSSCOMPILING supposed to passed when invoking cmake or is it supposed to be determined automatically?
            ratzpo Rasmus Johansson (Inactive) made changes -
            Field Original Value New Value
            Sprint 10.0.22 [ 17 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Rank Ranked higher
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            I've fixed the "XtraDB not supported" error (it won't be issued if XtraDB is disabled).
            Won't do anything about CHECK_C_SOURCE_RUNS because they're under IF(NOT CMAKE_CROSSCOMPILING).

            According to https://cmake.org/cmake/help/v3.0/variable/CMAKE_CROSSCOMPILING.html the variable CMAKE_CROSSCOMPILING) is set by CMake automatically.

            serg Sergei Golubchik added a comment - I've fixed the "XtraDB not supported" error (it won't be issued if XtraDB is disabled). Won't do anything about CHECK_C_SOURCE_RUNS because they're under IF(NOT CMAKE_CROSSCOMPILING) . According to https://cmake.org/cmake/help/v3.0/variable/CMAKE_CROSSCOMPILING.html the variable CMAKE_CROSSCOMPILING) is set by CMake automatically.
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.0.22 [ 19700 ]
            Fix Version/s 10.1.9 [ 20301 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]

            Hi

            Thanks for the fix!

            When CMAKE_CROSSCOMPILING is set these tests are skipped indeed and HAVE_IB_GCC_ATOMIC_BUILTINS is not set. It triggers another build failure, at least when crosscompiling for arm in buildroot, that I've filed under MDEV-9002: https://mariadb.atlassian.net/browse/MDEV-9002

            Cheers,

            Sylvain

            Sylvain Sylvain Raybaud added a comment - Hi Thanks for the fix! When CMAKE_CROSSCOMPILING is set these tests are skipped indeed and HAVE_IB_GCC_ATOMIC_BUILTINS is not set. It triggers another build failure, at least when crosscompiling for arm in buildroot, that I've filed under MDEV-9002 : https://mariadb.atlassian.net/browse/MDEV-9002 Cheers, Sylvain
            Sylvain Sylvain Raybaud made changes -
            Sylvain Sylvain Raybaud added a comment - - edited

            I propose the attached patch (the idea of which was suggested by serg) to be able to automatically check for atomic intrinsics event when cross-compiling. mariadb-galera-02-fix_innodb_cmakelist.patch

            Sylvain Sylvain Raybaud added a comment - - edited I propose the attached patch (the idea of which was suggested by serg ) to be able to automatically check for atomic intrinsics event when cross-compiling. mariadb-galera-02-fix_innodb_cmakelist.patch
            serg Sergei Golubchik made changes -

            Thanks, I've done that too (not your patch verbatim, but similar).

            serg Sergei Golubchik added a comment - Thanks, I've done that too (not your patch verbatim, but similar).
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 71856 ] MariaDB v4 [ 149675 ]

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.