Bug 1222929

Summary: nsjail fails to build on Leap 15.6 error: variable or field 'LogHandler' declared void
Product: [openSUSE] openSUSE Distribution Reporter: Lubos Kocman <lubos.kocman>
Component: SecurityAssignee: Johannes Segitz <jsegitz>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: meissner, mlin
Version: Leap 15.6   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Lubos Kocman 2024-04-16 22:17:37 UTC
Hello 

package nsjail  fails to build on Leap 15.6

https://build.opensuse.org/package/live_build_log/openSUSE:Backports:SLE-15-SP6/nsjail/standard/x86_64

I/usr/include/libnl3 config.cc -o config.o
[   32s] config.cc:306:23: error: variable or field 'LogHandler' declared void
[   32s]      google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) {
[   32s]                        ^~~~~~~~
[   32s] config.cc:306:23: error: 'LogLevel' is not a member of 'google::protobuf'
[   32s] config.cc:306:23: note: suggested alternative:
[   32s] In file included from config.cc:40:0:
[   32s] config.pb.h:110:6: note:   'nsjail::LogLevel'
[   32s]  enum LogLevel : int {
[   32s]       ^~~~~~~~
[   32s] config.cc:306:39: error: expected primary-expression before 'const'
[   32s]      google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) {
[   32s]                                        ^~~~~
[   32s] config.cc:306:61: error: expected primary-expression before 'int'
[   32s]      google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) {
[   32s]                                                              ^~~
[   32s] config.cc:306:71: error: expected primary-expression before 'const'
[   32s]      google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) {
[   32s]                                                                        ^~~~~
[   32s] config.cc: In function 'bool config::parseFile(nsjconf_t*, const char*)':
[   32s] config.cc:319:16: error: 'LogHandler' was not declared in this scope
[   32s]   SetLogHandler(LogHandler);
[   32s]                 ^~~~~~~~~~
[   32s] config.cc:319:16: note: suggested alternative: 'sa_handler'
[   32s]   SetLogHandler(LogHandler);
[   32s]                 ^~~~~~~~~~
[   32s]                 sa_handler
[   32s] config.cc:319:2: error: 'SetLogHandler' was not declared in this scope
[   32s]   SetLogHandler(LogHandler);
[   32s]   ^~~~~~~~~~~~~
[   33s] make: *** [Makefile:60: config.o] Error 1
[   33s] error: Bad exit status from /var/tmp/rpm-tmp.ny5q1c (%build)
[   33s] 

Could you please have a look?
Comment 1 Johannes Segitz 2024-05-02 12:23:14 UTC
yes, thanks for the report
Comment 2 Max Lin 2024-05-03 09:00:46 UTC
this needs protobuf21 as the compromise solution, nsjail won't build with newer protobuf.
Comment 3 Johannes Segitz 2024-05-07 07:17:08 UTC
Max submitted for this. This unfortunately only works for the backports, so I disabled everything else in security/nsjail