Bug 1473570 - glog failed to build in Fedora 26 due to a bug
Summary: glog failed to build in Fedora 26 due to a bug
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glog
Version: 26
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
Assignee: John Khvatov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-21 07:46 UTC by Yupeng Chang
Modified: 2017-08-07 03:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-07 03:49:26 UTC
Type: Bug
Embargoed:


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 07:46 UTC, Yupeng Chang
no flags Details | Diff

Description Yupeng Chang 2017-07-21 07:46:46 UTC
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.