Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-11-04 Thread Huron Sam Perera
Hi Yurii,

I followed your instructions and rebuilt OSG libraries. Then I rebuilt my app 
and tried it. It worked.


Thank you!

Cheers,
Huron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33476#33476





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


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-29 Thread Huron Sam Perera
Hi Robert,

I am linking with OpenThreads.

About the Makfile:

The application that I am trying run with intersection checks from OSG has its 
own Makefile that I do not want to change other than adding the includes and 
libraries from OSG. Since, that procedure is giving me the undefined symbol 
error I am now trying to compile and run the osgintersction example using your 
recommended build procedure for examples. I ran cmake and make in the 
OpenSceneGraph folder to create the libraries. However, there were no Makefiles 
generated for the examples. That's why I went to the 
OpenSceneGraph/examples/osgintersection folder and ran cmake. Then I run into 
cmake not recognizing SETUP_EXAMPLE project. What I like to know is whether you 
have the examples setup to have Makefiles created using cmake or we just write 
our own Makefile and link with the libraries just like I did with my 
application. If you have the examples set up to have Makefiles generated thru 
cmake, I probably am not following the correct procedure and that is probably 
why I am runni
 ng into the SETUP_EXAMPLE problem.


Thank you!

Cheers,
Huron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33260#33260





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


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-29 Thread Yurii Monakov
Hi Huron,

I've experienced the same problems with unresolved symbols from
OpenTreads. The problem was solved by full rebuild of OSG. Just delete
CMake cache, reconfigure and build.

Once I've fought unexpected runtime errors (segmentation faults) in
simple OSG apps (even in examples) and they were also solved by full
rebuild. Seems that something went wrong during compilation process,
but compiler/linker somehow have missed these errors.

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


[osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-27 Thread Huron Sam Perera
Hi,

When I run my application (on Linux Debian) which has call to do intersection 
tests, I get:

undefined symbol: ZN11OpenThreads6AtomicmmEv

when the application is trying to call addIntersector() function of the 
osgUtil::IntersectorGroup. In my application's Makefile I only link with  
libOpenThreads.so, libosgDB.so and libosgTerrain.so. Is that not enough or is 
it some other problem?

Thank you!

Cheers,
Huron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33104#33104





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


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-27 Thread Robert Osfield
Hi Huron,

On Wed, Oct 27, 2010 at 1:02 AM, Huron Sam Perera
hsper...@bellhelicopter.textron.com wrote:
 When I run my application (on Linux Debian) which has call to do intersection 
 tests, I get:

 undefined symbol: ZN11OpenThreads6AtomicmmEv

 when the application is trying to call addIntersector() function of the 
 osgUtil::IntersectorGroup. In my application's Makefile I only link with  
 libOpenThreads.so, libosgDB.so and libosgTerrain.so. Is that not enough or is 
 it some other problem?

I'd add libosg.so into the list, but I don't think it'd address the
link problem as it relates to OpenThreads.

The undefined symbol itself makes me wonder if you have libs and
headers that conflict in their implementation of the
OpenThreads::Mutex.

Did you build the OSG yourself, or pull it in from debian
repositories?  Which version of the OSG?  Have a check of your
include/OpenThreads/Config to see what it has defined.  I'm using
Kubuntu so it's a debian based system and build the OSG myself (;-)
and my include/OpenThreads/Config looks like:

// ... comments removed .. so focus on the important bits:
#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_BSD_ATOMIC */
/* #undef _OPENTHREADS_ATOMIC_USE_MUTEX */
/* #undef OT_LIBRARY_STATIC */

#endif

In this case OpenThreads itself must also be built with atomic gcc builtins.

Robert.

Not that it's
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-27 Thread Robert Osfield
Hi Huron,

On Wed, Oct 27, 2010 at 5:49 PM, Huron Sam Perera
hsper...@bellhelicopter.textron.com wrote:
 I added libosg.so and I still get the unresolved symbol. To answer your other 
 questions:

 Yes, I built OSG myself.
 I think I am using 2.8.3. By the way, is there any file in the dowload that 
 tells me which version I am using?
 My include/OpenThreads/Config looks just like yours. So I guess I have to 
 build OpenThreads with atomic gcc builtins. How do I do that?

It should already built with built ins, otherwise the Config would be different.

What is up with your system I don't know.  Perhaps there is an issue
with gcc on your system.  What version of debian and gcc are you
using?

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


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-27 Thread Huron Sam Perera
Hi Robert,

My debian version is 5.0.2. When I type gcc -v on my system the response is 
(along with bunch of other information):

gcc version 4.3.2 (Debian 4.3.2-1.1).



Thank you!

Cheers,
Huron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33150#33150





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


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-27 Thread Huron Sam Perera
Hi Robert,

The problem may be in the way I am linking with OSG libs in my Makefile.  To 
check that I tried to create a Makefile for the osgintersection example. when I 
run cmake I get the following:

The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:7 (SETUP_EXAMPLE):
  Unknown CMake command SETUP_EXAMPLE.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run cmake --help-policy CMP.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!


Please help to get this resolved. Then I can check whether I can run this 
example in my system. If I am successful I will compare the Makefiles and 
hopefully that will resolve the udefined symbol problem.


Thank you!

Cheers,
Huron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33157#33157





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


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-27 Thread Ulrich Hertlein
Hi Huron,

On 28/10/10 9:17 , Huron Sam Perera wrote:
 The problem may be in the way I am linking with OSG libs in my Makefile.

This may be a silly question, but are you linking OpenThreads?
I usually link with '-L/usr/local/lib -losgViewer -losgGA -losgDB -losgUtil 
-losg
-lOpenThreads'.

 To check that I tried to create a Makefile for the osgintersection example. 
 when I run cmake I get the
 following:

Why are you creating a Makefile but are then running cmake?  This doesn't make 
any sense.
 Do you mean you created a CMakeLists.txt file?

 The C compiler identification is GNU
 -- The CXX compiler identification is GNU
 -- Check for working C compiler: /usr/bin/gcc
 -- Check for working C compiler: /usr/bin/gcc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Check for working CXX compiler: /usr/bin/c++
 -- Check for working CXX compiler: /usr/bin/c++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 CMake Error at CMakeLists.txt:7 (SETUP_EXAMPLE):
   Unknown CMake command SETUP_EXAMPLE.

SETUP_EXAMPLE is an OSG-specific macro from CMakeModules/OsgMacroUtils.cmake.
The OSG root CMakeLists.txt finds the macro via these commands:

SET(CMAKE_MODULE_PATH 
${OpenSceneGraph_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH})
INCLUDE(OsgMacroUtils)

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