xtrabackup 1.6.3安装出现cc1: error: unrecognized command line option "-fdiagnostics-show-option"

来源:互联网 发布:pu校园软件 编辑:程序博客网 时间:2024/05/16 16:11

今天没事,就重新下了一个xtrabackup 1.6.3来玩一下,公司用这个工具不多,在这个版本安装时出现一个问题

首先这个版本必须要下载   libtar-1.2.11.tar.gz和 mysql-5.1.56.tar.gz 
按说明一次下载两个版本到/home/zhanghong/xtrabackup/xtrabackup-1.6.3目录下,再次运行build.sh

出现

cc1: error: unrecognized command line option "-fdiagnostics-show-option"


后来查看gcc版本
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)

gcc在3.4之后就已经去掉了-fdiagnostics-show-option


打开Makefile,

CFLAGS += -O3 -g -DXTRABACKUP_VERSION=\"$(XTRABACKUP_VERSION)\" -pedantic -Wall -Wundef -Wshadow  -fdiagnostics-show-optio
n  -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Wformat -Wno-format-nonliteral -Wno-format-security -Wno-long-long
-Wmissing-declarations  -Wno-redundant-decls --std=gnu99


去掉-fdiagnostics-show-option


重新build


成功;


总结一下使用心得,感觉xtra比 innobackup更有优势,使用起来更加人性化!