Opened 7 years ago

Closed 7 years ago

#11547 closed Bugs (fixed)

Symbol referencing errors

Reported by: lcarreon@… Owned by: John Maddock
Milestone: Boost 1.60.0 Component: math
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

Due to the changes from Tickets #11544 and #11546, the following errors have appeared:

std::string::basic_string (const std::string &) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::append(const char*,unsigned long) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::append(const std::string &) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::swap(std::string &) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::find(char,unsigned long)const bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) const std::ctype<char>& std::use_facet<std::ctype<char> >(const std::locale&) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::ios::imbue(const std::locale&) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::append(unsigned long,char) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::_M_leak_hard() bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::basic_string (const char*,const std::allocator<char>&) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::replace(unsigned long,unsigned long,const char*,unsigned long) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::ostream & std::ostream::_M_insert<long double>(long double) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::reserve(unsigned long) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::ios::clear(std::_Ios_Iostate) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::resize(unsigned long,char) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::_Rep::_M_destroy(const std::allocator<char>&) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::assign(const char*,unsigned long) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::string::assign(const std::string &) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::ostream & std::ostream_insert<char, std::char_traits<char> >(std::ostream &,const char*,long) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) std::ios::init(std::streambuf *) bin.v2/libs/math/build/sun/release/address-model-64/threading-multi/comp_ellint_1.o (symbol scope specifies local binding) ld: fatal: symbol referencing errors

The temporary fix for this problem is to delete line #19 in libs/math/build/Jamfile.v2. This line contains this:

<toolset>sun:<cxxflags>-xldscope=hidden

This indicates that a review of symbol scoping on Solaris has to be performed. It needs to follow the recommendations from the Solaris Studio 12.4 User's Guide as mentioned in ticket #11544. The changes have to be applied across the board all the Boost libraries that generated a shared object.

Change History (2)

comment:1 by John Maddock, 7 years ago

Actually I believe we do follow that guide - the issue in this case is quite different and not related to Boost as such: if you build with hidden visibility and your shared object references std lib symbols, then you get the linker errors shown above. I don't think there's anything we can do to fix this, as it's the C++ std lib that needs marking up as __global.

I've disabled use of hidden builds for now in https://github.com/boostorg/math/commit/8f252f78a02cc55b726b4a0e6198be2b0a5e0814

comment:2 by John Maddock, 7 years ago

Milestone: To Be DeterminedBoost 1.60.0
Resolution: fixed
Status: newclosed

Merged to develop, targeting 1.60.

Note: See TracTickets for help on using tickets.