Opened 13 years ago
Closed 10 years ago
#3847 closed Bugs (wontfix)
Unable to statically link thread lib on ia64.
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.41.0 | Severity: | Problem |
Keywords: | thread ia64 _tls_used | Cc: | Bryce Adelstein Lelbach |
Description
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; }
Change History (8)
comment:1 by , 12 years ago
Cc: | added |
---|---|
Milestone: | Boost 1.42.0 → Boost-1.45.0 |
Severity: | Problem → Showstopper |
comment:2 by , 12 years ago
Status: | new → assigned |
---|
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.
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.
comment:3 by , 12 years ago
Severity: | Showstopper → Problem |
---|
IA64 is not a tested platform, so this is not a "showstopper"
comment:4 by , 10 years ago
Milestone: | Boost 1.45.0 → Boost 1.50.0 |
---|
comment:5 by , 10 years ago
Milestone: | Boost 1.50.0 → To Be Determined |
---|
comment:6 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
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."
Which option is OK for you?
comment:7 by , 10 years ago
Status: | new → assigned |
---|
comment:8 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Moved to wontfix as there is no response from the PO.
This is similar in nature to #4258 - #4258 reports this problem only on mingw.