[asio].[solaris].[1_33_1] Update regarding test cases compilation

Hi Chris, As per our last conversation, am compiling & running the BOOST ASIO test case on Sun Solaris machine. The detail of this activity is as follow: Boost Version: 1_33_1 (64 bit build) Asio Version: 0.3.8 (64 bit build) Compiler Details: Sun Studio 11: C++ 5.8 Compiler OS Details: SunOS FICTESTING 5.10 Generic_118833-03 sun4u sparc SUNW,Sun-Fire-280R List of test cases executed successfully : basic_datagram_socket.cpp basic_deadline_timer.cpp basic_socket_acceptor.cpp basic_stream_socket.cpp buffer.cpp buffered_read_stream.cpp buffered_stream.cpp buffered_write_stream.cpp completion_condition.cpp datagram_socket_service.cpp deadline_timer.cpp deadline_timer_service.cpp error.cpp io_service.cpp is_read_buffered.cpp is_write_buffered.cpp placeholders.cpp read.cpp read_until.cpp socket_acceptor_service.cpp strand.cpp stream_socket_service.cpp time_traits.cpp unit_test.hpp write.cpp Changes done to run above test cases successfully: 1). Added #include<stdlib.h> in all above cpp files With out including stdlib.h, 1 common error detected during compilation of all above files. For example: while compiling "write.cpp"(with out including stdlib.h) following error crop up /asio_test>CC -I$HOME/1.33.1/64/include -xtarget=ultra -xarch=v9 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -library=stlport4 -features=tmplife -features=tmplrefstatic write.cpp -L$HOME/1.33.1/64/lib -lboost_system-sw -lxnet -lsocket "/db2/sunstudio11/SUNWspro/prod/include/CC/stlport4/stl/_algo.c", line 436: Error: The function "lrand48" must have a prototype. "/1.33.1/64/include/boost/test/impl/unit_test_suite.ipp", line 172 : Where: While instantiating "std::random_shuffle<unsigned long*>(unsigned long*, unsigned long*)". "/1.33.1/64/include/boost/test/impl/unit_test_suite.ipp", line 172 : Where: Instantiated from non-template code. 1 Error(s) detected. 2). Added #include<signal.h> in /boost/asio/detail/posix_signal_blocker.hpp With out including stdlib.h 6 common errors detected during compilation of io_service.cpp & strand.cpp was failing. For example: while compiling "strand.cpp "(with out including signal.h in /boost/asio/detail/posix_signal_blocker.hpp) following error crop up /asio_test>CC -mt -I$HOME/1.33.1/64/include -xtarget=ultra -xarch= v9 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -library=stlport4 -features=tmplife -features= tmplrefstatic strand.cpp -L$HOME/1.33.1/64/lib -lboost_system-sw-mt -lboost_thread-sw -mt -lxnet -lsocket "/1.33.1/64/include/boost/asio/detail/posix_signal_blocker.hpp", l ine 46: Error: The function "sigfillset" must have a prototype. "/1.33.1/64/include/boost/asio/detail/posix_signal_blocker.hpp", l ine 47: Error: The function "pthread_sigmask" must have a prototype. "/1.33.1/64/include/boost/asio/detail/posix_signal_blocker.hpp", l ine 54: Error: The function "pthread_sigmask" must have a prototype. "/1.33.1/64/include/boost/asio/detail/posix_signal_blocker.hpp", l ine 63: Error: The function "sigfillset" must have a prototype. "/1.33.1/64/include/boost/asio/detail/posix_signal_blocker.hpp", l ine 64: Error: The function "pthread_sigmask" must have a prototype. "/1.33.1/64/include/boost/asio/detail/posix_signal_blocker.hpp", l ine 72: Error: The function "pthread_sigmask" must have a prototype. 6 Error(s) detected. Following test case got failed on execution : socket_base.cpp Details : /asio_test>CC -I$HOME/1.33.1/64/include -xtarget=ultra -xarch=v9 - D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -library=stlport4 -features=tmplife -features=tmpl refstatic socket_base.cpp -L$HOME/1.33.1/64/lib -lboost_system-sw -lxnet -lsocket /export/home/gauravj/asio_test>./a.out Running 2 test cases... socket_base.cpp(376): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(386): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(387): error in "socket_base_runtime::test": check send_low_watermark2. value() == 4096 failed socket_base.cpp(396): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(406): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(407): error in "socket_base_runtime::test": check send_low_watermark4. value() == 8192 failed socket_base.cpp(440): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(448): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(449): error in "socket_base_runtime::test": check receive_low_watermar k2.value() == 4096 failed socket_base.cpp(458): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(466): error in "socket_base_runtime::test": check !ec failed socket_base.cpp(467): error in "socket_base_runtime::test": check receive_low_watermar k4.value() == 8192 failed *** 12 failures detected in test suite "socket_base" Regards, Gaurav DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.

Hello,
1). Added #include<stdlib.h> in all above cpp files 2). Added #include<signal.h> in
A good C++ practice is to include <cstdlib> and <csignal> instead of plain C-headers. Regards, Oliver

Hi Oliver, On Fri, 16 Feb 2007 08:45:28 +0100, Oliver.Kowalke@qimonda.com said:
Hello,
1). Added #include<stdlib.h> in all above cpp files 2). Added #include<signal.h> in
A good C++ practice is to include <cstdlib> and <csignal> instead of plain C-headers.
These are already included. From the error it seems that including <cstdlib> or <csignal> with Sun C++ will only cause the functions that are part of standard C++ to be defined, and not the POSIX functions. The headers <stdlib.h> or <signal.h> are required to get the POSIX functions as well. Cheers, Chris

Hi Gaurav, Thanks for taking the time to look into this! First, can you confirm for me whether the Sun C++ compiler defines the macro "__sun"? On Fri, 16 Feb 2007 12:08:46 +0530, Gaurav.Jain@iflexsolutions.com said:
1). Added #include<stdlib.h> in all above cpp files
Ok.
2). Added #include<signal.h> in /boost/asio/detail/posix_signal_blocker.hpp
Ok.
Following test case got failed on execution : socket_base.cpp
It seems that the SO_SNDLOWAT and SO_RCVLOWAT socket options are not supported on Solaris 10. I just need to confirm this, and if it is the case I will change the code to expect this failure. Cheers, Chris
participants (3)
-
Christopher Kohlhoff
-
Gaurav.Jain@iflexsolutions.com
-
Oliver.Kowalke@qimonda.com