Boost logo

Boost Users :

Subject: Re: [Boost-users] compilation problems with thread/chrono & boost 1.51 & HPUX
From: Avi Bahra (avibahra_at_[hidden])
Date: 2012-09-05 05:52:42


>Le 04/09/12 11:44, Avi Bahra a ?crit :
>>>> On 3.9.2012. 10:26, Avi Bahra wrote:
>>>>> Can any one suggest *any* hacks/workarounds that gets me pass these errors.
>>>>> Is it possible to use gcc on HPUX with boost 1.51 ?
>>>> The docs for boost thread 1.51 say this:
>>>>
>>>> Boost.Thread uses by default Boost.Chrono for the time related
>>>> functions. For backward compatibility and also for compilers that don't
>>>> work well with Boost.Chrono the user can define
>>>> BOOST_THREAD_DONT_USE_CHRONO. If BOOST_THREAD_DONT_USE_SYSTEM is defined
>>>> then BOOST_THREAD_DONT_USE_CHRONO is defined implicitly.
>>>>
>>>> BOOST_THREAD_USES_CHRONO is defined when Boost.Thread uses Boost.Chrono.
>> I have already tried BOOST_THREAD_DONT_USE_CHRONO and it has no effect.
>> It appears that some of headers files are not guarded with this.
>>
>> In my case
>> $BOOST_ROOT/boost/chrono/system_clocks.hpp
>This evidently should not be included. Could you point from where it is
>included?

   libs/chrono/src/chrono.cpp fails to compile with errors in system_clocks.hpp
   and overflow_helpers.hpp

>> $BOOST_ROOT/boost/ratio/detail/overflow_helpers.hpp
>This evidently should not be included. Could you point from where it is
>included?

   libs/chrono/src/chrono.cpp fails to compile with errors in system_clocks.hpp
   and overflow_helpers.hpp

   libs/chrono/src/process_cpu_clocks.cpp fails to compile
   with error in overflow_helpers.hpp

>> $BOOST_ROOT/boost/thread/future.hpp
>Could you point where in this file the compiler fails?
>> do not compile,
>>

   "libs/thread/src/future.cpp"

>>
>> Also Is it possible to make a request to change:
>>
>> $BOOST_ROOT/boost/thread/future.hpp
>>
>> line:603
>> for(count_type i=0;i<count;++i)
>> {
>> #if defined __DECCXX || defined __SUNPRO_CC
>> locks[i]=boost::unique_lock<boost::mutex>(futures[i].future_->mutex).move();
>> #else
>> locks[i]=boost::unique_lock<boost::mutex>(futures[i].future_->mutex);
>> #endif
>> }
>>
>> T0:
>>
>> for(count_type i=0;i<count;++i)
>> {
>> #if defined __DECCXX || defined __SUNPRO_CC || defined __hpux
>> locks[i]=boost::unique_lock<boost::mutex>(futures[i].future_->mutex).move();
>> #else
>> locks[i]=boost::unique_lock<boost::mutex>(futures[i].future_->mutex);
>> #endif
>> }
>>
>Please could you create a ticket for that?

 created ticket 7329.

It should be noted that there also numerous warnings in compiling
file libs/chrono/src/process_cpu_clocks.cpp
i.e
"./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp", line
118: warning #2940-D: missing return statement at end of non-void
function "boost::chrono::process_real_cpu_clock::now(boost::system::error_code
&)"
  }
"./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp", line
194: warning #2940-D: missing return statement at end of non-void
function "boost::chrono::process_user_cpu_clock::now(boost::system::error_code
&)"
  }
"./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp", line
271: warning #2940-D: missing return statement at end of non-void
function "boost::chrono::process_system_cpu_clock::now(boost::system::error_code
&)"
  }
"./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp", line
350: warning #2940-D: missing return statement at end of non-void
function "boost::chrono::process_cpu_clock::now(boost::system::error_code
&)"
  }

 These could easily be removed by simple restructure of the code.

Best regards,
Ta,
    Avi


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