Thanks a lot Mathias!
Adding your file, deleting the cache and starting over:
- Confing now has #define _OPENTHREADS_ATOMIC_USE_MUTEX
- But the build fails when compiling Referenced.cpp

/local/OSG/OpenSceneGraph/src/osg/Referenced.cpp:85: error: qualified name does not name a class before '{' token
gmake[2]: *** [src/osg/CMakeFiles/osg.dir/Referenced.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [src/osg/CMakeFiles/osg.dir/all] Error 2
gmake: *** [all] Error 2

Seems like _OSG_REFERENCED_USE_ATOMIC_OPERATIONS is not defined.
So I added to Config header the line:
#define _OSG_REFERENCED_USE_ATOMIC_OPERATIONS

And voila', everything works, no more crashes in osgthirdpersonview !
Hope this helps you. Ciao!
                                mario

Mathias Fröhlich wrote:
Sorry for the noise ...
Hit the send button by accident ...

On Monday 30 June 2008 13:41, Mario Valle wrote:
Dear all,
After a fresh SVN checkout osgthirdpersonview continues crashing and the
generated Configure header continues to have all its entries commented out.

As per various suggestions I defined the following entries in Cmake:

CMAKE_CXX_FLAGS                  -march=i686
CMAKE_C_FLAGS                    -march=i686

But nothing changes and even in CMakeFiles/CMakeError.log I found the
following entry for which no sign of the above flags appears:

Performing C++ SOURCE FILE Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS failed
with the following output:
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp' /usr/bin/cmake -E
cmake_progress_report
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/c++   -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS   -o
CMakeFiles/cmTryCompileExec.dir/src.o -c
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/c++       -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS  -fPIC
"CMakeFiles/cmTryCompileExec.dir/src.o"   -o cmTryCompileExec -rdynamic
CMakeFiles/cmTryCompileExec.dir/src.o: In function `main':
src.cxx:(.text+0x43): undefined reference to
`__sync_bool_compare_and_swap_4' src.cxx:(.text+0x6e): undefined reference
to `__sync_bool_compare_and_swap_4' collect2: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec] Error 1
gmake[1]: Leaving directory `/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2

Another piece of the puzzle that could be of interest: I have trouble also
with the build of the FOX toolkit: seems like the configure process is
configuring capabilities that are not there... Bho?

Ok, the cflags did not reach the compiler command line. Therefore you do not get atomics. It's beyond my cmake knowledge when which cmake variable is used. I usually set CFLAGS and CXXFLAGS in the environment where I run cmake. That appears to work for me ...

Hmm, I wonder why your previous post tells that none of the OpeThreads Config variables are defined. At least the MUTEX one should be ...

Can you replace the CheckAtomicOps.cmake file with the one I have attached and retest please? Note that I am interrested in the fallback path with the mutex, so please do not change eny cflags or whatever wrt the previous run that did not work ...
Thanks!

Greetings

Mathias



------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
Ing. Mario Valle
Data Analysis and Visualization Services         | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to