Bug 1455355 - Compile error with protobuf 3.3.1
Summary: Compile error with protobuf 3.3.1
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: usbguard
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Daniel Kopeček
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-24 22:05 UTC by Orion Poplawski
Modified: 2017-07-13 10:21 UTC (History)
1 user (show)

Fixed In Version: usbguard-0.7.0-4.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-13 10:21:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.