[Boost-bugs] [Boost C++ Libraries] #3854: unordered prime_list_template release-only link problem with sunpro toolset

Subject: [Boost-bugs] [Boost C++ Libraries] #3854: unordered prime_list_template release-only link problem with sunpro toolset
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-21 16:33:20


#3854: unordered prime_list_template release-only link problem with sunpro toolset
--------------------------------+-------------------------------------------
 Reporter: jhamm@… | Owner: danieljames
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: unordered
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------
 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;

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3854>
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