1 Reply Latest reply on Jun 13, 2014 7:26 AM by user8704911

    c++ boost library with lock-free synchronization?


      I tried to run the boost examples for threads using lock-free containers from here: http://www.boost.org/doc/libs/1_53_0/doc/html/lockfree/examples.html

      But when compiling on Solaris 10 with gcc 4.7.2 like this:

      > /usr/local/gcc-4.7.2/bin/g++ -m64 -mptr64 -o main main.cpp -I/opt/include/ -pthread -L$SRCROOT/lib -lboost_thread -lboost_atomic -lboost_system -lrt

      ... i only get binaries, which start with


      > ./main
      boost::lockfree::queue is not lockfree


      Whereas on a linux machine i get:

      > ./main
      boost::lockfree::queue is lockfree


      How can i use lockfree boost containers on Solaris 10?

      I read it is about missing support for lock-free synchronization methods.

      I guess there is some suport for this on Solaris 10.

      Likely it's not properly (automatically) used by boost or gcc build procedure(?)

      When building most recent boost version with gcc i get

      > ./b2
          - lockfree boost::atomic_flag : no


      Is there a version (gcc and/or boost) to download from oracle that works?



      Also with --with-toolset=sun i get:

      > ./b2
          - lockfree boost::atomic_flag : no


      - many thanks!


      best regards,