[Boost-bugs] [Boost C++ Libraries] #3847: Unable to statically link thread lib on ia64.

Subject: [Boost-bugs] [Boost C++ Libraries] #3847: Unable to statically link thread lib on ia64.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-19 16:19:24


#3847: Unable to statically link thread lib on ia64.
-----------------------------------+----------------------------------------
 Reporter: tomasz.wilk@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: thread
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: thread ia64 _tls_used |
-----------------------------------+----------------------------------------
 An attempt to statically link thread library on Itanium (ia64) platform
 generates the following error:

 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

 I was able to verify this issue using boost 1.37 with vc8 compiler as well
 as boost 1.41 with vc10 beta2

 The workaround is to force dynamic linking using


 {{{
 #define BOOST_THREAD_DYN_DLL
 }}}


 which is not always acceptable.

 Here is a sample program:


 {{{
 #include<stdio.h>

 //#define BOOST_THREAD_DYN_DLL
 #include<boost/thread.hpp>

 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;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3847>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC