arm编译mysql及xtrabackup报错

编译步骤

cmake -DWITH_BOOST=../boost_1_59_0 -DBUILD_CONFIG=mysql_release -DCMAKE_INSTALL_PREFIX=/usr/local/mysql  -DIGNORE_AIO_CHECK=1   -DWITH_READLINE=0 -DWITH_EDITLINE=bundled -DWITH_ROCKSDB=0 -DWITH_TOKUDB=0 --build=aarch64 .

make

make install

报错如下

/root/percona-xtrabackup-2.4.15/storage/innobase/fts/fts0fts.cc: 在函数‘dberr_t fts_sync_index(fts_sync_t*, fts_index_cache_t*)’中:
/root/percona-xtrabackup-2.4.15/storage/innobase/fts/fts0fts.cc:4466:1: 错误:无法分离指令
 }
 ^
(insn 675 2087 2091 (parallel [
            (set (reg:DI 0 x0 [orig:149 D.103881 ] [149])
                (plus:DI (mem/v:DI (reg/f:DI 1 x1 [orig:101 D.103894 ] [101]) [-1  S8 A64])
                    (const_int 536870912 [0x20000000])))
            (set (mem/v:DI (reg/f:DI 1 x1 [orig:101 D.103894 ] [101]) [-1  S8 A64])
                (unspec_volatile:DI [
                        (mem/v:DI (reg/f:DI 1 x1 [orig:101 D.103894 ] [101]) [-1  S8 A64])
                        (const_int 536870912 [0x20000000])
                        (const_int 5 [0x5])
                    ] UNSPECV_ATOMIC_OP))
            (clobber (reg:CC 66 cc))
            (clobber (reg:SI 2 x2))
        ]) /root/percona-xtrabackup-2.4.15/storage/innobase/include/sync0rw.ic:309 1856 {atomic_add_fetchdi}
     (expr_list:REG_UNUSED (reg:CC 66 cc)
        (expr_list:REG_UNUSED (reg:SI 2 x2)
            (nil))))
/root/percona-xtrabackup-2.4.15/storage/innobase/fts/fts0fts.cc:4466:1: 编译器内部错误:在 final_scan_insn 中,于 final.c:2897
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

解决方法:

修改源码目录下storage/innobase/CMakeLists.txt文件
匹配该内容,如果没有就添加:

IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
  # Bug was fixed in GCC 5.2, so workaround only needed < 5.2
  EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
                  OUTPUT_VARIABLE GCC_VERSION)
  IF(GCC_VERSION VERSION_LESS 5.2)
    INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
    ADD_COMPILE_FLAGS(
      btr/btr0btr.cc
      btr/btr0cur.cc
      buf/buf0buf.cc
      gis/gis0sea.cc
      handler/handler0alter.cc
      mtr/mtr0mtr.cc
      row/row0merge.cc
      row/row0mysql.cc
      row/row0trunc.cc
      srv/srv0srv.cc
      fts/fts0fts.cc
      COMPILE_FLAGS "-O0"
      )
  ENDIF()
ENDIF()

你可能感兴趣的:(arm编译mysql及xtrabackup报错)