Bug 912507 - Wrong code in archive/iterators/transform_width.hpp blocks compilation of bind10
Summary: Wrong code in archive/iterators/transform_width.hpp blocks compilation of bind10
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bind10
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Hozza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-18 20:38 UTC by Adam Tkac
Modified: 2013-06-06 07:30 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-06 07:30:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix for this issue (627 bytes, patch)
2013-02-19 19:09 UTC, Petr Machata
no flags Details | Diff

Description Adam Tkac 2013-02-18 20:38:43 UTC
Description of problem:
I tried to compile bind10 with the latest boost but compilation fails with following error:

/usr/include/boost/archive/iterators/transform_width.hpp:144:55: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]

You can reproduce this error with bind10 package currently present in rawhide (please note there is currently bug in fedpkg so every fedpkg command takes ~1 minute for packages which have only rawhide branch so be patient if you work with bind10 fedora repository).

Version-Release number of selected component (if applicable):
boost-devel-1.53.0-3.fc19.x86_64

How reproducible:
always

Steps to Reproduce:
1. attempt to build bind10
  
Actual results:
failure

Expected results:
successful compilation

Additional info:
I quickly checked /usr/include/boost/archive/iterators/transform_width.hpp, line 144, it contains:

            else{
                m_buffer_in = * this->base_reference()++;
                m_remaining_bits = BitsIn;
            }

when I changed this statement to

            else{
                m_buffer_in = * this->base_reference();
                ++(this->base_reference());
                m_remaining_bits = BitsIn;
            }

which should have same functionality, compilation of bind10 was fixed.

Comment 1 Adam Tkac 2013-02-18 20:39:16 UTC
Moving to rawhide because Fedora 18 is not affected.

Comment 2 Petr Machata 2013-02-19 19:09:50 UTC
Created attachment 699605 [details]
Fix for this issue

The problem comes from bind10 itself.  boost::transform_width calls the ++ on the object of bind-provided class EncodeNormalizer.  This should behave as iterator and have the ++(int) method implemented itself.

Comment 3 Petr Machata 2013-02-19 19:15:13 UTC
Note that DecodeNormalizer seems to suffer from the same problem, though it doesn't currently get a citation from GCC.  The remedy should be similar:

@@ -173,6 +178,11 @@ public:
         }
         return (*this);
     }
+    DecodeNormalizer operator++() {
+        DecodeNormalizer tmp = *this;
+        ++*this;
+        return tmp;
+    }
     void skipSpaces() {
         // If (char is signed and) *base_ < 0, on Windows platform with Visual
         // Studio compiler it may trigger _ASSERTE((unsigned)(c + 1) <= 256);

Comment 4 Adam Tkac 2013-02-20 09:13:10 UTC
(In reply to comment #2)
> Created attachment 699605 [details]
> Fix for this issue
> 
> The problem comes from bind10 itself.  boost::transform_width calls the ++
> on the object of bind-provided class EncodeNormalizer.  This should behave
> as iterator and have the ++(int) method implemented itself.

Sorry for false alarm. I just tried to compile bind10 against boost in F18 and it worked so I automatically assumed that it's bug in boost. Thanks for the patch, I will send it to upstream.

Comment 5 Fedora End Of Life 2013-04-03 19:14:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 6 Fedora Admin XMLRPC Client 2013-04-25 11:40:01 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Adam Tkac 2013-04-25 11:59:13 UTC
Please not that BIND10 upstream thinks this is issue in boost:

https://svn.boost.org/trac/boost/ticket/8081

The patch written in comment #2 should be dropped after boost upstream fix the ticket written above.

Comment 9 Tomáš Hozza 2013-06-06 07:30:20 UTC
The patch solving this issue is already in F19+. If upstream merges the patch
of if Boost is fixed, the patch will be dropped.

I'm closing this Bug as NEXTRELEASE.


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