Hi Stephan,

On 13/03/12 4:43 , Stephan Maximilian Huber wrote:
> it seems that compiling osg and specifically OpenThreads is currently
> broken for IOS when using xcode 4.3.1. The compilation fails at
> OpenThreads/Atomic with
> 
> Users/stephan/Documents/Projekte/cefix/cefix/ios/../../libs/ios/include/OpenThreads/Atomic:244:48:
> error: cannot initialize a parameter of type 'void *' with an lvalue of
> type 'const void *const'
>     return __sync_bool_compare_and_swap(&_ptr, ptrOld, ptrNew);
> 
> Googling around it seems, that this is because of a bug in the
> clang-compiler: http://llvm.org/bugs/show_bug.cgi?id=11280
> 
> Has anybody an idea how to fix the issue? In the meantime i'll switch to
> _OPENTHREADS_ATOMIC_USE_MUTEX

This recently broke for me on OS X (with clang 3.1) as well.  Casting 'ptrOld' 
to (void*)
works and this is also done for the other implementations (WIN32_INTERLOCKED and
BSD_ATOMIC) as well.

No ideal, both 'ptrOld' and 'ptrNew' are only read and could actually both be 
const but
aren't for some reason.

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to