Opened 13 years ago
Closed 13 years ago
#3854 closed Bugs (fixed)
unordered prime_list_template release-only link problem with sunpro toolset
Reported by: | Owned by: | Daniel James | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | unordered |
Version: | Boost 1.37.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Missing symbol on sun solaris for release build of a project using unordered. We are currently using:
Sun C++ 5.9 SunOS_sparc Patch 124863-05 2008/06/03
The related shared objects and executable compile cleanly without warnings. When the shared object is linked at runtime, the executable cannot link due to a missing symbol for
prime_list_template<T>::length = 28;
The original code works for debug versions, so we suspect a compiler bug or perhaps an inlining problem.
Here is our solution:
* * 81,87 --- 81,95 ----
template<typename T> struct prime_list_template {
static std::size_t const value[];
+ #if defined(SUNPRO_CC)
+ static std::ptrdiff_t const length = 28;
+ #else
static std::ptrdiff_t const length;
+ #endif
};
template<typename T>
* * 93,100 --- 101,113 ----
50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul };
+ #if !defined(SUNPRO_CC)
template<typename T> std::ptrdiff_t const prime_list_template<T>::length = 28;
+ #endif
typedef prime_list_template<std::size_t> prime_list;
Change History (4)
comment:1 by , 13 years ago
Status: | new → assigned |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
The library has changed a fair amount since 1.37 so that patch doesn't apply any more. I just checked in a fix for the issue on trunk, but it's quite possible that there will be other similar problems with the new version.
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [59200]) Set length of primes inside template on Sun C++. Refs #3854