Bug 1473570 - glog failed to build in Fedora 26 due to a bug
glog failed to build in Fedora 26 due to a bug
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: glog (Show other bugs)
26
All All
unspecified Severity unspecified
: ---
: ---
Assigned To: John Khvatov
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-21 03:46 EDT by Yupeng Chang
Modified: 2017-08-06 23:49 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-06 23:49:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix bugs in glog-0.3.3, which causes glog fail to build by GCC 7.1.1 in Fedora 26 (822 bytes, patch)
2017-07-21 03:46 EDT, Yupeng Chang
no flags Details | Diff

  None (edit)
Description Yupeng Chang 2017-07-21 03:46:46 EDT
Created attachment 1302205 [details]
Patch to fix bugs in glog-0.3.3, which causes glog fail to build by GCC 7.1.1 in Fedora 26

Description of problem:
glog-0.3.3-12.fc25.src.rpm failed to build in Fedora 26

How reproducible:
Download glog-0.3.3-12.fc25.src.rpm from koji.fedoraproject.org
build glog in Fedora 26 system with command rpmbuild --rebuild glog-0.3.3-12.fc25.src.rpm


Actual results:
Compiler reports:

src/demangle.cc: In function 'bool google::AtLeastNumCharsRemaining(const char*, int)':
src/demangle.cc:170:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
     if (str == '\0') {
                ^~~~
src/demangle.cc: In function 'bool google::ParseCharClass(google::State*, const char*)':
src/demangle.cc:226:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   if (state->mangled_cur == '\0') {
                             ^~~~

Expected results:

glog builds successfully

Additional info:
After I investigating on this issue, I found that this compiling error is caused by bugs
str == '\0' should be changed to str[i] == '\0'

state->mangled_cur == '\0' should be changed to state->mangled_cur[0] == '\0'

I have created a patch to fix this issue.
Patch is attached.

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