[Boost-bugs] [Boost C++ Libraries] #11083: tools/build/src/tools/sun.jam needs additional -W0, -abiopt=mangle6 for C++ compilations

Subject: [Boost-bugs] [Boost C++ Libraries] #11083: tools/build/src/tools/sun.jam needs additional -W0, -abiopt=mangle6 for C++ compilations
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-06 20:12:20


#11083: tools/build/src/tools/sun.jam needs additional -W0,-abiopt=mangle6 for C++
compilations
------------------------------+---------------------------
 Reporter: Sergey.Sprogis@… | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: build
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 1. Description of the failure

 Several tests inside libs/icl/test directory fail with Oracle Studio 12.4
 C++ compiler on Solaris producing error message similar to what one of
 those tests: libs/icl/test/fastest_interval_set_infix.cpp produces:


     "CC" -library=stlport4 -xO4 -mt -erroff=%none -DBOOST_ALL_NO_LIB=1
 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED
 -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_TEST_NO_AUTO_LINK=1
 -DDATE_TIME_INLINE -DNDEBUG -D__typeof__=__typeof__ -I"../../.." -c -o
 "../../../bin.v2/libs/icl/test/fastest_interval_set_infix.test/sun/release
 /link-static/stdlib-sun-stlport/threading-
 multi/fastest_interval_set_infix_/fastest_interval_set_infix.o"
 "fastest_interval_set_infix_/fastest_interval_set_infix.cpp"

 "../../../boost/icl/concept/interval_set.hpp", line 187: Error:
 boost::icl::add_intersection<boost::icl::interval_set<boost::rational<int>,
 less, boost::icl::continuous_interval<boost::rational<int>, less>,
 allocator>>(boost::icl::interval_set<boost::rational<int>, less,
 boost::icl::continuous_interval<boost::rational<int>, less>, allocator>&,
 const boost::icl::interval_set<boost::rational<int>, less,
 boost::icl::continuous_interval<boost::rational<int>, less>, allocator>&,
 const boost::icl::continuous_interval<boost::rational<int>, less>&) and
 boost::icl::add_intersection<boost::icl::interval_set<boost::rational<int>,
 less, boost::icl::continuous_interval<boost::rational<int>, less>,
 allocator>>(boost::icl::interval_set<boost::rational<int>, less,
 boost::icl::continuous_interval<boost::rational<int>, less>, allocator>&,
 const boost::icl::interval_set<boost::rational<int>, less,
 boost::icl::continuous_interval<boost::rational<int>, less>, allocator>&,
 const boost::rational<int>&) have same extern name
 "__1cFboostDiclQadd_intersection4n0BMinterval_set4n0AIrational4Ci__nDstdEless3CTA__n0BTcontinuous_interval4n0C_n0E___n0DJallocator3C3_____6Fr3rk3r5_3_".


 2. Cause of the failure.

 This is a name-mangling compiler bug that compiler developers can't fix
 without breaking compatibility.
 The bug exists on Solaris/Sparc, and on Solaris x86 with -m32.
 The bug does not exist on Linux, or on Solaris x86 with -m64, because the
 bug was discovered before those platforms were supported.
 The workaround is to compile with -W0,-abiopt=mangle6, which is the
 default for the systems were the code works. When you use this option, you
 must recompile all C++ code and use the option everywhere.

 3. Possible Solution.

 To replace one line inside tools/build/src/tools/sun.jam inside actions
 compile.c++ subroutine
 by adding -W0,-abiopt=mangle6 option into compilation instruction.
 Specifically, replace:

     "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o
 "$(<)" "$(>)"

 with

     "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)"
 -W0,-abiopt=mangle6 -c -o "$(<)" "$(>)"

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