Firstly, the protobuf has changed not to accept base c++ standard
below 14. Therefore, fixed it to C++14.
/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions
less than C++14 are not supported."
79 | #error "C++ versions less than C++14 are not supported."
And the protobuf has removed SetLogHandler() as of the below commit at
version 22.0.
Breaking change: Migrate to Abseil's logging library.
(https://github.com/protocolbuffers/protobuf/commit/
a9f1ea6)
Unfortunately, they have not offered any replacement function nor
guideline for alternative implementation of SetLogHandler() after
removing it. And the latest upstream nsjail has not fixed it too.
Therefore, removed the SetLogHandler() for now.
Change-Id: I2dbc35d499d71f63772d52e439738f14f460b6d5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
-Wl,-z,relro
CXXFLAGS += $(USER_DEFINES) $(COMMON_FLAGS) $(shell pkg-config --cflags protobuf) \
- -std=c++11 -fno-exceptions -Wno-unused -Wno-unused-parameter
+ -std=c++14 -fno-exceptions -Wno-unused -Wno-unused-parameter
LDFLAGS += -pie -Wl,-z,noexecstack -lpthread $(shell pkg-config --libs protobuf) \
-Wl,-z,relro
return true;
}
-static void LogHandler(
- google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) {
- LOG_W("config.cc: '%s'", message.c_str());
-}
-
bool parseFile(nsjconf_t* nsjconf, const char* file) {
LOG_D("Parsing configuration from '%s'", file);
return false;
}
- SetLogHandler(LogHandler);
google::protobuf::io::FileInputStream input(fd);
input.SetCloseOnDelete(true);