13 Star 64 Fork 19

刘丹冰Aceld / Lars

 / 详情

centos下编译不通过

待办的
创建于  
2021-04-14 09:16

protobuf版本:libprotoc 3.15.8
操作系统:centos7
编译错误如下:
Clean in lars_reactor
make[1]: Entering directory /data/www/Lars/lars_reactor' g++ -g -O2 -Wall -fPIC -Wno-deprecated -c -o src/tcp_server.o src/tcp_server.cpp -I./include g++ -g -O2 -Wall -fPIC -Wno-deprecated -c -o src/config_file.o src/config_file.cpp -I./include g++ -g -O2 -Wall -fPIC -Wno-deprecated -c -o src/udp_client.o src/udp_client.cpp -I./include In file included from ./include/udp_client.h:4:0, from src/udp_client.cpp:2: ./include/message.h:21:45: error: ‘uint32_t’ has not been declared typedef void msg_callback(const char *data, uint32_t len, int msgid, net_connection *net_conn, void *user_data); ^ ./include/message.h:49:26: error: ‘uint32_t’ has not been declared void call(int msgid, uint32_t msglen, const char *data, net_connection *net_conn) ^ src/udp_client.cpp: In member function ‘void udp_client::do_read()’: src/udp_client.cpp:65:17: error: ‘errno’ was not declared in this scope if (errno == EINTR) { ^ src/udp_client.cpp:65:26: error: ‘EINTR’ was not declared in this scope if (errno == EINTR) { ^ src/udp_client.cpp:68:31: error: ‘EAGAIN’ was not declared in this scope else if (errno == EAGAIN) { ^ make[1]: *** [src/udp_client.o] Error 1 make[1]: Leaving directory /data/www/Lars/lars_reactor'
Clean in lars_dns
make[1]: Entering directory /data/www/Lars/lars_dns' g++ -g -O2 -Wall -Wno-deprecated -c -o src/subscribe.o src/subscribe.cpp -I./include -I../base/include -I../lars_reactor/include -I../base/mysql-connector-c/include -I../base/proto In file included from ./include/subscribe.h:8:0, from src/subscribe.cpp:1: ../base/proto/lars.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ ../base/proto/lars.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ ../base/proto/lars.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^ In file included from /usr/include/c++/4.8.2/atomic:38:0, from /usr/local/include/google/protobuf/io/coded_stream.h:115, from ../base/proto/lars.pb.h:23, from ./include/subscribe.h:8, from src/subscribe.cpp:1: /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ In file included from /usr/local/include/google/protobuf/stubs/common.h:48:0, from /usr/local/include/google/protobuf/io/coded_stream.h:147, from ../base/proto/lars.pb.h:23, from ./include/subscribe.h:8, from src/subscribe.cpp:1: /usr/local/include/google/protobuf/stubs/port.h:117:2: error: #error "Protobuf requires at least C++11." #error "Protobuf requires at least C++11." ^ In file included from ./include/subscribe.h:8:0, from src/subscribe.cpp:1: ../base/proto/lars.pb.h:28:50: fatal error: google/protobuf/inlined_string_field.h: No such file or directory #include <google/protobuf/inlined_string_field.h> ^ compilation terminated. make[1]: *** [src/subscribe.o] Error 1 make[1]: Leaving directory /data/www/Lars/lars_dns'
Clean in lars_reporter
make[1]: Entering directory /data/www/Lars/lars_reporter' g++ -g -O2 -Wall -Wno-deprecated -c -o src/store_report.o src/store_report.cpp -I./include -I../base/include -I../lars_reactor/include -I../base/mysql-connector-c/include -I../base/proto In file included from ./include/store_report.h:4:0, from src/store_report.cpp:1: ../base/proto/lars.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ ../base/proto/lars.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ ../base/proto/lars.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^ In file included from /usr/include/c++/4.8.2/atomic:38:0, from /usr/local/include/google/protobuf/io/coded_stream.h:115, from ../base/proto/lars.pb.h:23, from ./include/store_report.h:4, from src/store_report.cpp:1: /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ In file included from /usr/local/include/google/protobuf/stubs/common.h:48:0, from /usr/local/include/google/protobuf/io/coded_stream.h:147, from ../base/proto/lars.pb.h:23, from ./include/store_report.h:4, from src/store_report.cpp:1: /usr/local/include/google/protobuf/stubs/port.h:117:2: error: #error "Protobuf requires at least C++11." #error "Protobuf requires at least C++11." ^ In file included from ./include/store_report.h:4:0, from src/store_report.cpp:1: ../base/proto/lars.pb.h:28:50: fatal error: google/protobuf/inlined_string_field.h: No such file or directory #include <google/protobuf/inlined_string_field.h> ^ compilation terminated. make[1]: *** [src/store_report.o] Error 1 make[1]: Leaving directory /data/www/Lars/lars_reporter'
Clean in lars_loadbalance_agent
make[1]: Entering directory /data/www/Lars/lars_loadbalance_agent' g++ -g -O2 -Wall -Wno-deprecated -c -o src/host_info.o src/host_info.cpp -I./include -I../base/include -I../lars_reactor/include -I../base/mysql-connector-c/include -I../base/proto In file included from ./include/main_server.h:3:0, from src/host_info.cpp:2: ../base/proto/lars.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ ../base/proto/lars.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ ../base/proto/lars.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^ In file included from /usr/include/c++/4.8.2/atomic:38:0, from /usr/local/include/google/protobuf/io/coded_stream.h:115, from ../base/proto/lars.pb.h:23, from ./include/main_server.h:3, from src/host_info.cpp:2: /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ In file included from /usr/local/include/google/protobuf/stubs/common.h:48:0, from /usr/local/include/google/protobuf/io/coded_stream.h:147, from ../base/proto/lars.pb.h:23, from ./include/main_server.h:3, from src/host_info.cpp:2: /usr/local/include/google/protobuf/stubs/port.h:117:2: error: #error "Protobuf requires at least C++11." #error "Protobuf requires at least C++11." ^ In file included from ./include/main_server.h:3:0, from src/host_info.cpp:2: ../base/proto/lars.pb.h:28:50: fatal error: google/protobuf/inlined_string_field.h: No such file or directory #include <google/protobuf/inlined_string_field.h> ^ compilation terminated. make[1]: *** [src/host_info.o] Error 1 make[1]: Leaving directory /data/www/Lars/lars_loadbalance_agent'
Clean in api/cpp/lars_api
make[1]: Entering directory /data/www/Lars/api/cpp/lars_api' g++ -g -O2 -Wall -Wno-deprecated -c -o lars_api.o lars_api.cpp -I./include -I../../../base/include -I../../../lars_reactor/include -I../../../base/proto In file included from lars_api.cpp:2:0: ../../../base/proto/lars.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ ../../../base/proto/lars.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ ../../../base/proto/lars.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^ In file included from /usr/include/c++/4.8.2/atomic:38:0, from /usr/local/include/google/protobuf/io/coded_stream.h:115, from ../../../base/proto/lars.pb.h:23, from lars_api.cpp:2: /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ In file included from /usr/local/include/google/protobuf/stubs/common.h:48:0, from /usr/local/include/google/protobuf/io/coded_stream.h:147, from ../../../base/proto/lars.pb.h:23, from lars_api.cpp:2: /usr/local/include/google/protobuf/stubs/port.h:117:2: error: #error "Protobuf requires at least C++11." #error "Protobuf requires at least C++11." ^ In file included from lars_api.cpp:2:0: ../../../base/proto/lars.pb.h:28:50: fatal error: google/protobuf/inlined_string_field.h: No such file or directory #include <google/protobuf/inlined_string_field.h> ^ compilation terminated. make[1]: *** [lars_api.o] Error 1 make[1]: Leaving directory /data/www/Lars/api/cpp/lars_api'
Clean in api/cpp/example
make[1]: Entering directory /data/www/Lars/api/cpp/example' g++ -g -O2 -Wall -Wno-deprecated -o example example.cpp -I../../../lars_reactor/include -I../lars_api ../lib/liblarsclient.a -lprotobuf g++: error: ../lib/liblarsclient.a: No such file or directory make[1]: *** [all] Error 1 make[1]: Leaving directory /data/www/Lars/api/cpp/example'
Clean in lars_reactor/example/qps_test
make[1]: Entering directory `/data/www/Lars/lars_reactor/example/qps_test'
g++ -o server -g -O2 -Wall -fPIC -Wno-deprecated server.cpp echoMessage.pb.cc -I../../include -L../../lib -llreactor -lpthread -lprotobuf
In file included from server.cpp:5:0:
echoMessage.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
echoMessage.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
echoMessage.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /usr/include/c++/4.8.2/atomic:38:0,
from /usr/local/include/google/protobuf/io/coded_stream.h:115,
from echoMessage.pb.h:23,
from server.cpp:5:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
In file included from /usr/local/include/google/protobuf/stubs/common.h:48:0,
from /usr/local/include/google/protobuf/io/coded_stream.h:147,
from echoMessage.pb.h:23,
from server.cpp:5:
/usr/local/include/google/protobuf/stubs/port.h:117:2: error: #error "Protobuf requires at least C++11."
#error "Protobuf requires at least C++11."
^
In file included from server.cpp:5:0:
echoMessage.pb.h:28:50: fatal error: google/protobuf/inlined_string_field.h: No such file or directory
#include <google/protobuf/inlined_string_field.h>
^
compilation terminated.
In file included from echoMessage.pb.cc:4:0:
echoMessage.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
echoMessage.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
echoMessage.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /usr/include/c++/4.8.2/atomic:38:0,
from /usr/local/include/google/protobuf/io/coded_stream.h:115,
from echoMessage.pb.h:23,
from echoMessage.pb.cc:4:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
In file included from /usr/local/include/google/protobuf/stubs/common.h:48:0,
from /usr/local/include/google/protobuf/io/coded_stream.h:147,
from echoMessage.pb.h:23,
from echoMessage.pb.cc:4:
/usr/local/include/google/protobuf/stubs/port.h:117:2: error: #error "Protobuf requires at least C++11."
#error "Protobuf requires at least C++11."
^
In file included from echoMessage.pb.cc:4:0:
echoMessage.pb.h:28:50: fatal error: google/protobuf/inlined_string_field.h: No such file or directory
#include <google/protobuf/inlined_string_field.h>

评论 (0)

你是谁 创建了任务
你是谁 关联仓库设置为aceld/Lars
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
C++
1
https://gitee.com/Aceld/Lars.git
git@gitee.com:Aceld/Lars.git
Aceld
Lars
Lars

搜索帮助