Opened 10 years ago

Closed 10 years ago

#8212 closed Bugs (fixed)

Boost thread compilation error on Solaris 10

Reported by: nicolas.jouvray@… Owned by: viboes
Milestone: Boost 1.54.0 Component: thread
Version: Boost 1.53.0 Severity: Problem
Keywords: compilation, Solaris Cc:

Description

Boost thread does not compile anymore on Solaris 10.

Logs are :

"./boost/thread/future.hpp", line 3000: Error: boost::unique_future<void>::unique_future(boost::unique_future<void>&) is not accessible from boost::make_future().
1 Error(s) detected.

    "CC" -library=stlport4 -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/sun/release/address-model-32/stdlib-sun-stlport/threading-multi/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"

...failed sun.compile.c++ bin.v2/libs/thread/build/sun/release/address-model-32/stdlib-sun-stlport/threading-multi/pthread/thread.o...

This error occurs with and without usage of STL port.

Previous version (1.52.0) is fine.

Attachments (1)

8212.patch (8.8 KB ) - added by viboes 10 years ago.
Could you try this additional patch?

Download all attachments as: .zip

Change History (9)

comment:1 by viboes, 10 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by viboes, 10 years ago

Does the following patch help?

 svn diff ../../../boost/thread
Index: ../../../boost/thread/future.hpp
===================================================================
--- ../../../boost/thread/future.hpp	(revision 83254)
+++ ../../../boost/thread/future.hpp	(working copy)
@@ -3234,7 +3234,7 @@
     typedef typename decay<T>::type future_type;
     promise<future_type> p;
     p.set_value(boost::forward<T>(value));
-    return p.get_future();
+    return BOOST_THREAD_MAKE_RV_REF(p.get_future());
   }
 
 
@@ -3254,14 +3254,14 @@
     typedef typename decay<T>::type future_type;
     promise<future_type> p;
     p.set_value(boost::forward<T>(value));
-    return p.get_future().share();
+    return BOOST_THREAD_MAKE_RV_REF(p.get_future().share());
   }
 
 
   inline shared_future<void> make_shared_future()
   {
     promise<void> p;
-    return p.get_future().share();
+    return BOOST_THREAD_MAKE_RV_REF(p.get_future().share());
 
   }
 

comment:3 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.54.0

Committed revision [83370].

comment:4 by nicolas.jouvray@…, 10 years ago

Sorry but I was not able to test the patch before. I still have an error.

"./boost/thread/future.hpp", line 3244: Error: boost::unique_future<void>::unique_future(boost::unique_future<void>&) is not accessible from boost::make_future().
1 Error(s) detected.

    "CC" -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/sun/release/address-model-32/threading-multi/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"

The line 3244 in this revision is the following one ;

  inline BOOST_THREAD_FUTURE<void> make_future()
  {
    promise<void> p;
    return p.get_future(); // <-- This one

  }

by viboes, 10 years ago

Attachment: 8212.patch added

Could you try this additional patch?

comment:5 by nicolas.jouvray@…, 10 years ago

This patch is OK ! Thanks

comment:6 by viboes, 10 years ago

Committed in trunk [83425][83456].

Note that [83456] rollbacks one of the changes in [83425] as it introduce regressions in other compilers. Please could you try it?

comment:7 by nicolas.jouvray@…, 10 years ago

It is OK.

comment:8 by viboes, 10 years ago

Resolution: fixed
Status: assignedclosed

Committed revision [83525].

Note: See TracTickets for help on using tickets.