Boost C++ Libraries: Ticket #3847: Unable to statically link thread lib on ia64. https://svn.boost.org/trac10/ticket/3847 <p> An attempt to statically link thread library on Itanium (ia64) platform generates the following error: </p> <p> libboost_thread-vc100-mt-gd-1_41.lib(tss_pe.obj) : error LNK2003: gp relative fixup to symbol not in short data section '_tls_used' LINK : fatal error LNK1165: link failed because of fixup errors </p> <p> I was able to verify this issue using boost 1.37 with vc8 compiler as well as boost 1.41 with vc10 beta2 </p> <p> The workaround is to force dynamic linking using </p> <pre class="wiki">#define BOOST_THREAD_DYN_DLL </pre><p> which is not always acceptable. </p> <p> Here is a sample program: </p> <pre class="wiki">#include&lt;stdio.h&gt; //#define BOOST_THREAD_DYN_DLL #include&lt;boost/thread.hpp&gt; void threadBody() { printf("hello from thread"); boost::this_thread::sleep(boost::posix_time::seconds(5)); } int main(void) { printf("Hello world!"); boost::thread myThread(threadBody); myThread.join(); return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3847 Trac 1.4.3 Bryce Adelstein Lelbach Thu, 21 Oct 2010 19:03:17 GMT severity, milestone changed; cc set https://svn.boost.org/trac10/ticket/3847#comment:1 https://svn.boost.org/trac10/ticket/3847#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">Bryce Adelstein Lelbach</span> added </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Showstopper</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.42.0</span> → <span class="trac-field-new">Boost-1.45.0</span> </li> </ul> <p> This is similar in nature to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4258" title="#4258: Bugs: Linking with boost thread does not work on mingw/gcc 4.5 (closed: fixed)">#4258</a> - <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4258" title="#4258: Bugs: Linking with boost thread does not work on mingw/gcc 4.5 (closed: fixed)">#4258</a> reports this problem only on mingw. </p> Ticket Anthony Williams Fri, 22 Oct 2010 09:43:14 GMT status changed https://svn.boost.org/trac10/ticket/3847#comment:2 https://svn.boost.org/trac10/ticket/3847#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> The _tls_used stuff is there to ensure correct cleanup of the per-thread data structures used by boost.thread. I do not know how to fix this for IA64. </p> <p> Since what is there is broken at the moment, I could remove it entirely, and leave it to users to define boost::tss_cleanup_implemented(), and ensure that boost::on_thread_exit is called when every thread exits. </p> Ticket Anthony Williams Fri, 29 Oct 2010 06:42:18 GMT severity changed https://svn.boost.org/trac10/ticket/3847#comment:3 https://svn.boost.org/trac10/ticket/3847#comment:3 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> IA64 is not a tested platform, so this is not a "showstopper" </p> Ticket viboes Mon, 28 May 2012 16:45:44 GMT milestone changed https://svn.boost.org/trac10/ticket/3847#comment:4 https://svn.boost.org/trac10/ticket/3847#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.45.0</span> → <span class="trac-field-new">Boost 1.50.0</span> </li> </ul> Ticket viboes Mon, 28 May 2012 16:48:33 GMT milestone changed https://svn.boost.org/trac10/ticket/3847#comment:5 https://svn.boost.org/trac10/ticket/3847#comment:5 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.50.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket viboes Tue, 21 Aug 2012 05:09:19 GMT owner, status changed https://svn.boost.org/trac10/ticket/3847#comment:6 https://svn.boost.org/trac10/ticket/3847#comment:6 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> </ul> <p> In the absence of a complete fix, I propose to either force BOOST_THREAD_DYN_DLL with this platform (which should be the define to test?) or as suggested by Anthony "leave it to users to define boost::tss_cleanup_implemented(), and ensure that boost::on_thread_exit is called when every thread exits." </p> <p> Which option is OK for you? </p> Ticket viboes Tue, 21 Aug 2012 05:38:27 GMT status changed https://svn.boost.org/trac10/ticket/3847#comment:7 https://svn.boost.org/trac10/ticket/3847#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Tue, 11 Dec 2012 22:13:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3847#comment:8 https://svn.boost.org/trac10/ticket/3847#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> Moved to wontfix as there is no response from the PO. </p> Ticket