Boost C++ Libraries: Ticket #3430: Build boost.regex shared-link 1.40 under mingw 3.4 https://svn.boost.org/trac10/ticket/3430 <p> I try build boost.regex under mingw 3.4 (include in Qt SDK) I add mingw to PATH enviroment variable, than run: bootstrap.bat bjam.exe --build_type=complete --toolset=gcc --with-regex --with-program_options variant=release link=shared runtime-link=shared stage </p> <p> bjam build static lib version of boost.regex. It i use msvc2008 console tool, and use toolset "msvc-9.0" shared version build correct. </p> <p> It's like on bug. Thank you! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3430 Trac 1.4.3 Oleg Tsarev <zabivator@…> Wed, 09 Sep 2009 22:32:08 GMT <link>https://svn.boost.org/trac10/ticket/3430#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:1</guid> <description> <p> "It i use msvc2008 console tool, and use toolset "msvc-9.0" shared version build correct. " Of course, "when i use" </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 18 Sep 2009 09:44:41 GMT</pubDate> <title>owner, component changed https://svn.boost.org/trac10/ticket/3430#comment:2 https://svn.boost.org/trac10/ticket/3430#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">John Maddock</span> to <span class="trac-author">Vladimir Prus</span> </li> <li><strong>component</strong> <span class="trac-field-old">regex</span> → <span class="trac-field-new">build</span> </li> </ul> <p> As this is a Boost.Build issue, I'm reassinging. </p> Ticket Vladimir Prus Fri, 18 Sep 2009 09:52:24 GMT <link>https://svn.boost.org/trac10/ticket/3430#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:3</guid> <description> <p> Could you please add the --debug-building option to bjam command line and report the output? You don't need to clean anything, just run this command. Please attach the output, as it will be too long for comment. </p> </description> <category>Ticket</category> </item> <item> <author>zabivator@…</author> <pubDate>Fri, 18 Sep 2009 10:27:37 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3430 https://svn.boost.org/trac10/ticket/3430 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">build.boost.log</span> </li> </ul> Ticket zabivator@… Fri, 18 Sep 2009 10:28:32 GMT <link>https://svn.boost.org/trac10/ticket/3430#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:4</guid> <description> <p> I run bjam.exe --build_type=complete --toolset=gcc --with-regex variant=release link=shared --debug-building runtime-link=shared stage As result i found libboost..... (static version) build log in attach </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Fri, 18 Sep 2009 10:34:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:5</guid> <description> <p> John, I see &lt;toolset&gt;gcc-mingw:&lt;link&gt;static in requirements for boost-regex. Is this still necessary or I can remove it (as well as similar requirement for cygwin)? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 18 Sep 2009 11:58:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:6</guid> <description> <p> I believe static linking is a necessary requirement yes. Last time I checked the shared libraries segfaulted on that platform, there seems to be an issue with gcc here :-( </p> <p> John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Fri, 18 Sep 2009 12:26:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:7</guid> <description> <p> Then, there's no bug here? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 18 Sep 2009 12:31:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:8</guid> <description> <p> I edit libs/regex/build/Jamfile.v2 and built shared version of boost.regex. How can i test it? Boost have regeression test, than boost have tools for run all tests. How? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 18 Sep 2009 12:32:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:9</guid> <description> <p> *than boost have tools Of course "then boost have tools" </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sun, 20 Sep 2009 09:28:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:10</guid> <description> <p> Running "bjam link=shared" in libs/regex/test directory should be enough. Let me know what results you get. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sun, 08 Nov 2009 14:00:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:11</guid> <description> <p> Oleg, did you manage to run the tests, and if so, what are the results. </p> <p> Unless it's definitely established that shared build of boost.regex indeed works, I plan to close this issue as not an issue. </p> <p> Thanks, Volodya </p> </description> <category>Ticket</category> </item> <item> <dc:creator>crisb</dc:creator> <pubDate>Tue, 10 Nov 2009 09:58:22 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3430 https://svn.boost.org/trac10/ticket/3430 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">regex_failed.zip</span> </li> </ul> <p> output of bjam toolset=gcc link=shared on mingw gcc 4.4.0 (win7) </p> Ticket crisb Tue, 10 Nov 2009 09:59:11 GMT <link>https://svn.boost.org/trac10/ticket/3430#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:12</guid> <description> <p> output from </p> <p> bjam toolset=gcc link=shared </p> <p> with boost 1.40.0, having first enabled shared build on mingw (using mingw gcc 4.4.0). </p> <p> output attached. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Tue, 10 Nov 2009 10:04:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:13</guid> <description> <p> John, could you check if the errors in the attached log look like the errors you were working around by forcing link=static? </p> <p> Thanks, Volodya </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 10 Nov 2009 11:41:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:14</guid> <description> <p> No these are something new I believe - it looks like the Mingw guys have fixed a few issues, but that throwing exceptions across dll-boundaries is still a no-go. Unless there's some magic build option we're missing? </p> <p> John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>crisb</dc:creator> <pubDate>Sun, 15 Nov 2009 12:26:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:15</guid> <description> <p> is this really about throwing exceptions across boundaries? some of these tests arent meant to throw any exceptions at all, yet throw a bad_cast exception. is this not now some other problem? </p> <p> by the looks of it g++ 4.4.0 should work with throwing exceptions across dll boundaries. it automatically uses -shared=libgcc when running g++ in order to support this. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>crisb</dc:creator> <pubDate>Sun, 15 Nov 2009 14:08:09 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3430 https://svn.boost.org/trac10/ticket/3430 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">regex_stack.txt</span> </li> </ul> <p> stack trace from running regex_regress </p> Ticket John Maddock Sun, 15 Nov 2009 16:15:39 GMT <link>https://svn.boost.org/trac10/ticket/3430#comment:16 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:16</guid> <description> <p> Thanks for the stack trace, however, now I'm more confused than ever :-( </p> <p> Note that: </p> <ul><li>We don't have this issue with gcc on any other platform. </li><li>The issue goes away as soon as you static link. </li><li>The exception being thrown is a result of a std::out_of_range trying to be thrown and failing... looks like the std lib is holed somewhere. </li></ul><p> Which all screams gcc-bug I'm afraid. </p> <p> I've also spent several hours now trying and failing to get a working up-to-date mingw install on my Vista machine, and have now given up... sorry but unless someone can actually tell me what the problem is, I'm inclined to shrug and move on at this point. Anyone know if the manual install instructions here - <a class="ext-link" href="http://www.mingw.org/wiki/Getting_Started"><span class="icon">​</span>http://www.mingw.org/wiki/Getting_Started</a> - are supposed to work on Vista? </p> <p> The only thing I can think of to try, is defining BOOST_REGEX_NO_EXTERNAL_TEMPLATES in boost/regex/user.hpp and rebuild *everything* and see if that helps. </p> <p> John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>crisb</dc:creator> <pubDate>Sun, 15 Nov 2009 22:36:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:17</guid> <description> <p> BOOST_REGEX_NO_EXTERNAL_TEMPLATES did indeed help! All tests passed. Thanks! What does this mean then? ;) </p> <p> about your other problem - I managed to install on Win7 with no troubles whatsoever following those instructions. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 16 Nov 2009 17:05:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:18 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:18</guid> <description> <pre class="wiki">BOOST_REGEX_NO_EXTERNAL_TEMPLATES did indeed help! All tests passed. Thanks! What does this mean then? ;) </pre><p> It means it might work, or it might not! </p> <p> Normally the regex library instantiates the most commonly used templates in the library - as this speeds up compilation times no end - as well as reducing binary sizes. Defining BOOST_REGEX_NO_EXTERNAL_TEMPLATES disables this, so the same templates end up getting instantiated in both the dll and the application. Frankly if this doesn't work though, then I do wonder whether there isn't some hidden bug in gcc relating to sharing template instances across dll-boundaries :-( </p> <p> I will try and investigate some more though. </p> <pre class="wiki">about your other problem - I managed to install on Win7 with no troubles whatsoever following those instructions. </pre><p> Sigh... for me not only does gcc crash and burn when I try and compile a hello-world app... it actually managed to bring down my whole machine :-( </p> <p> Cheers, John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 16 Nov 2009 17:08:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3430#comment:19 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3430#comment:19</guid> <description> <p> Volodya, </p> <p> Is there any way we can enable shared lib builds only for mingw-gcc &gt;= 4.4 ? </p> <p> Thanks, John. </p> </description> <category>Ticket</category> </item> </channel> </rss>