Bug 1222929 - nsjail fails to build on Leap 15.6 error: variable or field 'LogHandler' declared void
Summary: nsjail fails to build on Leap 15.6 error: variable or field 'LogHandler' dec...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Security (show other bugs)
Version: Leap 15.6
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Johannes Segitz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-16 22:17 UTC by Lubos Kocman
Modified: 2024-05-07 07:17 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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