最后一步make出错
centos 6.8 x64 gcc 4.8.2 最后一步make出错了
g++ -std=c++11 -I/root/phxsql -I/root/phxsql/third_party/protobuf/include -I/root/phxsql/third_party/leveldb/include -I/root/phxsql/third_party/glog/include -Wall -g -fPIC -m64 -I/root/phxsql/include -I/root/phxsql/percona/include -I/root/phxsql/phxbinlogsvr/config -I/root/phxsql/phxbinlogsvr/core -I/root/phxsql/phxbinlogsvr/core/agent -I/root/phxsql/phxbinlogsvr/core/handler -I/root/phxsql/phxbinlogsvr/core/monitor -I/root/phxsql/phxbinlogsvr/core/monitor/base -I/root/phxsql/phxbinlogsvr/core/mysql -I/root/phxsql/phxbinlogsvr/core/paxos -I/root/phxsql/phxbinlogsvr/core/repl -I/root/phxsql/phxbinlogsvr/core/storage -I/root/phxsql/phxbinlogsvr/framework/phxrpc/client -I/root/phxsql/phxbinlogsvr/framework/phxrpc/svr -I/root/phxsql/phxbinlogsvr/framework/proto -I/root/phxsql/phxbinlogsvr/framework/rpccomm -I/root/phxsql/phxbinlogsvr/proto -I/root/phxsql/phxbinlogsvr/statistics -I/root/phxsql/phxcomm -I/root/phxsql/phxcomm/configparser -I/root/phxsql/phxcomm/configparser/inih-master -I/root/phxsql/phxcomm/configparser/inih-master/cpp -I/root/phxsql/phxcomm/log/phxglog -I/root/phxsql/phxcomm/log/phxlog -I/root/phxsql/phxcomm/net -I/root/phxsql/phxcomm/utils -I/root/phxsql/third_party/leveldb/include -I/root/phxsql/third_party/phxpaxos/include -I/root/phxsql/third_party/phxpaxos/plugin/include -I/root/phxsql/third_party/phxrpc -I/root/phxsql/third_party/protobuf/include -Werror -fPIC -fpermissive -shared -Werror -Wall -c -o phxbinlog_main.o phxbinlog_main.cpp
g++ phxrpc_phxbinlog_service.o phxrpc_phxbinlog_dispatcher.o phxbinlog_server_config.o phxbinlog_service_impl.o phxbinlog_server.o phxbinlog_main.o -o phxbinlogsvr_phxrpc -L/root/phxsql/third_party/phxpaxos/lib -L/root/phxsql/.lib -L/root/phxsql/third_party/protobuf/lib -L/root/phxsql/third_party/leveldb/lib/ -L/root/phxsql/third_party/glog/lib -L -L -L/root/phxsql/percona/libmysql -L/root/phxsql/third_party/colib/lib -static-libgcc -static-libstdc++ -Wl,--no-as-needed -lphxbinlogsvrclient_phxrpc -lphxbinlogsvrlogic -lphxbinlogsvrclient_base -lclientproto -lagent -leventagent -lagentrepl -lagentmonitor -leventhandler -lagentstatus -lmasteragent -lpaxosagentbase -lmasterhandler -lnet -lagentmonitorcomm -lmysqlcommand -lagentstorage -lphxbinlogstat -lgtidhandler -lphxbinlogproto -lphxbinlogconfig -lphxconfig -lconfigparser -lphxutils -lphxlog -lphxglog /root/phxsql/third_party/phxpaxos/lib/libphxpaxos_plugin.a /root/phxsql/third_party/phxpaxos/lib/libphxpaxos.a /root/phxsql/third_party/leveldb/lib//libleveldb.a /root/phxsql/third_party/protobuf/lib/libprotobuf.a /root/phxsql/percona/libmysql/libperconaserverclient.a -ldl -lrt -lz /root/phxsql/third_party/glog/lib/libglog.a -lpthread /root/phxsql/third_party/phxrpc/lib/libphxrpc.a
/root/phxsql/third_party/glog/lib/libglog.a(libglog_la-logging.o): In function __static_initialization_and_destruction_0(int, int)': logging.cc:(.text+0x5cbb): undefined reference to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)'
logging.cc:(.text+0x5d6d): undefined reference to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)' logging.cc:(.text+0x5e17): undefined reference to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)'
logging.cc:(.text+0x5ec1): undefined reference to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)' logging.cc:(.text+0x5f0c): undefined reference to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)'
/root/phxsql/third_party/glog/lib/libglog.a(libglog_la-logging.o):logging.cc:(.text+0x5fed): more undefined references to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)' follow collect2: error: ld returned 1 exit status make[4]: *** [phxbinlogsvr_phxrpc] Error 1 make[4]: Leaving directory /root/phxsql/phxbinlogsvr/framework/phxrpc/svr'
make[3]: *** [sub_dir] Error 1
make[3]: Leaving directory /root/phxsql/phxbinlogsvr/framework/phxrpc' make[2]: *** [sub_dir] Error 1 make[2]: Leaving directory /root/phxsql/phxbinlogsvr/framework'
make[1]: *** [sub_dir] Error 1
make[1]: Leaving directory `/root/phxsql/phxbinlogsvr'
make: *** [sub_dir] Error 1
用centos 7 编译成功,但phxbinlogsvr_tools_phxrpc -f InitBinlogSvrMaster后,mysql日志一直报
2017-09-30 14:10:42 9764 [Note] repl_phx_report_binlog_to_binlogsvr:169 send binlog use 14578 ms, max gtid 07b2b282-a5a6-11e7-905b-141877489e93:1 binlog gtid 2017-09-30 14:10:42 9764 [Note] repl_phx_report_binlog_to_binlogsvr:165 send binlog buffer failed, prev_log_file [ mysql-bin.000003 ], prev_log_pos [ 151 ], log_file [ mysql-bin.000003 ], log_pos [ 278 ], ret -1
phxbinlogsvr.ERROR 报
E0930 14:12:27.002514 8437 phx_glog.cpp:78] DoQuery[mysql] mysql_query fail 1, Lost connection to MySQL server during query, command flush privileges;
E0930 14:12:27.002598 8437 phx_glog.cpp:78] CheckMasterInit master flush failed
E0930 14:12:27.002645 8437 phx_glog.cpp:78] Process master changeing fail 5002
抱歉回晚了,前面的编译错误都是跟glog有关,可以试一下单独编glog有没有同样问题。
后一个问题可以贴一下binlogsvr更详细一些的log看一下,初步来看是master初始化时写mysql失败了,具体失败原因需要再查一下。
感谢回复,根据提示线索又测试了下,新进展发邮件了,请帮忙看下
这是旧版本依赖了系统的gflags,而系统中缺少造成的。 269f78de34b1285c93b4794e81b33340185772b2 修复了依赖问题,请更新。