Boost C++ Libraries: Ticket #6265: STL containers in managed memory segments fails to build https://svn.boost.org/trac10/ticket/6265 <p> Good afternoon. </p> <p> The new Interprocess library shipped with Boost 1.48.0 is causing me troubles in building code that tries to allocate a container on managed shared memory. The problem is clearly visible trying to build one of the examples present into the documentation, and, precisely, the one that you can find at this link<br /> <br /> <a href="http://www.boost.org/doc/libs/1_48_0/doc/html/interprocess/allocators_containers.html#interprocess.allocators_containers.containers_explained.where_allocate">http://www.boost.org/doc/libs/1_48_0/doc/html/interprocess/allocators_containers.html#interprocess.allocators_containers.containers_explained.where_allocate</a> <br /> <br /> i.e. into the "Where is this being allocated?" section.<br /> <br /> With Boost 1.47.0 the same code builds.<br /> <br /> I'm using gcc on a CentOS 5.7 x86_64 machine. The command I issue in order to build that code is:<br /> <br /> </p> <pre class="wiki">g++ example.cpp -o example -I&lt;path to boost&gt;/include -lrt </pre><p> I've attached both the *.cpp code and the build output.<br /> <br /> Thanks in advance<br /> Best regards<br /> <br /> Federico </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6265 Trac 1.4.3 fandreasi@… Wed, 14 Dec 2011 14:36:52 GMT attachment set https://svn.boost.org/trac10/ticket/6265 https://svn.boost.org/trac10/ticket/6265 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">example.out</span> </li> </ul> Ticket fandreasi@… Wed, 14 Dec 2011 14:37:14 GMT attachment set https://svn.boost.org/trac10/ticket/6265 https://svn.boost.org/trac10/ticket/6265 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">example.cpp</span> </li> </ul> Ticket anonymous Fri, 23 Dec 2011 11:57:49 GMT <link>https://svn.boost.org/trac10/ticket/6265#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:1</guid> <description> <p> Which gcc version? Can you try trunk code? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 23 Dec 2011 15:16:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6265#comment:1" title="Comment 1">anonymous</a>: </p> <blockquote class="citation"> <p> Which gcc version? Can you try trunk code? </p> </blockquote> <p> gcc is 4.1.2, the one distributed with CentOS 5.7 </p> </description> <category>Ticket</category> </item> <item> <author>mstefano@…</author> <pubDate>Tue, 27 Dec 2011 07:35:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:3</guid> <description> <p> I've tried the trunk and the error is exactly the same. Please, before releasing a new version of the library, at least verify that the examples proposed in the documentation get properly built. I've only verified that this one does not get built, but I've not tested the others.<br /> <br /> Best regards,<br /> Michele </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Tue, 27 Dec 2011 08:15:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:4</guid> <description> <p> Examples are always tested before committing (in my case in windows, ubuntu, macos and freebsd), but we can't have access to all OS/compiler combinations. We'll need more time to test what's happening. </p> </description> <category>Ticket</category> </item> <item> <author>mstefano@…</author> <pubDate>Tue, 27 Dec 2011 09:07:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:5</guid> <description> <p> I've just tried on a 32 bit Fedora 16 (which has gcc 4.6.2-1) and the example gets built, but I had to add "-lpthread" to the command above. I think the problem is related to gcc 4.1.2, which is deployed with Red Hat 5.x and, as a consequence, with CentOS 5.x.<br /> <br /> I've also tried to build with gcc 4.4 on my CentOS 5.7 with the following command: </p> <pre class="wiki">g++44 example.cpp -I&lt;path-to-boost&gt;/include -o example -lrt -lpthread </pre><p> and the code got built. Anyway gcc 4.4 is not the default on Red Hat 5.x and CentOS 5.x distributions.<br /> So, the problem, is definitely related to the compiler.<br /> <br /> Best regards,<br /> Michele De Stefano </p> </description> <category>Ticket</category> </item> <item> <author>mstefano@…</author> <pubDate>Wed, 18 Jan 2012 08:29:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:6</guid> <description> <p> Excuse me, but I was expecting an update on this problem and 3 weeks have passed since the last update. It is true that with gcc 4.4 there is no problem, but the documentation of the Interprocess library states that the library works with gcc 4.1.2 too (so I was expecting an update on this). Is any action planned to fix this bug?<br /> <br /> Keep in mind that gcc 4.4 cannot easily be used on Red Hat 5.x or CentOS 5.x, most of all if you use BLAS and LAPACK. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Wed, 18 Jan 2012 10:05:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:7</guid> <description> <p> Boost is a volunteer effort, we do the best we can. I installed CentOS and current trunk and release branch code should work. Let me know if this fixes your problems. </p> </description> <category>Ticket</category> </item> <item> <author>mstefano@…</author> <pubDate>Wed, 18 Jan 2012 13:40:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6265#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6265#comment:8</guid> <description> <p> I know that "Boost is a volunteer effort", and it is for this reason that I'm giving you feedback as soon as possible. And I would have been glad to help you with CentOS without the need for you to install it (if only you told me you were trying to fix the bug, I would have helped you with feedback on CentOS).<br /><br /> </p> <p> Anyway, I've downloaded the boost trunk and I've managed to build the example using gcc 4.1.2. So now I confirm that the example builds.<br /> <br /> Thank you very much.<br /> Best regards. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Wed, 18 Jan 2012 21:12:23 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6265#comment:9 https://svn.boost.org/trac10/ticket/6265#comment:9 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket