ArchiveOrangemail archive

Bugs reported/updated through Boost's Trac


boost-bugs.lists.boost.org
(List home) (Recent threads) (13 other Boost C++ lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • Moderate traffic list: up to 30 messages per day
  • This list contains about 22,139 messages, beginning Feb 2011
  • 20 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

[Boost C++ Libraries] #6147: message_queue sample fails to compile in 32-bit

Ad
Boost C++ Libraries 1321645261Fri, 18 Nov 2011 19:41:01 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------------+-------------------------------
 Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
     Type:  Bugs                            |      Status:  new         
Milestone:  To Be Determined                |   Component:  interprocess
  Version:  Boost 1.48.0                    |    Severity:  Regression  
 Keywords:                                  |  
--------------------------------------------+-------------------------------
 Just upgraded to 1.48.

 On OS X I compile the sample program with: gcc -I <blah path to
 boost>/include -arch i386  main.cpp

 and it fails with "....boost/interprocess/ipc/message_queue.hpp:330:
 error: no matching function for call to ‘get_rounded_size(long unsigned
 int, const unsigned int&)’"

 It's the MQ creation line that fails. If I build for x64, it compiles
 successfully. The source is:

 #define BOOST_DATE_TIME_NO_LIB
 #include <boost/interprocess/ipc/message_queue.hpp>
 #include <iostream>
 #include <vector>

 using namespace boost::interprocess;

 int main ()
 {
     try{
         //Erase previous message queue
         message_queue::remove("message_queue");

         //Create a message_queue.
         message_queue mq
         (create_only               //only create
          ,"message_queue"           //name
          ,100                       //max message number
          ,sizeof(int)               //max message size
          );

         //Send 100 numbers
         for(int i = 0; i < 100; ++i){
             mq.send(&i, sizeof(i), 0);
         }
     }
     catch(interprocess_exception &ex){
         std::cout << ex.what() << std::endl;
         return 1;
     }

     return 0;
 }-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1321645345Fri, 18 Nov 2011 19:42:25 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
---------------------------------------------+------------------------------
  Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
      Type:  Bugs                            |      Status:  new         
 Milestone:  To Be Determined                |   Component:  interprocess
   Version:  Boost 1.48.0                    |    Severity:  Regression  
Resolution:                                  |    Keywords:              
---------------------------------------------+------------------------------

Comment (by Graham Perks <graham@…>):

 Retry code formatting. It's the sample from the boost docs.

 {{{

 #define BOOST_DATE_TIME_NO_LIB
 #include <boost/interprocess/ipc/message_queue.hpp>
 #include <iostream>
 #include <vector>

 using namespace boost::interprocess;

 int main ()
 {
     try{
         //Erase previous message queue
         message_queue::remove("message_queue");

         //Create a message_queue.
         message_queue mq
         (create_only               //only create
          ,"message_queue"           //name
          ,100                       //max message number
          ,sizeof(int)               //max message size
          );

         //Send 100 numbers
         for(int i = 0; i < 100; ++i){
             mq.send(&i, sizeof(i), 0);
         }
     }
     catch(interprocess_exception &ex){
         std::cout << ex.what() << std::endl;
         return 1;
     }

     return 0;
 }
 }}}-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1321645626Fri, 18 Nov 2011 19:47:06 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
---------------------------------------------+------------------------------
  Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
      Type:  Bugs                            |      Status:  new         
 Milestone:  To Be Determined                |   Component:  interprocess
   Version:  Boost 1.48.0                    |    Severity:  Regression  
Resolution:                                  |    Keywords:              
---------------------------------------------+------------------------------

Comment (by Graham Perks <graham@…>):

 If anyone has a workaround for this, it would be much appreciated.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1321646310Fri, 18 Nov 2011 19:58:30 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
---------------------------------------------+------------------------------
  Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
      Type:  Bugs                            |      Status:  new         
 Milestone:  To Be Determined                |   Component:  interprocess
   Version:  Boost 1.48.0                    |    Severity:  Regression  
Resolution:                                  |    Keywords:              
---------------------------------------------+------------------------------

Comment (by Graham Perks <graham@…>):

 I was able to workaround this by adding this code before including the
 boost headers. It adds a second type to the get_rounded_size template.

 {{{
 namespace boost {
     namespace interprocess {
         namespace ipcdetail {

             //Rounds "orig_size" by excess to round_to bytes
             template<class SizeType, class ST2>
             inline SizeType get_rounded_size(SizeType orig_size, ST2
 round_to)
             {
                 return ((orig_size-1)/round_to+1)*round_to;
             }
         }
     }
 }
 }}}-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1326920924Wed, 18 Jan 2012 21:08:44 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
---------------------------------------------+------------------------------
  Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
      Type:  Bugs                            |      Status:  closed      
 Milestone:  To Be Determined                |   Component:  interprocess
   Version:  Boost 1.48.0                    |    Severity:  Regression  
Resolution:  fixed                           |    Keywords:              
---------------------------------------------+------------------------------
Changes (by igaztanaga):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Fixed in trunk and release branches adding

 #include <boost/interprocess/detail/utilities.hpp>

 to message queue header.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1346427850Fri, 31 Aug 2012 15:44:10 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
---------------------------------------------+------------------------------
  Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
      Type:  Bugs                            |      Status:  reopened    
 Milestone:  To Be Determined                |   Component:  interprocess
   Version:  Boost 1.50.0                    |    Severity:  Regression  
Resolution:                                  |    Keywords:              
---------------------------------------------+------------------------------
Changes (by moala@…):

  * status:  closed => reopened
  * version:  Boost 1.48.0 => Boost 1.50.0
  * resolution:  fixed =>


Comment:

 Still not fixed in i386 GCC 4.2 xcode 3.2.6 (only works in x86_64) even
 with this

 #include <boost/interprocess/detail/utilities.hpp>

 inclusion in message_queue.hpp in boost 1.50 (macports) (with Mac OS X
 10.6 SDK / deployment target 10.5).

 Graham Perks's workaround allows compiling.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1360529910Sun, 10 Feb 2013 20:58:30 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
---------------------------------------------+------------------------------
  Reporter:  Graham Perks <graham@…>         |       Owner:  igaztanaga  
      Type:  Bugs                            |      Status:  reopened    
 Milestone:  To Be Determined                |   Component:  interprocess
   Version:  Boost 1.50.0                    |    Severity:  Regression  
Resolution:                                  |    Keywords:              
---------------------------------------------+------------------------------

Comment (by igaztanaga):

 I successfully compiled your test using trunk code in Mac OS 10.6.2 with
 GCC:

 i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)

 can you check the bug is fixed?-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1381866608Tue, 15 Oct 2013 19:50:08 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  closed
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.50.0             |   Severity:  Regression
Resolution:  worksforme               |   Keywords:
--------------------------------------+--------------------------
Changes (by igaztanaga):

 * status:  reopened => closed
 * resolution:   => worksforme


Comment:

 No news from the reporter so I'm closing the issue.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1408926126Mon, 25 Aug 2014 00:22:06 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.50.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------
Changes (by darthpjb@…):

 * status:  closed => reopened
 * resolution:  worksforme =>


Comment:

 I can confirm that this issue is still relevant (as mentioned by moala) in
 boost 1_56_0.

 32bit Intel builds for 10.7.5 fail as above on LLVM GCC 4.2 - The
 mentioned workaround did indeed solve the problem for me also.

 Note that I am static-linking boost, and forcing the compiler to GNU99
 dialect. These may be related?

 If needed I may be able to create a reproducing project.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1409077758Tue, 26 Aug 2014 18:29:18 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.50.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------

Comment (by darthpjb@…):

 I can now further confirm the issue is also apparent on I386 builds using
 LLVM GCC 5.1, for the 10.9 SDK, Xcode 5.1.1.

 It would seem this does actively apply to the most recent LLVM compilers,
 across the full range of Mac OSX builds.
 As long as the target architecture is 32bit.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1409150418Wed, 27 Aug 2014 14:40:18 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.50.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------

Comment (by darthpjb@…):

 Further Confirmation:
 The issue is also present on OSX 10.5.8, Xcode 3.1.4, Using Apple GCC 4.0


 Graham Perk's fix does, once again, solve the issue.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1409154514Wed, 27 Aug 2014 15:48:34 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.56.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------
Changes (by anonymous):

 * version:  Boost 1.50.0 => Boost 1.56.0-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1409154541Wed, 27 Aug 2014 15:49:01 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.56.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------
Changes (by darthpjb@…):

 * cc: darthpjb@… (added)-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1409356305Fri, 29 Aug 2014 23:51:45 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.56.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------

Comment (by igaztanaga):

 Without access to the platform, I can't know what the problem lies.
 However, one alternative could be specifying the template type in
 get_rounded_size. That is:

 replace get_rounded_size(a, b) calls with get_rounded_size<size_type>(a,
 b).

 Please let me know if this fixes the problem-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1413483667Thu, 16 Oct 2014 18:21:07 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  reopened
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.56.0             |   Severity:  Regression
Resolution:                           |   Keywords:
--------------------------------------+--------------------------

Comment (by bbaldino@…):

 For what it's worth, I had this same problem on OSX (with boost 1.56) and
 this workaround got things compiling.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Boost C++ Libraries 1413974120Wed, 22 Oct 2014 10:35:20 +0000 (UTC)
#6147: message_queue sample fails to compile in 32-bit
--------------------------------------+--------------------------
  Reporter:  Graham Perks <graham@…>  |      Owner:  igaztanaga
      Type:  Bugs                     |     Status:  closed
 Milestone:  To Be Determined         |  Component:  interprocess
   Version:  Boost 1.56.0             |   Severity:  Regression
Resolution:  fixed                    |   Keywords:
--------------------------------------+--------------------------
Changes (by igaztanaga):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Fixed in Boost 1.57 Beta.-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6147#...>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
Ad
Home | About | Privacy