Re: [boost] [asio].[hp-ux].[1_33_1] Build related issue

Christopher Kohlhoff <chris <at> kohlhoff.com> writes:
If possible, can you retry with the boost.asio 0.3.8 release
candidate:
http://sourceforge.net/project/showfiles.php?group_id=122478 or against the CVS HEAD version of boost. It won't work for HP-UX yet, but I'd like to make the changes against the latest source code. If
the
changes are trivial (meaning changes to #ifdefs only) then I'd be happy to add support for HP-UX in 0.3.8 (but only with _XOPEN_SOURCE_EXTENDED undefined).
Cheers, Chris
Hi Chris, As suggested, I have tried to build daytime_client.cpp - asio 0.3.8 with boost 1.33.1 on Solaris 10. As per Solaris 10 man pages msghdr structure is The recvmsg() function call uses a msghdr structure to minimize the number of directly supplied parameters. This structure is defined in <sys/socket.h> and includes the fol- lowing members: caddr_t msg_name; /* optional address */ int msg_namelen; /* size of address */ struct iovec *msg_iov; /* scatter/gather array */ int msg_iovlen; /* # elements in msg_iov */ caddr_t msg_accrights; /* access rights sent/received */ int msg_accrightslen; Based on this information I have replaced all the occurrences of msg.msg_control = 0; msg.msg_controllen = 0; msg.msg_flags = 0; With msg.msg_accrights = 0; msg.msg_accrightslen = 0; in asio/detail/socket_ops.hpp. Number of errors have come down to 3 on Solaris 10. boost/1_33_1/64/boost/array.hpp", line 74: Error: Too few arguments for template std::reverse_iterator<boost::T*>. "/boost/1_33_1/64/boost/array.hpp", line 166: Where: While specializing "boost::array<boost::T, boost::N>". "/boost/1_33_1/64/boost/array.hpp", line 166: Where: Specialized in non-template code. "/boost/1_33_1/64/boost/array.hpp", line 75: Error: Too few arguments for template std::reverse_iterator<const boost::T*>. "/boost/1_33_1/64/boost/array.hpp", line 166: Where: While specializing "boost::array<boost::T, boost::N>". "/boost/1_33_1/64/boost/array.hpp", line 166: Where: Specialized in non-template code. "daytime_client.cpp", line 24: Error: The operation "std::ostream<<boost::asio::error" is illegal. 3 Error(s) detected. I am not sure if Asio 0.3.8 will work with Boost 1.33.1. Regards, Gaurav Jain

The recvmsg() function call uses a msghdr structure to minimize the number of directly supplied parameters. This structure is defined in <sys/socket.h> and includes the fol- lowing members:
caddr_t msg_name; /* optional address */ int msg_namelen; /* size of address */ struct iovec *msg_iov; /* scatter/gather array */ int msg_iovlen; /* # elements in msg_iov */ caddr_t msg_accrights; /* access rights sent/received */ int msg_accrightslen;
Based on this information I have replaced all the occurrences of msg.msg_control = 0; msg.msg_controllen = 0; msg.msg_flags = 0; With msg.msg_accrights = 0; msg.msg_accrightslen = 0;
This is the same behaviour on HP/UX. Without _XOPEN_SOURCE_EXTENDED (on HP/UX) you get the old HP/UX specific socket api (-> different structes like struct msghdr). The same seams to apply to Solaris 10. Maybe you can find an hint in the documention for a special compiler flag in order to get X/Open compliant functions and structures as Christopher uses in its code. It would be cumbersome to manage each special UNIX flaviour socket api in you code. Using an standardized api would be better for future investments and because the UNIX supplier can deprecate its old socket api too in future. Oliver

Hi Gaurav, On Thu, 8 Feb 2007 18:04:55 +0530, Gaurav.Jain@iflexsolutions.com said:
Based on this information I have replaced all the occurrences of msg.msg_control = 0; msg.msg_controllen = 0; msg.msg_flags = 0; With msg.msg_accrights = 0; msg.msg_accrightslen = 0;
Actually I think it would be better for now to do as Oliver suggests and find the correct #define to use to enable X/Open compliance. As I said before, at this stage I want to avoid changing actual code before I release 0.3.8 as far as is possible.
Number of errors have come down to 3 on Solaris 10. boost/1_33_1/64/boost/array.hpp", line 74: Error: Too few arguments for template std::reverse_iterator<boost::T*>. "/boost/1_33_1/64/boost/array.hpp", line 166: Where: While specializing "boost::array<boost::T, boost::N>". "/boost/1_33_1/64/boost/array.hpp", line 166: Where: Specialized in non-template code. "/boost/1_33_1/64/boost/array.hpp", line 75: Error: Too few arguments for template std::reverse_iterator<const boost::T*>. "/boost/1_33_1/64/boost/array.hpp", line 166: Where: While specializing "boost::array<boost::T, boost::N>". "/boost/1_33_1/64/boost/array.hpp", line 166: Where: Specialized in non-template code.
This seems to be an issue between boost::array and the Sun compiler, and not to do with asio as such. I see the same errors in the regression logs for boost CVS HEAD: http://engineering.meta-comm.com/boost-regression/CVS-HEAD/developer/output/...
"daytime_client.cpp", line 24: Error: The operation It seems "std::ostream<<boost::asio::error" is illegal.
Are you sure the daytime_client.cpp source you are using is the one written for 0.3.8? That line number and error message corresponds to the 0.3.7 source. Cheers, Chris
participants (3)
-
Christopher Kohlhoff
-
Gaurav.Jain@iflexsolutions.com
-
Oliver.Kowalke@qimonda.com