Boost 1.81.0 (chrono and thread) library compilation is failing with Sun Studio 12.5

129 views Asked by At

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

0

There are 0 answers