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@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