Reg Boost Regex Compilation problems on Sun Solaris 5.9

Hello All, We are using the Boost Regex library for C++ in 1 of our projects. I have downloaded Boost Regex version 1.30. The library compiled fine on Linux with GCC compiler. But we use Sun Solaris 5.9 on 1 of the production boxes with Sun Studio 10 compiler. And it is giving us compilation errors while trying to install the libraries there. Is there any way you can let us know the appropriate thing to do? I am attaching the output from the ./configure script and the makefile output. We tried to debug an error and kind of fixed it. I am attaching the change that I made. I would appreciate your response regarding the same. * Here are the outputs:* * Output for libs/config/configure :* *** ./configure: boost configuration utility *** Please stand by while exploring compiler capabilities... Be patient - this could take some time... Note that this test script only gives an approximate configuration - you will need to test the results carefully using the boost regresion test suite before using the results. *** Info : .cpp used as extension for tests checking for boost main tree... ./../.. checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... CC checking for C++ compiler default output... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... no checking whether CC accepts -g... yes checking for pthread_exit in -lpthread... yes checking for cos in -lm... yes checking for clock in -lrt... yes checking Koenig lookup ... OK checking std::auto_ptr ... OK checking Full partial specialization support. ... OK checking functions in <ctype.h> ... OK checking template specialisations of cv-qualified types ... OK checking template specialisations of cv-qualified void ... OK checking <wchar.h> and <cwchar> ... OK checking <wctype.h> and <cwctype> ... OK checking deduced typenames ... OK checking dependent nested template classes ... OK checking dependent non-type template parameters ... OK checking <exception> is in namespace std ... OK checking exception handling support ... OK checking non-deduced function template parameters ... OK checking no function template ordering ... OK checking std::numeric_limits<__int64> ... OK checking inline member constant initialisation ... OK checking long long and integral constant expressions ... OK checking template iterator-constructors ... Failed checking <limits> ... OK checking compile time constants in <limits> ... OK checking std::numeric_limits<long long> ... OK checking Specialisation of individual member functions. ... OK checking member templates keyword ... OK checking member template friends ... OK checking member templates ... OK checking friend operators in namespace ... OK checking partial specialisation ... OK checking private in aggregate types ... OK checking pointers to const member functions ... OK checking detection of unreachable returns ... OK checking <sstream> ... OK checking std::allocator ... Failed checking std::distance ... Failed checking std::iterator_traits ... Failed checking std::iterator ... OK checking std::locale ... OK checking std::messages<charT> ... OK checking std::min and std::max ... OK checking That the std output iterators are assignable ... OK checking std::use_facet ... Failed checking std::basic_streambuf<wchar_t> ... OK checking std::wstring ... OK checking std:: namespace for C API's ... OK checking swprintf ... OK checking template template paramters. ... OK checking using template declarations ... OK checking no void returns ... OK checking intrinsic wchar_t ... OK checking two argument version of use_facet... Yes checking BeOS Threads... no checking clock_gettime... Yes checking <dirent.h>... Yes checking GetSystemTimeAsFileTime... no checking gettimeofday... Yes checking <hashset> and <hashmap>... no checking long long... Yes checking macro version of use_facet: _USE... no checking __int64... no checking nanosleep... Yes checking <nl_types.h>... Yes checking Named return value optimisation.... no checking limited std::allocator support... no checking pthread_delay_np... no checking pthread_mutexattr_settype... Yes checking pthread_yield... no checking POSIX Threads... Yes checking sched_yield... Yes checking SGI style <type_traits.h>... no checking sigaction... Yes checking <slist>... no checking stdint.h... no checking STLport version of use_facet... no checking <unistd.h>... Yes checking microsoft member templates... Yes checking microsoft's version of std::iterator... no checking MS Windows threads... no boost_base=./../.. checking original configuration ... done checking new configuration ... done configure: creating ./config.status config.status: executing default commands Adjustments to boost configuration have been written to user.hpp, copy this to boost/config/user.hpp to use "as is", or define BOOST_SITE_CONFIG to point to its location. * Then copied the user.hpp to boost/config folder. Then used the sunpro.makfor SUN SOLARIS. * * Output for dmake -f sunpro.mak :* dmake: Warning: Can't find `make.rules': No such file or directory dmake: defaulting to parallel mode. See the man page dmake(1) for more information on setting up the .dmakerc file. nwscpt01 --> 1 job mkdir -p sunpro nwscpt01 --> 1 job mkdir -p sunpro/libboost_regex nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/cpp_regex_traits.o ../src/cpp_regex_traits.cpp nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/cregex.o ../src/cregex.cpp nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/c_regex_traits_common.o ../src/c_regex_traits_common.cpp nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/c_regex_traits.o ../src/c_regex_traits.cpp nwscpt01 --> Job output CC -c -O2 -I../../../ -o sunpro/libboost_regex/c_regex_traits.o ../src/c_regex_traits.cpp "../src/c_regex_traits.cpp", line 722: Warning: i hides boost::c_regex_traits<char>::i. 1 Warning(s) detected. nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/fileiter.o ../src/fileiter.cpp nwscpt01 --> Job output CC -c -O2 -I../../../ -o sunpro/libboost_regex/fileiter.o ../src/fileiter.cpp "/usr/include/iso/limits_iso.h", line 51: Error: #error "chars are signed or unsigned". *** Error code 1 dmake: Fatal error: Command failed for target `sunpro/libboost_regex/fileiter.o' * So in libs/regex/src/fileiter.cpp added following line:* * #include <sys/isa_defs.h>* * dmake -f sunpro.mak again output:* dmake: Warning: Can't find `make.rules': No such file or directory dmake: defaulting to parallel mode. See the man page dmake(1) for more information on setting up the .dmakerc file. nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/fileiter.o ../src/fileiter.cpp nwscpt01 --> 1 job CC -c -O2 -I../../../ -o sunpro/libboost_regex/instances.o ../src/instances.cpp nwscpt01 --> Job output CC -c -O2 -I../../../ -o sunpro/libboost_regex/instances.o ../src/instances.cpp "../../..//boost/regex/v3/instances.hpp", line 104: Error: Could not find a match for boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::reg_expression<boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::I>(const boost::detail::allocator<char>&). "../../..//boost/regex/v3/instances.hpp", line 105: Error: Could not find a match for boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::reg_expression<boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::I>(const char*, unsigned, const boost::detail::allocator<char>&). "../../..//boost/regex/v3/instances.hpp", line 106: Error: Could not find a match for boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::reg_expression<boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::I>(const char*, unsigned, unsigned, const boost::detail::allocator<char>&). "../../..//boost/regex/v3/instances.hpp", line 107: Error: Could not find a match for boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::reg_expression<boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::I>(const boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>&)."../../..//boost/regex/v3/instances.hpp", line 109: Error: Could not find a match for boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::operator=<boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::ST, boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::SA>(const boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>&). "../../..//boost/regex/v3/instances.hpp", line 114: Error: Could not find a match for boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::set_expression<boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::ST, boost::reg_expression<char, boost::regex_traits<char>, boost::detail::allocator<char>>::SA>(const char*, const char*, unsigned). 6 Error(s) detected. *** Error code 6 dmake: Fatal error: Command failed for target `sunpro/libboost_regex/instances.o' Please let me know, if you need anything else from my side. Thanks. - Amit Parate

Hi, Sun C++ requires some command line options to be able to compile Boost libraries. At least you should use -livarry=stlport4. Take a look at my Boost HowTo at http://blogs.sun.com/sga/entry/boost_mini_howto. It's dedicated to Boost 1.32. Please note that you have to apply patch to make Boost 1.32 compatible to Sun C++. Boost 1.34 works quite good without any patches. Take a look at http://blogs.sun.com/sga/entry/how_to_compile_boost_1 and comments to this post. 2007/7/27, Amit Parate <amit.parate@gmail.com>:
We are using the Boost Regex library for C++ in 1 of our projects. I have downloaded Boost Regex version 1.30. The library compiled fine on Linux with GCC compiler. But we use Sun Solaris 5.9 on 1 of the production boxes with Sun Studio 10 compiler. And it is giving us compilation errors while trying to install the libraries there.
Is there any way you can let us know the appropriate thing to do? I am attaching the output from the ./configure script and the makefile output.
We tried to debug an error and kind of fixed it. I am attaching the change that I made.
-- Simon Atanasyan Sun C++ Development Team
participants (2)
-
Amit Parate
-
Simon Atanasyan