Bug 1455355

Summary: Compile error with protobuf 3.3.1
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: usbguardAssignee: Daniel Kopeček <dkopecek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dkopecek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: usbguard-0.7.0-4.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-13 10:21:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2017-05-24 22:05:42 UTC
Description of problem:

I'm testing out builds with protobuf 3.3.1 here:
https://copr.fedorainfracloud.org/coprs/orion/protobuf3/

usbguard fails to compile due to -Werror:

/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -fPIC -I./src -I./src/Library -I./src/Library/IPC    -std=c++11 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic  -fvisibility=hidden  -Werror  -pedantic -Wno-unknown-pragmas -Wall -Wextra -Wformat=2 -Wredundant-decls -Wmissing-declarations -Wmissing-include-dirs -Wmissing-format-attribute -Wswitch-enum -Wswitch-default -Winvalid-pch -Wformat-nonliteral -Wno-missing-field-initializers -Wno-implicit-fallthrough  -Wno-missing-declarations -c -o src/Library/IPC/libusbguard_la-Message.pb.lo `test -f 'src/Library/IPC/Message.pb.cc' || echo './'`src/Library/IPC/Message.pb.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -fPIC -I./src -I./src/Library -I./src/Library/IPC -std=c++11 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fvisibility=hidden -Werror -pedantic -Wno-unknown-pragmas -Wall -Wextra -Wformat=2 -Wredundant-decls -Wmissing-declarations -Wmissing-include-dirs -Wmissing-format-attribute -Wswitch-enum -Wswitch-default -Winvalid-pch -Wformat-nonliteral -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wno-missing-declarations -c src/Library/IPC/Message.pb.cc  -fPIC -DPIC -o src/Library/IPC/.libs/libusbguard_la-Message.pb.o
src/Library/IPC/Message.pb.cc: In member function 'virtual google::protobuf::uint8* usbguard::IPC::MessageHeader::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const':
src/Library/IPC/Message.pb.cc:266:10: error: unused parameter 'deterministic' [-Werror=unused-parameter]
     bool deterministic, ::google::protobuf::uint8* target) const {
          ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Version-Release number of selected component (if applicable):
0.7.0-3

Comment 1 Orion Poplawski 2017-06-13 16:29:44 UTC
protobuf has been updated to 3.3.1 in rawhide so usbguard is now FTBFS.

Comment 2 Daniel Kopeček 2017-07-13 10:21:54 UTC
Fixed in rawhide by relaxing the compiler warning settings for *.pb.cc files. -Wno-unused-parameter flags is passed to the compiler when dealing with these files.

https://koji.fedoraproject.org/koji/buildinfo?buildID=918228