Boost logo

Boost Users :

Subject: [Boost-users] Unable to build boost 1.61 on Solaris 11.3 w/ DevStudio 12.5
From: Jon Earle (earlej_at_[hidden])
Date: 2016-09-27 13:02:28


Please bear with me as I am not really familiar with Solaris.

I have an 11.3 box, where I installed the developer studio 12.5. Following directions at https://blogs.oracle.com/studiocpp/entry/test, I tried to build boost 1.61. It fails horribly!

I get as far as:

>>
create compiler configuration for Studio 12.4 C++03 (using Boost.Config configure) so all the fancy C++11 stuff in Boost is not yet enabled even if we compile with -std=c++11.
] cd libs/config; CXX=CC CXXFLAGS="-std=c++03 -m64" LDFLAGS="-std=c++03 -m64" sh ./configure

<<

which fails. Config.log contains:

configure:1959: CC -std=c++03 -m64 -std=c++03 -m64 conftest.cpp >&5
CC: Warning: Option -std=c++03 passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -std=c++03 passed to ld, if ld is invoked, ignored otherwise
ld: fatal: option '-d' has illegal argument '=c++03'
ld: fatal: option '-d' has illegal argument '=c++03'

Removing "-std=c++03" does allow the configure process to run but not as it was intended.

Building with: "./b2 --user-config=user-config.jam address-model=64 -j12 --disable-icu"

gives me a lot of errors, such as those below. Below my problem description, I've pasted the build errors I noticed until I broke the build. What is the proper sequence to build boost 1.61 on Solaris?

Many thanks for any help!

Build output (excerpts):

root_at_solaris:~/jearle/crypto/3rdpartySW/boost-build/boost_1_61_0# ./b2 --user-config=user-config.jam address-model=64 -j12 --disable-icu
Performing configuration checks

    - 32-bit : yes (cached)
    - arm : no (cached)
    - mips1 : no (cached)
    - power : no (cached)
    - sparc : no (cached)
    - x86 : yes (cached)

Building the Boost C++ Libraries.

    - symlinks supported : yes (cached)
error: No best alternative for libs/context/build/asm/make_x86_64_sysv_elf_gas.o
    next alternative: required properties: <threading>multi
        matched
    next alternative: required properties: <threading>multi
        matched
error: No best alternative for libs/context/build/asm/jump_x86_64_sysv_elf_gas.o
    next alternative: required properties: <threading>multi
        matched
    next alternative: required properties: <threading>multi
        matched
error: No best alternative for libs/context/build/asm/ontop_x86_64_sysv_elf_gas.o
    next alternative: required properties: <threading>multi
        matched
    next alternative: required properties: <threading>multi
        matched
    - C++11 mutex : no (cached)
    - lockfree boost::atomic_flag : no (cached)
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - zlib : no (cached)
    - icu : no (cached)
    - icu (lib64) : no (cached)
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
    - compiler-supports-visibility : no (cached)
    - compiler-supports-ssse3 : yes (cached)
    - has_icu builds : no (cached)
    - compiler-supports-avx2 : no (cached)
    - gcc visibility : no (cached)
    - long double support : yes (cached)
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
error: No best alternative for libs/context/build/asm/make_x86_64_sysv_elf_gas.o
    next alternative: required properties: <threading>multi
        matched
    next alternative: required properties: <threading>multi
        matched
error: No best alternative for libs/context/build/asm/jump_x86_64_sysv_elf_gas.o
    next alternative: required properties: <threading>multi
        matched
    next alternative: required properties: <threading>multi
        matched
error: No best alternative for libs/context/build/asm/ontop_x86_64_sysv_elf_gas.o
    next alternative: required properties: <threading>multi
        matched
    next alternative: required properties: <threading>multi
        matched
    - zlib : no (cached)
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.

...

...patience...
...found 9011 targets...
...updating 845 targets...
sun.compile.c++ bin.v2/libs/wave/build/sun/release/address-model-64/link-static/threading-multi/instantiate_re2c_lexer.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"./boost/detail/iterator.hpp", line 19: Error: iterator_traits is not a member of std.
"./boost/wave/util/flex_string.hpp", line 128: Error: Templates can only declare classes or functions.
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: "," expected instead of "!=".
"./boost/wave/util/flex_string.hpp", line 131: Error: A declaration was expected instead of "--".
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: Multiple declaration for n.
"./boost/wave/util/flex_string.hpp", line 131: Error: Use ";" to terminate declarations.
"./boost/wave/util/flex_string.hpp", line 131: Error: A declaration was expected instead of "++".
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: Use ";" to terminate declarations.
"./boost/wave/util/flex_string.hpp", line 131: Error: A declaration was expected instead of "++".
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: "," expected instead of ")".
"./boost/wave/util/flex_string.hpp", line 135: Error: A declaration was expected instead of "return".
"./boost/wave/util/flex_string.hpp", line 135: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 2538: Error: A declaration was expected instead of "}".
"./boost/wave/util/flex_string.hpp", line 2539: Error: A declaration was expected instead of "}".
"./boost/wave/token_ids.hpp", line 359: Error: flex_string is not a member of boost::wave::util.
"./boost/wave/token_ids.hpp", line 359: Error: A declaration does not specify a tag or an identifier.
"./boost/wave/token_ids.hpp", line 359: Error: Use ";" to terminate declarations.
"./boost/wave/token_ids.hpp", line 359: Error: A declaration was expected instead of "<".
"./boost/wave/token_ids.hpp", line 359: Error: A declaration does not specify a tag or an identifier.
"./boost/wave/token_ids.hpp", line 359: Error: Use ";" to terminate declarations.
"./boost/wave/token_ids.hpp", line 359: Error: A declaration was expected instead of ",".
"./boost/wave/token_ids.hpp", line 359: Warning: declarator required in declaration.
"./boost/wave/token_ids.hpp", line 359: Error: Use ";" to terminate declarations.
"./boost/wave/token_ids.hpp", line 359: Error: A declaration was expected instead of ",".
"./boost/wave/token_ids.hpp", line 359: Warning: declarator required in declaration.
"./boost/wave/token_ids.hpp", line 359: Error: Use ";" to terminate declarations.
"./boost/wave/token_ids.hpp", line 359: Error: A declaration was expected instead of ",".
"./boost/wave/token_ids.hpp", line 359: Error: CowString is not a member of boost::wave::util.
Compilation aborted, too many Error messages.

 ...

    "CC" -xO4 -mt -erroff=%none -std=c++11 -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_USE_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/wave/build/sun/release/address-model-64/link-static/threading-multi/instantiate_re2c_lexer_str.o" "libs/wave/src/instantiate_re2c_lexer_str.cpp"

...failed sun.compile.c++ bin.v2/libs/wave/build/sun/release/address-model-64/link-static/threading-multi/instantiate_re2c_lexer_str.o...
sun.compile.c++ bin.v2/libs/wave/build/sun/release/address-model-64/link-static/threading-multi/wave_config_constant.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"./boost/detail/iterator.hpp", line 19: Error: iterator_traits is not a member of std.
"./boost/wave/util/flex_string.hpp", line 128: Error: Templates can only declare classes or functions.
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: "," expected instead of "!=".
"./boost/wave/util/flex_string.hpp", line 131: Error: A declaration was expected instead of "--".
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: Multiple declaration for n.
"./boost/wave/util/flex_string.hpp", line 131: Error: Use ";" to terminate declarations.
"./boost/wave/util/flex_string.hpp", line 131: Error: A declaration was expected instead of "++".
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: Use ";" to terminate declarations.
"./boost/wave/util/flex_string.hpp", line 131: Error: A declaration was expected instead of "++".
"./boost/wave/util/flex_string.hpp", line 131: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 131: Error: "," expected instead of ")".
"./boost/wave/util/flex_string.hpp", line 135: Error: A declaration was expected instead of "return".
"./boost/wave/util/flex_string.hpp", line 135: Warning: Implicit int is not supported in C++.
"./boost/wave/util/flex_string.hpp", line 2538: Error: A declaration was expected instead of "}".
"./boost/wave/util/flex_string.hpp", line 2539: Error: A declaration was expected instead of "}".
13 Error(s) and 5 Warning(s) detected.

...

    "CC" -xO4 -mt -erroff=%none -std=c++11 -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/filesystem/build/sun/release/address-model-64/link-static/threading-multi/portability.o" "libs/filesystem/src/portability.cpp"

...failed sun.compile.c++ bin.v2/libs/filesystem/build/sun/release/address-model-64/link-static/threading-multi/portability.o...
sun.compile.c++ bin.v2/libs/filesystem/build/sun/release/address-model-64/link-static/threading-multi/utf8_codecvt_facet.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
sun.compile.c++ bin.v2/libs/filesystem/build/sun/release/address-model-64/link-static/threading-multi/path.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"./boost/detail/iterator.hpp", line 19: Error: iterator_traits is not a member of std.
1 Error(s) detected.

...
    "CC" -xO4 -mt -erroff=%none -std=c++11 -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG -I"." -c -o "bin.v2/libs/iostreams/build/sun/release/address-model-64/link-static/threading-multi/bzip2.o" "libs/iostreams/src/bzip2.cpp"

...failed sun.compile.c++ bin.v2/libs/iostreams/build/sun/release/address-model-64/link-static/threading-multi/bzip2.o...
...skipped <pbin.v2/libs/iostreams/build/sun/release/address-model-64/link-static/threading-multi>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/sun/release/address-model-64/link-static/threading-multi>mapped_file.o...
...skipped <pstage/lib>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/sun/release/address-model-64/link-static/threading-multi>libboost_iostreams.a...
sun.compile.c++ bin.v2/libs/log/build/sun/release/address-model-64/build-no/link-static/log-api-unix/threading-multi/named_scope.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"./boost/log/utility/string_literal.hpp", line 76: Error: Too few arguments for template std::reverse_iterator<std::_Iterator, std::_Category, std::_Tt, std::_Reference, std::_Pointer, std::_Distance>.
"./boost/log/attributes/named_scope.hpp", line 82: Where: While specializing "boost::log::v2s_mt_posix::basic_string_literal<char, std::char_traits<char>>".
"./boost/log/attributes/named_scope.hpp", line 82: Where: Specialized in non-template code.
"./boost/log/attributes/named_scope.hpp", line 219: Error: Too few arguments for template std::reverse_iterator<std::_Iterator, std::_Category, std::_Tt, std::_Reference, std::_Pointer, std::_Distance>.
"./boost/log/attributes/named_scope.hpp", line 220: Error: Too few arguments for template std::reverse_iterator<std::_Iterator, std::_Category, std::_Tt, std::_Reference, std::_Pointer, std::_Distance>.
"./boost/log/attributes/named_scope.hpp", line 295: Error: Cannot cast from boost::log::v2s_mt_posix::attributes::named_scope_list::iter<1> to int.
"./boost/log/attributes/named_scope.hpp", line 299: Error: Cannot cast from boost::log::v2s_mt_posix::attributes::named_scope_list::iter<1> to int.
"./boost/log/attributes/named_scope.hpp", line 318: Error: The operation "* int" is illegal.
"libs/log/src/named_scope.cpp", line 213: Error: Cannot use void* to initialize boost::log::v2s_mt_posix::attributes::named_scope_entry*.
"libs/log/src/named_scope.cpp", line 217: Error: construct is not a member of std::allocator<boost::log::v2s_mt_posix::attributes::named_scope_entry>.
"libs/log/src/named_scope.cpp", line 235: Error: destroy is not a member of std::allocator<boost::log::v2s_mt_posix::attributes::named_scope_entry>.
9 Error(s) detected.

...

    "CC" -xO4 -mt -erroff=%none -std=c++11 -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_DATE_TIME_STATIC_LINK -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/sun/release/address-model-64/link-static/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp"

...failed sun.compile.c++ bin.v2/libs/date_time/build/sun/release/address-model-64/link-static/threading-multi/gregorian/greg_month.o...
...skipped <pbin.v2/libs/date_time/build/sun/release/address-model-64/link-static/threading-multi>libboost_date_time.a for lack of <pbin.v2/libs/date_time/build/sun/release/address-model-64/link-static/threading-multi>gregorian/greg_month.o...
...skipped <pstage/lib>libboost_date_time.a for lack of <pbin.v2/libs/date_time/build/sun/release/address-model-64/link-static/threading-multi>libboost_date_time.a...
sun.compile.c++ bin.v2/libs/log/build/sun/release/address-model-64/build-no/link-static/log-api-unix/threading-multi/thread_id.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"libs/log/src/thread_id.cpp", line 213: Warning (Anachronism): Formal argument 2 of type extern "C" void(*)(void*) in call to pthread_key_create(unsigned*, extern "C" void(*)(void*)) is being passed void(*)(void*).
1 Warning(s) detected.
sun.compile.c++ bin.v2/libs/log/build/sun/release/address-model-64/build-no/link-static/log-api-unix/threading-multi/severity_level.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"./boost/move/unique_ptr.hpp", line 434: Error: typenamebmupd is not defined.
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
"./boost/move/unique_ptr.hpp", line 434: Error: get_element_type is not defined.
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
"./boost/move/unique_ptr.hpp", line 434: Error: "," expected instead of "<".
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
"./boost/move/unique_ptr.hpp", line 434: Error: Illegal value for template parameter.
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
"./boost/move/unique_ptr.hpp", line 434: Error: Template template-parameter boost::move_upmu::U requires a class template argument.
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
"./boost/move/unique_ptr.hpp", line 434: Error: type is not a member of boost::move_upmu::missing_virtual_destructor<boost::movelib::default_delete<unsigned long>, int>.
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
"./boost/move/unique_ptr.hpp", line 434: Error: value is not defined.
"libs/log/src/severity_level.cpp", line 66: Where: While instantiating "boost::movelib::unique_ptr<unsigned long, boost::movelib::default_delete<unsigned long>>::unique_ptr<unsigned long*>(unsigned long*, boost::move_upmu::nat*)".
"libs/log/src/severity_level.cpp", line 66: Where: Instantiated from non-template code.
7 Error(s) detected.

...

...failed sun.compile.c++ bin.v2/libs/log/build/sun/release/address-model-64/build-no/link-static/log-api-unix/threading-multi/syslog_backend.o...
sun.compile.c++ bin.v2/libs/log/build/sun/release/address-model-64/link-static/log-api-unix/threading-multi/dump_ssse3.o
CC: Warning: Option -std=c++11 passed to ld, if ld is invoked, ignored otherwise
"libs/log/src/dump_ssse3.cpp", line 179: ube: error: _mm_lddqu_si128 intrinsic requires at least -xarch=sse3.
CC: ube failed for libs/log/src/dump_ssse3.cpp

    "CC" -xO4 -mt -erroff=%none -std=c++11 -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D__STDC_CONSTANT_MACROS -D__typeof__=__typeof__ -I"." -c -o "bin.v2/libs/log/build/sun/release/address-model-64/link-static/log-api-unix/threading-multi/dump_ssse3.o" "libs/log/src/dump_ssse3.cpp"



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net