Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

c++ boost library with lock-free synchronization?

user8704911Jun 11 2014 — edited Jun 13 2014

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?

Supplement

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

> ./b2

    - lockfree boost::atomic_flag : no

- many thanks!

best regards,
Frank

This post has been answered by user8704911 on Jun 13 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2014
Added on Jun 11 2014
1 comment
1,608 views