0

Facing below error when i am compiling chrono or thread alone in sun studio 12.5 Error I am getting while build boost thread/ chrono is below

"CC" -std=c++11 -m64 -xarch=sparc -mt  -lCstd -xO4 -mt -erroff=%none -xldscope=hidden -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden/future.o" "libs/thread/src/future.cpp"
...failed sun.compile.c++ bin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden/future.o...
...skipped <pbin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread.a for lack of <pbin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <p/export/home/ramesh/compiled_library/boost_1_81_0/lib>libboost_thread.a for lack of <pbin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread.a...
...skipped <pbin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-variant-static.cmake for lack of <pbin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread.a...
...skipped <p/export/home/ramesh/compiled_library/boost_1_81_0/lib/cmake/boost_thread-1.81.0>libboost_thread-variant-static.cmake for lack of <pbin.v2/libs/thread/build/sun/release/address-model-64/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-variant-static.cmake...
sun.compile.c++ bin.v2/libs/thread/build/sun/release/address-model-64/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o
"./boost/system/detail/error_condition.hpp", line 298: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 272: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 310: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 284: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 298: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 272: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 298: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 272: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 310: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 284: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 310: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_condition.hpp", line 284: Error: type is not a member of boost::system::detail::enable_if<0, void>.
"./boost/system/detail/error_code.hpp", line 173: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/detail/error_code.hpp", line 190: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/detail/error_code.hpp", line 195: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/detail/error_code.hpp", line 200: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/detail/std_category_impl.hpp", line 62: Error: Too many initializers for bc.
"./boost/system/detail/std_category_impl.hpp", line 67: Error: Too many initializers for bc.
"./boost/system/detail/std_category_impl.hpp", line 75: Error: Too many initializers for bc.
"./boost/system/errc.hpp", line 36: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/errc.hpp", line 42: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/system_error.hpp", line 38: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/system_error.hpp", line 38: Error: Too many initializers for code_.
"./boost/system/system_error.hpp", line 41: Error: Too many arguments in cast to boost::system::error_code.
"./boost/system/system_error.hpp", line 41: Error: Too many initializers for code_.
Compilation aborted, too many Error messages.
[1:40 PM]

Using Same compiler option (C++11) all other libraries in boost able to build. These two Chrono and thread is giving similar to above error. Above error pasted is from boost thread compilation.

Command which have used to build:

./b2 install address-model=64 runtime-link=shared "cflags=-std=c++11 linkflags=-std=c++11" threading=multi toolset=sun --prefix=/export/home/ramesh/compiled_library/boost_1_81_0/ --with-chrono

Environment

Sun OS:5.10 Sparc
Compiler: Sun studio 12.5

Command which have used to build: ./b2 install address-model=64 runtime-link=shared "cflags=-std=c++11 linkflags=-std=c++11" threading=multi toolset=sun --prefix=/export/home/ramesh/compiled_library/boost_1_81_0/ --with-chrono

sehe
  • 374,641
  • 47
  • 450
  • 633
Thriveni
  • 1
  • 1
  • I don't see Sun/Sparc in the test matrix https://www.boost.org/development/tests/master/developer/summary.html have you checked the official support status? – sehe Mar 01 '23 at 15:29
  • It does look like a compiler issue, where the compiler doesn't correctly SFINAE the operators that have been touched in relation to [issue #93](https://github.com/boostorg/system/issues/91). You might want to take it up there, or open a new issue against the Boost System repository – sehe Mar 01 '23 at 15:38
  • Thanks for the info, have raised issue in boost-system git https://github.com/boostorg/system/issues/107 – Thriveni Mar 03 '23 at 05:03

0 Answers0