Hi 

i'm tring to build osg trunk on mac osx snow leopard.

i tried to apply the change to the file :


from :

#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
    mutable Mutex _mutex;
#endif
#if defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
    volatile long _value;
#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
    volatile int32_t _value;
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
    volatile uint_t _value;
    mutable Mutex _mutex;  // needed for xor
#else
    volatile unsigned _value;
#endif
};

to :

#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
    mutable Mutex _mutex;
#endif
#if defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
    volatile long _value;
#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
    volatile int32_t _value;
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
    volatile uint_t _value;
    mutable Mutex _mutex;  // needed for xor
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__)
    volatile unsigned _value;

#endif


but i get this error :


MacBook-Pro-15-di-Massimo-Di-Stefano:build sasha$ make
[  0%] Building CXX object 
src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.cpp.o
In file included from 
/Users/sasha/source/trunk/src/OpenThreads/common/Atomic.cpp:14:
/Users/sasha/source/trunk/include/OpenThreads/Atomic:14:1: error: unterminated 
#ifndef
In file included from 
/Users/sasha/source/trunk/src/OpenThreads/common/Atomic.cpp:14:
/Users/sasha/source/trunk/include/OpenThreads/Atomic:70: error: ‘int32_t’ does 
not name a type
/Users/sasha/source/trunk/src/OpenThreads/common/Atomic.cpp:24: error: expected 
unqualified-id before ‘namespace’
/Users/sasha/source/trunk/src/OpenThreads/common/Atomic.cpp:175: error: 
expected `}' at end of input
/Users/sasha/source/trunk/include/OpenThreads/Atomic: In constructor 
‘OpenThreads::Atomic::Atomic(unsigned int)’:
/Users/sasha/source/trunk/include/OpenThreads/Atomic:50: error: class 
‘OpenThreads::Atomic’ does not have any field named ‘_value’
/Users/sasha/source/trunk/include/OpenThreads/Atomic: At global scope:
/Users/sasha/source/trunk/include/OpenThreads/Atomic:51: error: expected 
unqualified-id at end of input
/Users/sasha/source/trunk/include/OpenThreads/Atomic:51: error: expected `}' at 
end of input
make[2]: *** 
[src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/__/common/Atomic.cpp.o] 
Error 1
make[1]: *** [src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/all] Error 2
make: *** [all] Error 2
MacBook-Pro-15-di-Massimo-Di-Stefano:build sasha$ 


have you any clue on how to build osg on snow leopard?

thanks!

Massimo.


Il giorno 19/nov/2009, alle ore 18.02, Robert Osfield ha scritto:

> Hi Stefan,
> 
> I'm just reviewing submissions and have just checked your changes to
> include/osg/Atomic and rather perplexed by the changes.   It concerns
> me that while it might hack around a problem elsewhere it'll introduce
> bugs under other build combinations.  You changes were the addition
> of:
> 
> #if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__)
>    volatile unsigned _value;
> 
> And the removal of the lines:
> 
> #else
>    volatile unsigned _value;
> 
>> From the same block of code.  Neither change seems easily explainable
> or valid for the long term.
> 
> Robert.
> 
> On Mon, Nov 2, 2009 at 11:56 PM, stefan) <ste...@nortd.com> wrote:
>> Hey Paul,
>> 
>> I just built osg 2.8.2 from scratch on 10.6.1 (snow leopard). I would
>> be happy if we could roll a 2.8.3 release with the required patches.
>> 
>> The patched files in question are attached. Is there anything else I
>> can do to make this 2.8.3 release happen?
>> 
>> It's also good to note that there is a bug in cmake 2.6 which has been
>> resolved in the 2.8-0 preview release. The architecture is not set
>> correctly in the xcode project files. this mean even though "i386" is
>> set in cmake the xcode project will be set to "$(NATIVE_ARCH)" which
>> results in a 64-bit build. Using cmake 2.8 or manually setting the
>> architecture resolves this issue.
>> 
>> 
>> /stefanix
>> 
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> 
>> 
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

Reply via email to