Boost C++ Libraries: Ticket #1058: Cygwin libraries & GNU libtool https://svn.boost.org/trac10/ticket/1058 <p> I'm using Cygwin on Windows XP with Boost 1.34.0 + the patches from these two tickets applied: </p> <p> <a class="ext-link" href="http://svn.boost.org/trac/boost/ticket/966"><span class="icon">​</span>http://svn.boost.org/trac/boost/ticket/966</a> <a class="ext-link" href="http://svn.boost.org/trac/boost/ticket/1025"><span class="icon">​</span>http://svn.boost.org/trac/boost/ticket/1025</a> </p> <p> The build and install stages seem to work correctly now, but now when I try to link in Boost libraries with my own shared library, GNU libtool (1.5.23a) is giving me errors about not being able to find the "real filenames" and refuses to build DLLs (it only builds shared libraries which is a problem for me since I'm building plug-ins): </p> <p> /bin/sh ../libtool --tag=CXX --mode=link g++ -DLIBPION -ggdb -Wall -no-undefined -release 0.1.7 -mthreads -L/opt/build/boost-1.34.0/lib -o libpion.la -rpath /usr/local/libpion-0.1.7/lib <a class="missing wiki">PionPlugin</a>.lo <a class="missing wiki">PionEngine</a>.lo TCPServer.lo HTTPTypes.lo HTTPResponse.lo HTTPRequestParser.lo HTTPServer.lo -lboost_thread-mt -lboost_system-mt -lboost_filesystem-mt -lws2_32 -lmswsock </p> <p> <strong>* Warning: linker path does not have real file for library -lboost_thread-mt. </strong>* I have the capability to make that library automatically link in when <strong>* you link to this library. But I can only do this if you have a </strong>* shared version of the library, which you do not appear to have <strong>* because I did check the linker path looking for a file starting </strong>* with libboost_thread-mt but no candidates were found. (...for file magic test) ... </p> <p> The import library names are currently using the format "boost_*.dll.a" while libtool expects libraries to have the standard "lib" prefix. Adding the "lib" prefix seems to fix this problem. Note that previous Boost releases (namely 1.33.1) used the format that is compatible with libtool -- 1.34.0 seems to have broken compatibility. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1058 Trac 1.4.3 René Rivera Wed, 11 Jul 2007 01:25:35 GMT component changed https://svn.boost.org/trac10/ticket/1058#comment:1 https://svn.boost.org/trac10/ticket/1058#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">build</span> </li> </ul> Ticket René Rivera Wed, 11 Jul 2007 01:26:13 GMT owner set https://svn.boost.org/trac10/ticket/1058#comment:2 https://svn.boost.org/trac10/ticket/1058#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Vladimir Prus</span> </li> </ul> Ticket Vladimir Prus Wed, 11 Jul 2007 18:29:28 GMT <link>https://svn.boost.org/trac10/ticket/1058#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1058#comment:3</guid> <description> <p> Let me clarify. Are you saying that in 1.33.1, import libraries on cygwin were named libboost_XXX.dll.a, and in 1.34 they are named boost_XXX.dll.a, and that, in particular, confuses libtool? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 17 Jul 2007 00:55:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1058#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1058#comment:4</guid> <description> <p> Yes. </p> <p> Since the *.dll.a files do not have a "lib" prefix, libtool in cygwin does not recognize them and will only link with the static libs. This is especially a problem if you're trying to use libtool to build a DLL that is linked with the boost DLLs. </p> <p> It could be a problem with libtool or just me not knowing about certain options I should be passing to it (I'm fairly new to autotools), but in 1.33.1 the libraries had a "lib" prefix and therefore this was not a problem. </p> <p> Thanks, -Mike </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Roland Schwarz</dc:creator> <pubDate>Sun, 02 Sep 2007 15:52:42 GMT</pubDate> <title>type, severity changed https://svn.boost.org/trac10/ticket/1058#comment:5 https://svn.boost.org/trac10/ticket/1058#comment:5 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Regression</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> We need more input. </p> <p> The following code snippet, is not able to reproduce the described behavior, although not the first hint of a library being present. Try this (in an empty dir): </p> <p> libtool --mode=link g++ -no-undefined -o libbaz.la -L. -lfoobar </p> <p> On the other hand I verified, that the gnu linker ld is able to accept xxx.dll.a or libxxx.dll.a as import libraries. </p> <p> I am pretty sure libtool also will find xxx.lib named import libraries. </p> <p> I guess the reported bug is not related to boost naming scheme at all, but this is just a guess. It would be ideal if the described behavior would be presented in a stripped down version, since we have no access to the posters prerequisites (i.e pion libs) </p> <p> Roland aka speedsnail </p> Ticket Mike Tue, 04 Sep 2007 20:52:07 GMT <link>https://svn.boost.org/trac10/ticket/1058#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1058#comment:6</guid> <description> <p> The problem is not the SUFFIX but the PREFIX. In 1.33.x, the libraries included the prefix "lib". In 1.34.0 this prefix was removed. Without the "lib" prefix (i.e. "boost_thread_" versus "libboost_thread_"), libtool cannot seem to find the library. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 04 Sep 2007 21:36:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1058#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1058#comment:7</guid> <description> <p> There were actually two versions: </p> <p> 1) libxxx.lib and 2) xxx.lib </p> <p> 1) is the static version and 2) is the import lib for the DLL. This scheme has been restored on trunk. Could you please check if this works with the trunk version? If yes this can be merged back as a bug-fix for 1.34. </p> <p> Thank you. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mike</dc:creator> <pubDate>Wed, 05 Sep 2007 01:34:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1058#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1058#comment:8</guid> <description> <p> I just confirmed that the latest code in trunk (1.35) works great with libtool again. Thanks! -Mike </p> <p> P.S. the project I was referring to (libpion) is open source code at <a class="ext-link" href="http://www.atomiclabs.com/libpion/"><span class="icon">​</span>http://www.atomiclabs.com/libpion/</a> just in case anyone else needs to test. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Roland Schwarz</dc:creator> <pubDate>Fri, 07 Sep 2007 10:54:45 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1058#comment:9 https://svn.boost.org/trac10/ticket/1058#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