[osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mario Valle
I want to let you known that on Linux Suse 10.3, with last minute SVN, osgthirdpersonview 
crashes after few seconds of manipulation or almost immediately in gdb (compiled 
RelWithDebInfo).

This happens with no arguments or specifying 
--CullThreadPerCameraDrawThreadPerContext
does not happens with the other threading models.

$ gdb osgthirdpersonview
... bla bla...
This GDB was configured as i586-suse-linux...
Using host libthread_db library /lib/libthread_db.so.1.
(gdb) r
Starting program: /local/OSG/OpenSceneGraph/bin/osgthirdpersonview
[Thread debugging using libthread_db enabled]
[New Thread 0xb6a19910 (LWP 29454)]
/local/OSG/OpenSceneGraph/bin/osgthirdpersonview: Could not find specified files. Trying 
cow.osg instead.

[New Thread 0xb5f1fb90 (LWP 29461)]
[New Thread 0xb571eb90 (LWP 29462)]
[New Thread 0xb4f1db90 (LWP 29463)]
[New Thread 0xb471cb90 (LWP 29464)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5f1fb90 (LWP 29461)]
0xb7e8db78 in osg::OperationQueue::getNextOperation (this=0x814b280, 
blockIfEmpty=true)
at /local/OSG/OpenSceneGraph/include/osg/ref_ptr:28
28  ref_ptr(const ref_ptr rp) : _ptr(rp._ptr) { if (_ptr) 
_ptr-ref(); }
(gdb) where
#0  0xb7e8db78 in osg::OperationQueue::getNextOperation (this=0x814b280, 
blockIfEmpty=true)
at /local/OSG/OpenSceneGraph/include/osg/ref_ptr:28
#1  0xb7e8f331 in osg::OperationThread::run (this=0x814b190)
at /local/OSG/OpenSceneGraph/src/osg/OperationThread.cpp:399
#2  0xb7f64093 in OpenThreads::ThreadPrivateActions::StartThread 
(data=0x814b19c)
at /local/OSG/OpenSceneGraph/src/OpenThreads/pthreads/PThread.c++:170
#3  0xb7a1a192 in start_thread () from /lib/libpthread.so.0
#4  0xb761a02e in clone () from /lib/libc.so.6
(gdb)

Hope this helps
mario

--
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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Robert Osfield
Hi Mario,

What is your hardware setup?  Is it 32bit or 64bit build?

Robert.

On Fri, Jun 27, 2008 at 8:21 AM, Mario Valle [EMAIL PROTECTED] wrote:
 I want to let you known that on Linux Suse 10.3, with last minute SVN,
 osgthirdpersonview crashes after few seconds of manipulation or almost
 immediately in gdb (compiled RelWithDebInfo).
 This happens with no arguments or specifying
 --CullThreadPerCameraDrawThreadPerContext
 does not happens with the other threading models.

 $ gdb osgthirdpersonview
 ... bla bla...
 This GDB was configured as i586-suse-linux...
 Using host libthread_db library /lib/libthread_db.so.1.
 (gdb) r
 Starting program: /local/OSG/OpenSceneGraph/bin/osgthirdpersonview
 [Thread debugging using libthread_db enabled]
 [New Thread 0xb6a19910 (LWP 29454)]
 /local/OSG/OpenSceneGraph/bin/osgthirdpersonview: Could not find specified
 files. Trying cow.osg instead.
 [New Thread 0xb5f1fb90 (LWP 29461)]
 [New Thread 0xb571eb90 (LWP 29462)]
 [New Thread 0xb4f1db90 (LWP 29463)]
 [New Thread 0xb471cb90 (LWP 29464)]

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0xb5f1fb90 (LWP 29461)]
 0xb7e8db78 in osg::OperationQueue::getNextOperation (this=0x814b280,
 blockIfEmpty=true)
at /local/OSG/OpenSceneGraph/include/osg/ref_ptr:28
 28  ref_ptr(const ref_ptr rp) : _ptr(rp._ptr) { if (_ptr)
 _ptr-ref(); }
 (gdb) where
 #0  0xb7e8db78 in osg::OperationQueue::getNextOperation (this=0x814b280,
 blockIfEmpty=true)
at /local/OSG/OpenSceneGraph/include/osg/ref_ptr:28
 #1  0xb7e8f331 in osg::OperationThread::run (this=0x814b190)
at /local/OSG/OpenSceneGraph/src/osg/OperationThread.cpp:399
 #2  0xb7f64093 in OpenThreads::ThreadPrivateActions::StartThread
 (data=0x814b19c)
at /local/OSG/OpenSceneGraph/src/OpenThreads/pthreads/PThread.c++:170
 #3  0xb7a1a192 in start_thread () from /lib/libpthread.so.0
 #4  0xb761a02e in clone () from /lib/libc.so.6
 (gdb)

 Hope this helps
mario

 --
 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
 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


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Robert Osfield
Hi Mario,

Look at the experience of other engineers it now looks like the Atomic
generation may have not worked correctly on an early SVN version, but
even with an SVN update the associated Config file wasn't updated to
correct itself.

Could you try removing your OpenSceneGraph/CMakeCache.txt and then
doing a ./configure;make and then see if the problem persists.

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


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Serge Lages
Hi Mario,

It really seems to be the same problem as me, just remove your CMake cache
to be sure that the OpenThread/Config file will be regenerated.

On Fri, Jun 27, 2008 at 11:19 AM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Mario,

 Look at the experience of other engineers it now looks like the Atomic
 generation may have not worked correctly on an early SVN version, but
 even with an SVN update the associated Config file wasn't updated to
 correct itself.

 Could you try removing your OpenSceneGraph/CMakeCache.txt and then
 doing a ./configure;make and then see if the problem persists.

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mario Valle

32bits, Intel(R) Xeon(TM) CPU 3.00GHz quad core 4GB RAM.
GeForce 6800 GS NVIDIA Driver Version: 169.12
Suse 10.3
Let me know if other info or other tests are needed.
Ciao!
mario


Robert Osfield wrote:

Hi Mario,

What is your hardware setup?  Is it 32bit or 64bit build?

Robert.

On Fri, Jun 27, 2008 at 8:21 AM, Mario Valle [EMAIL PROTECTED] wrote:

I want to let you known that on Linux Suse 10.3, with last minute SVN,
osgthirdpersonview crashes after few seconds of manipulation or almost
immediately in gdb (compiled RelWithDebInfo).
This happens with no arguments or specifying
--CullThreadPerCameraDrawThreadPerContext
does not happens with the other threading models.

$ gdb osgthirdpersonview
... bla bla...
This GDB was configured as i586-suse-linux...
Using host libthread_db library /lib/libthread_db.so.1.
(gdb) r
Starting program: /local/OSG/OpenSceneGraph/bin/osgthirdpersonview
[Thread debugging using libthread_db enabled]
[New Thread 0xb6a19910 (LWP 29454)]
/local/OSG/OpenSceneGraph/bin/osgthirdpersonview: Could not find specified
files. Trying cow.osg instead.
[New Thread 0xb5f1fb90 (LWP 29461)]
[New Thread 0xb571eb90 (LWP 29462)]
[New Thread 0xb4f1db90 (LWP 29463)]
[New Thread 0xb471cb90 (LWP 29464)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5f1fb90 (LWP 29461)]
0xb7e8db78 in osg::OperationQueue::getNextOperation (this=0x814b280,
blockIfEmpty=true)
   at /local/OSG/OpenSceneGraph/include/osg/ref_ptr:28
28  ref_ptr(const ref_ptr rp) : _ptr(rp._ptr) { if (_ptr)
_ptr-ref(); }
(gdb) where
#0  0xb7e8db78 in osg::OperationQueue::getNextOperation (this=0x814b280,
blockIfEmpty=true)
   at /local/OSG/OpenSceneGraph/include/osg/ref_ptr:28
#1  0xb7e8f331 in osg::OperationThread::run (this=0x814b190)
   at /local/OSG/OpenSceneGraph/src/osg/OperationThread.cpp:399
#2  0xb7f64093 in OpenThreads::ThreadPrivateActions::StartThread
(data=0x814b19c)
   at /local/OSG/OpenSceneGraph/src/OpenThreads/pthreads/PThread.c++:170
#3  0xb7a1a192 in start_thread () from /lib/libpthread.so.0
#4  0xb761a02e in clone () from /lib/libc.so.6
(gdb)

Hope this helps
   mario

--
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
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



--
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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Robert Osfield
On Fri, Jun 27, 2008 at 11:48 AM, Mario Valle [EMAIL PROTECTED] wrote:
 32bits, Intel(R) Xeon(TM) CPU 3.00GHz quad core 4GB RAM.
 GeForce 6800 GS NVIDIA Driver Version: 169.12
 Suse 10.3
 Let me know if other info or other tests are needed.

The only test is the one suggested, remove your CMakeCache.txt, rerun
./configure or ccmake . to make sure it regenerates your
include/OpenThreads/Config, check the contents of this Config file to
make sure its been updated to a sensible value.

On my Kubuntu 64bit system I get a include/OpenThreads/Config that looks like:

/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 Robert Osfield
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
*/

/
 * THIS FILE IS AUTOGENERATED BY CMAKE. DO NOT EDIT!
 /

/* Changes to the configuration reflected here can be made with ccmake on
 * unix or with cmake-gui on windows. Alternatively you can use cmake's -D
 * or -P switches to set some configuration values at cmake configuration time.
 */

#ifndef _OPENTHREADS_CONFIG
#define _OPENTHREADS_CONFIG

#define _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
/* #undef _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS */
/* #undef _OPENTHREADS_ATOMIC_USE_SUN */
/* #undef _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED */
/* #undef _OPENTHREADS_ATOMIC_USE_MUTEX */

#endif
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mario Valle

Deleted CMakeCache.txt, ccmake .
recompiled, but it continue crashing. In GDB this time I have:

Starting program: /local/OSG/OpenSceneGraph/bin/osgthirdpersonview
[Thread debugging using libthread_db enabled]
[New Thread 0xb6a66910 (LWP 6697)]
/local/OSG/OpenSceneGraph/bin/osgthirdpersonview: Could not find specified files. Trying 
cow.osg instead.

[New Thread 0xb5f6cb90 (LWP 6708)]
[New Thread 0xb576bb90 (LWP 6709)]
[New Thread 0xb4f6ab90 (LWP 6710)]
[New Thread 0xb4769b90 (LWP 6711)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb576bb90 (LWP 6709)]
osg::OperationQueue::getNextOperation (this=0x814b4c0, blockIfEmpty=true)
at /local/OSG/OpenSceneGraph/include/OpenThreads/Atomic:107
107 return ++_value;
(gdb) where
#0  osg::OperationQueue::getNextOperation (this=0x814b4c0, blockIfEmpty=true)
at /local/OSG/OpenSceneGraph/include/OpenThreads/Atomic:107
#1  0xb7edc331 in osg::OperationThread::run (this=0x814b3d0)
at /local/OSG/OpenSceneGraph/src/osg/OperationThread.cpp:399
#2  0xb7fb1093 in OpenThreads::ThreadPrivateActions::StartThread 
(data=0x814b3dc)
at /local/OSG/OpenSceneGraph/src/OpenThreads/pthreads/PThread.c++:170
#3  0xb7a67192 in start_thread () from /lib/libpthread.so.0
#4  0xb766702e in clone () from /lib/libc.so.6

My ./include/OpenThreads/Config has all the 5 #undef commented out.

If I manually define _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS as you have, osg does 
not build.
Idem for what seems the most obvious fallback: _OPENTHREADS_ATOMIC_USE_MUTEX.

I should add that I have: gcc (GCC) 4.2.1 (SUSE Linux) and cmake version 
2.4-patch 7

Hope it helps
mario


Robert Osfield wrote:

On Fri, Jun 27, 2008 at 11:48 AM, Mario Valle [EMAIL PROTECTED] wrote:

32bits, Intel(R) Xeon(TM) CPU 3.00GHz quad core 4GB RAM.
GeForce 6800 GS NVIDIA Driver Version: 169.12
Suse 10.3
Let me know if other info or other tests are needed.


The only test is the one suggested, remove your CMakeCache.txt, rerun
./configure or ccmake . to make sure it regenerates your
include/OpenThreads/Config, check the contents of this Config file to
make sure its been updated to a sensible value.

On my Kubuntu 64bit system I get a include/OpenThreads/Config that looks like:

/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 Robert Osfield
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
*/

/
 * THIS FILE IS AUTOGENERATED BY CMAKE. DO NOT EDIT!
 /

/* Changes to the configuration reflected here can be made with ccmake on
 * unix or with cmake-gui on windows. Alternatively you can use cmake's -D
 * or -P switches to set some configuration values at cmake configuration time.
 */

#ifndef _OPENTHREADS_CONFIG
#define _OPENTHREADS_CONFIG

#define _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
/* #undef _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS */
/* #undef _OPENTHREADS_ATOMIC_USE_SUN */
/* #undef _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED */
/* #undef _OPENTHREADS_ATOMIC_USE_MUTEX */

#endif
___
osg-users mailing list
osg-users@lists.openscenegraph.org
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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mathias Fröhlich

Hi,

On Friday 27 June 2008 14:12, Mario Valle wrote:
 Deleted CMakeCache.txt, ccmake .
 recompiled, but it continue crashing. In GDB this time I have:

 Starting program: /local/OSG/OpenSceneGraph/bin/osgthirdpersonview
 [Thread debugging using libthread_db enabled]
 [New Thread 0xb6a66910 (LWP 6697)]
 /local/OSG/OpenSceneGraph/bin/osgthirdpersonview: Could not find specified
 files. Trying cow.osg instead.
 [New Thread 0xb5f6cb90 (LWP 6708)]
 [New Thread 0xb576bb90 (LWP 6709)]
 [New Thread 0xb4f6ab90 (LWP 6710)]
 [New Thread 0xb4769b90 (LWP 6711)]

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0xb576bb90 (LWP 6709)]
 osg::OperationQueue::getNextOperation (this=0x814b4c0, blockIfEmpty=true)
  at /local/OSG/OpenSceneGraph/include/OpenThreads/Atomic:107
 107 return ++_value;
 (gdb) where
 #0  osg::OperationQueue::getNextOperation (this=0x814b4c0,
 blockIfEmpty=true) at
 /local/OSG/OpenSceneGraph/include/OpenThreads/Atomic:107
 #1  0xb7edc331 in osg::OperationThread::run (this=0x814b3d0)
  at /local/OSG/OpenSceneGraph/src/osg/OperationThread.cpp:399
 #2  0xb7fb1093 in OpenThreads::ThreadPrivateActions::StartThread
 (data=0x814b3dc) at
 /local/OSG/OpenSceneGraph/src/OpenThreads/pthreads/PThread.c++:170 #3 
 0xb7a67192 in start_thread () from /lib/libpthread.so.0
 #4  0xb766702e in clone () from /lib/libc.so.6

 My ./include/OpenThreads/Config has all the 5 #undef commented out.

 If I manually define _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS as you have, osg
 does not build. Idem for what seems the most obvious fallback:
 _OPENTHREADS_ATOMIC_USE_MUTEX.

 I should add that I have: gcc (GCC) 4.2.1 (SUSE Linux) and cmake version
 2.4-patch 7

Can you please start a build from scratch in an empty directory and tell me if 
this still does not work?

You may start cmake with --debug-trycompile and provide the output of 
builddir/CMakeFiles/CMakeError.log.

GReetings and thanks

MAthias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mario Valle

Just done a svn co in an empty dir


Can you please start a build from scratch in an empty directory and tell me if 
this still does not work?



Done ccmake .
then cmake --debug-trycompile

You may start cmake with --debug-trycompile and provide the output of 
builddir/CMakeFiles/CMakeError.log.



Log attached.

As soon as the build finishes, I will report back to you.


GReetings and thanks


Ciao!
mario


MAthias



--
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
Determining if the function pthread_create exists in the pthreads 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 C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o
/usr/bin/gcc  -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc  -DCHECK_FUNCTION_EXISTS=pthread_create  -fPIC CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o   -o cmTryCompileExec -rdynamic -lpthreads 
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/ld: cannot find -lpthreads
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


Determining if the Q_WS_MAC exist 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 C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: 'Q_WS_MAC' undeclared (first use in this function)
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: (Each undeclared identifier is reported only once
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: for each function it appears in.)
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o] Error 1
gmake[1]: Leaving directory `/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2

File /local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include QtCore/qglobal.h

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_MAC
  cmakeRequireSymbol(0,Q_WS_MAC);
#endif
  return 0;
}

Determining if the Q_WS_WIN exist 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 C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: 'Q_WS_WIN' undeclared (first use in this function)
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: (Each undeclared identifier is reported only once
/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: for each function it appears in.)
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o] Error 1
gmake[1]: Leaving directory `/local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2

File /local/OSG/OpenSceneGraph/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include QtCore/qglobal.h

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_WIN
  cmakeRequireSymbol(0,Q_WS_WIN);
#endif
  return 0;
}

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 

Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mathias Fröhlich

Mario,

On Friday 27 June 2008 15:05, Mario Valle wrote:
 Just done a svn co in an empty dir

  Can you please start a build from scratch in an empty directory and tell
  me if this still does not work?

 Done ccmake .
 then cmake --debug-trycompile

  You may start cmake with --debug-trycompile and provide the output of
  builddir/CMakeFiles/CMakeError.log.

 Log attached.
Ok, I see. You are running in gcc, i386 without any -march= compiler flag.
So gcc assumes that you want to compile for a plain old i386 (read this does 
not even mean an i486). In this case gcc is limited to an instruction set 
where no such atomic operations are available. In fact you could not even 
programm a mutex with that i386 instruction set, as well as you could not 
build any SMP machine using an i386.

In this case, when we cannot assume any atomic operations. So we need to use 
the previous mutex based behaviour.
But for that, the old mechnisms are still there. You need to ensure that 
refcounting works in a threadsafe way using either the 
OSG_THREAD_SAFE_REF_UNREF environment variable or by calling

osg::Referenced::setThreadSafeReferenceCounting(true);

before *any* concurrently used osg::Referenced object is created.
Alternatively you can uncomment that ENFORCE_THREADSAFE define in 
src/osg/Referenced.cpp that does change the default behaviour of referenced.

 As soon as the build finishes, I will report back to you.

Are you running with the environment variable OSG_THREAD_SAFE_REF_UNREF set or 
unset?

Greetings

MAthias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mario Valle



Ok, I see. You are running in gcc, i386 without any -march= compiler flag.
So gcc assumes that you want to compile for a plain old i386 (read this does 
not even mean an i486). In this case gcc is limited to an instruction set 
where no such atomic operations are available. In fact you could not even 
programm a mutex with that i386 instruction set, as well as you could not 
build any SMP machine using an i386.



Ahi Ahi Ahi!!

That means that I'm working without this optimization since the beginning?
And nevertheless OSG is so fast?

I specify in the advanced cmake options:
CMAKE_C_FLAGS-march=i486 -mtune=i486
CMAKE_CXX_FLAGS  -march=i486 -mtune=i486
Then configure and generate, but the ./include/OpenThreads/Config file continues with 
everything commented out. Have I missed something?


In this case, when we cannot assume any atomic operations. So we need to use 
the previous mutex based behaviour.
But for that, the old mechnisms are still there. You need to ensure that 
refcounting works in a threadsafe way using either the 
OSG_THREAD_SAFE_REF_UNREF environment variable or by calling


OK, thanks. But for now I want only to contribute with my ignorance :-) to polish this OSG 
functionality.



osg::Referenced::setThreadSafeReferenceCounting(true);

before *any* concurrently used osg::Referenced object is created.
Alternatively you can uncomment that ENFORCE_THREADSAFE define in 
src/osg/Referenced.cpp that does change the default behaviour of referenced.



As soon as the build finishes, I will report back to you.


OK, now crashes in another place, see below. This run has been done before changing 
march/mtune.


Are you running with the environment variable OSG_THREAD_SAFE_REF_UNREF set or 
unset?



Unset


Greetings

MAthias


Thanks Mathias!
mario


$ gdb osgthirdpersonview
GNU gdb 6.6.50.20070726-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i586-suse-linux...
Using host libthread_db library /lib/libthread_db.so.1.
(gdb) r
Starting program: /local/OSG/OpenSceneGraph/bin/osgthirdpersonview
[Thread debugging using libthread_db enabled]
[New Thread 0xb6a21910 (LWP 22570)]
/local/OSG/OpenSceneGraph/bin/osgthirdpersonview: Could not find specified files. Trying 
cow.osg instead.

[New Thread 0xb5f28b90 (LWP 22581)]
[New Thread 0xb5727b90 (LWP 22583)]
[New Thread 0xb4f26b90 (LWP 22584)]
[New Thread 0xb4725b90 (LWP 22585)]
Warning: deleting still referenced object 0x806cfd0 of type 
'PN3osg10ReferencedE'
 the final reference count was 1, memory corruption possible.
Warning: deleting still referenced object 0x806cfd0 of type 
'PN3osg10ReferencedE'
 the final reference count was 4294967295, memory corruption possible.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5727b90 (LWP 22583)]
0xb7f61635 in typeinfo for osg::Scissor () from 
/local/OSG/OpenSceneGraph/lib/libosg.so.39
(gdb) where
#0  0xb7f61635 in typeinfo for osg::Scissor () from 
/local/OSG/OpenSceneGraph/lib/libosg.so.39
#1  0xb7e6c5c4 in osg::Group::traverse (this=0x8056d50, [EMAIL PROTECTED])
at /local/OSG/OpenSceneGraph/src/osg/Group.cpp:62
#2  0xb7bd58c1 in osgUtil::CullVisitor::apply (this=0x8102668, [EMAIL 
PROTECTED])
at /local/OSG/OpenSceneGraph/include/osg/NodeVisitor:181
#3  0xb7e6dbaa in osg::Group::accept (this=0x8056d50, [EMAIL PROTECTED])
at /local/OSG/OpenSceneGraph/include/osg/Group:38
#4  0xb7c679a2 in osgUtil::SceneView::cullStage (this=0x8101750, [EMAIL 
PROTECTED],
[EMAIL PROTECTED], cullVisitor=0x8102668, rendergraph=0x8102488, 
renderStage=0x81024d8,

viewport=0x814a9f0) at 
/local/OSG/OpenSceneGraph/src/osgUtil/SceneView.cpp:926
#5  0xb7c633ea in osgUtil::SceneView::cull (this=0x8101750)
at /local/OSG/OpenSceneGraph/src/osgUtil/SceneView.cpp:792
#6  0xb7ad39c1 in osgViewer::Renderer::cull (this=0x8101530)
at /local/OSG/OpenSceneGraph/src/osgViewer/Renderer.cpp:302
#7  0xb7ad2afa in osgViewer::Renderer::operator() (this=0x8101530, 
object=0x8100a18)
at /local/OSG/OpenSceneGraph/src/osgViewer/Renderer.cpp:624
#8  0xb7e96427 in osg::OperationThread::run (this=0x814b3d0)
at /local/OSG/OpenSceneGraph/src/osg/OperationThread.cpp:413
#9  0xb7f6b093 in OpenThreads::ThreadPrivateActions::StartThread 
(data=0x814b3dc)
at /local/OSG/OpenSceneGraph/src/OpenThreads/pthreads/PThread.c++:170
#10 0xb7a22192 in start_thread () from /lib/libpthread.so.0
#11 0xb762202e in clone () from /lib/libc.so.6
(gdb)
--
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 

Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Jean-Sébastien Guay

Hi Mario,


I specify in the advanced cmake options:
CMAKE_C_FLAGS-march=i486 -mtune=i486
CMAKE_CXX_FLAGS  -march=i486 -mtune=i486
Then configure and generate, but the ./include/OpenThreads/Config file 
continues with everything commented out. Have I missed something?


I think you need to remove your CMakeCache.txt and the 
build/include/OpenThreads/Config file, otherwise CMake doesn't take into 
account the changes to regenerate it because it sees the old one. (at 
least that's what I gather from some previous posts today)


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mathias Fröhlich

Mario,

On Friday 27 June 2008 16:09, Mario Valle wrote:
  Ok, I see. You are running in gcc, i386 without any -march= compiler
  flag. So gcc assumes that you want to compile for a plain old i386 (read
  this does not even mean an i486). In this case gcc is limited to an
  instruction set where no such atomic operations are available. In fact
  you could not even programm a mutex with that i386 instruction set, as
  well as you could not build any SMP machine using an i386.

 Ahi Ahi Ahi!!

 That means that I'm working without this optimization since the beginning?
 And nevertheless OSG is so fast?

 I specify in the advanced cmake options:
 CMAKE_C_FLAGS-march=i486 -mtune=i486
 CMAKE_CXX_FLAGS  -march=i486 -mtune=i486
 Then configure and generate, but the ./include/OpenThreads/Config file
 continues with everything commented out. Have I missed something?
Ok, then throw away your build to make sure that nothing si left.

I am not sure how many things are cached in what part of the cmake build 
system. I just want to be sure ...

Then set again the cflags. And better set them to something 
like -march=pentiumpro. Also do not forget to include -O or -O3 or something 
like that. Without you do not get any optimizations I guess ...

Then ensure that cmake does not see previous caches ...

BTW: does anybody know a way to tell cmake that a variable should not be 
cached?

  In this case, when we cannot assume any atomic operations. So we need to
  use the previous mutex based behaviour.
  But for that, the old mechnisms are still there. You need to ensure that
  refcounting works in a threadsafe way using either the
  OSG_THREAD_SAFE_REF_UNREF environment variable or by calling

 OK, thanks. But for now I want only to contribute with my ignorance :-) to
 polish this OSG functionality.

  osg::Referenced::setThreadSafeReferenceCounting(true);
 
  before *any* concurrently used osg::Referenced object is created.
  Alternatively you can uncomment that ENFORCE_THREADSAFE define in
  src/osg/Referenced.cpp that does change the default behaviour of
  referenced.
 
  As soon as the build finishes, I will report back to you.

 OK, now crashes in another place, see below. This run has been done before
 changing march/mtune.

  Are you running with the environment variable OSG_THREAD_SAFE_REF_UNREF
  set or unset?

 Unset
Can you test with this variable set?

I believe that these thread safety defaults in osg are not good in face of 
that multithreaded viewer stuff, but I just left them as is.

Robert,
Should we include that ENFORCE_THREADSAFE define in the cmake configuration? 
And in face of all this threading usage in osg, should the default change to 
on?

And, yes, I should write a wiki page. I hope to find some time today ...

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Mario Valle



Mathias Fröhlich wrote:

Ok, then throw away your build to make sure that nothing si left.

I am not sure how many things are cached in what part of the cmake build 
system. I just want to be sure ...


Then set again the cflags. And better set them to something 
like -march=pentiumpro. Also do not forget to include -O or -O3 or something 
like that. Without you do not get any optimizations I guess ...


Then ensure that cmake does not see previous caches ...


Done, but nothing changes

BTW: does anybody know a way to tell cmake that a variable should not be 
cached?



Are you running with the environment variable OSG_THREAD_SAFE_REF_UNREF
set or unset?

Unset

Can you test with this variable set?


Yes, it crashes the same...

I believe that these thread safety defaults in osg are not good in face of 
that multithreaded viewer stuff, but I just left them as is.


Robert,
Should we include that ENFORCE_THREADSAFE define in the cmake configuration? 
And in face of all this threading usage in osg, should the default change to 
on?


And, yes, I should write a wiki page. I hope to find some time today ...

Greetings

Mathias


Thanks Mathias!
Now I go home for the weekend, maybe Monday things will be better...
Ciao!
mario

--
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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgthirdpersonview crashes on Linux

2008-06-27 Thread Paul Martz
 Done, but nothing changes

Did it work OK with 2.5.2?
   -Paul

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