Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-07-05 Thread Ulrich Hertlein
Hi guys,

On 5/07/12 17:38 , Stephan Huber wrote:
> Am 04.07.12 16:49, schrieb Mike Krus:
>> Any ideas on how to fix this? Or anybody know if I can safely build the rest 
>> with GCC 4.3 and OSG with the llvm-gcc 4.2 that comes with XCode?
> 
> AFAIK you'll have to use the apple-compilers for compiling osg, as only
> the apple-compilers know how to handle Objective-C which is used for the
> cocoa backend.
> 
> Don't know if you can mix both compilers, I had problems in the past
> compiling parts of osg with llvm-gcc and other parts of my code with clang.

I've switched to use clang/clang++ (3.1svn) to compile OSG and with MacPorts 
compiled with
Xcode-gcc without issues so far (but not a production environment).

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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-07-05 Thread Stephan Huber
Hi Mike,

Am 04.07.12 16:49, schrieb Mike Krus:
> Any ideas on how to fix this? Or anybody know if I can safely build the rest 
> with GCC 4.3 and OSG with the llvm-gcc 4.2 that comes with XCode?

AFAIK you'll have to use the apple-compilers for compiling osg, as only
the apple-compilers know how to handle Objective-C which is used for the
cocoa backend.

Don't know if you can mix both compilers, I had problems in the past
compiling parts of osg with llvm-gcc and other parts of my code with clang.

cheers,

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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-07-04 Thread Mike Krus
Hi,

I had a everything working using GCC 4.2.1 from XCode 4.3 but  due to issues 
with GDAL I've had to "upgrade" to GCC 4.3 from MacPort. So I have:

/opt/local/bin/gcc -> /opt/local/bin/gcc-mp-4.3

which is found by default with CMake. 

I'm getting issues when building the Cocoa code:


Code:

[ 21%] Building CXX object 
src/osgViewer/CMakeFiles/osgViewer.dir/GraphicsWindowCocoa.mm.o
In file included from 
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5,
from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from 
/Volumes/MVEData/Users/Mike/Developer/OSG/src/osgViewer/GraphicsWindowCocoa.mm:18:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:140: error: 
stray '@' in program





Any ideas on how to fix this? Or anybody know if I can safely build the rest 
with GCC 4.3 and OSG with the llvm-gcc 4.2 that comes with XCode?




Thank you!

Cheers,
Mike
Code:




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





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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-10 Thread Mike Wozniewski
Okay. I finally have a solution!

First thing to note: I didn't have any other gcc compilers other than the "llvm 
gcc 4.2" that came with my XCode app. This is because XCode 4.3.1 comes from 
the App store and resides in /Applications, and I have NO /Developer folder.

So, I used Macports to install a different llvm gcc compiler:

Code:
sudo port install llvm-gcc42



Then I compiled OSG like this:

Code:
CC=/opt/local/bin/llvm-gcc CXX=/opt/local/bin/llvm-g++ ccmake 
../OpenSceneGraph-3.1.1



(note: you cannot set the CMAKE_OSX_ARCHITECTURE because this compiler doesn't 
understand -arch flags, so I'm not sure how you would make a universal build 
this way).

I also had to set OSG_WINDOWING_SYSTEM to Cocoa and 
OPENTHREADS_ATOMIC_USE_MUTEX to ON.

Using that build of OSG, my app build, links and runs just fine.

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





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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-09 Thread Mike Wozniewski
Found one other possibility: optimization flags?

This post claims that fixed something:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-August/053774.html

Will try that and report back...

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





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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-09 Thread Mike Wozniewski
So, I spent much of the weekend compiling different versions of OSG (different 
compilers, universal/non-universal, cmake vs xcode), but no combination has yet 
fixed the crash.

Originally, I used plain cmake to build OSG 2.9.8 libraries and XCode to build 
my app. This worked for me for the past year, but I was forced to upgrade to 
OSX 10.7 and XCode 4.3 or some iOS-related work. My app continued to compile 
(indeed, using the "llvm gcc 4.2" compiler) and worked well if linked with 
those old OSG libraries.

But like I said, I wanted to upgrade to OSG 3.x, and stupidly I deleted my old 
OSG 2.9.8 libraries. Now I can't build ANY form of OSG that will make my app 
work again.

I can't build OSG 2.9.8 anymore, because there are a bunch of deprecated 
coregraphics calls and no OPENTHREADS_ATOMIC_USE_MUTEX fix. And any OSG 3.X 
version exhibits the crash (even though the OSG examples work!).

I've tried building OSG with both the "llvm gcc 4.2" and "Apple llvm compiler 
3.1", but both crash my app.

A few other users have mentioned similar things:
http://forum.openscenegraph.org/viewtopic.php?p=42119
http://forum.openscenegraph.org/viewtopic.php?t=8963

Perhaps the same problem (?). Their solution is to NOT using the llvm compiler 
and use old gcc4.2, but I don't have /usr/bin/gcc-4.2. Any idea how I can get 
that on my OSX 10.7 system with XCode 4.3.1?

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





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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-07 Thread Stephan Huber
Am 05.04.12 20:55, schrieb Mike Wozniewski:
> Damn. It looks like the same error occurs when I build using autotools, 
> making this less likely related to XCode project settings. Will investigate 
> more...

I can confirm the crash, if I compile my app with the "apple llvm
compiler". If I switch to the "llvm gcc 4.2"-compiler everything works
as expected, no crash. (I compiled the osg-libs on an older machine with
Snow Leopard / Xcode 3.1.x using the standard gcc 4.2 compiler.)

Any chance that you use different compilers for your app and the osg-libs?

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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-06 Thread Stephan Huber
Hi,

Are you 100% sure, that the version of the plugins corresponds to the
version of the osg core libs?

I'll try to compile current osg and test it against one of my apps this
weekend, as my setup is similar to yours and report back to the list.


cheers,

Stephan

Am 05.04.12 20:55, schrieb Mike Wozniewski:
> Damn. It looks like the same error occurs when I build using autotools, 
> making this less likely related to XCode project settings. Will investigate 
> more...
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=46879#46879
> 
> 
> 
> 
> 
> ___
> 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] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-05 Thread Mike Wozniewski
Damn. It looks like the same error occurs when I build using autotools, making 
this less likely related to XCode project settings. Will investigate more...

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





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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-05 Thread Mike Wozniewski
"Symbols hidden by default" was set to No. Setting it to Yes results in linking 
errors.

The crash occurs in addDotOsgWrapper() when adding the NodeCallback wrapper. 
Specifically, the line:

Code:
std::string libraryName = proto->libraryName();



There are several other wrappers that get added beforehand without problem 
(AlphaFunc, AnimationPath, etc). I don't see any real difference with 
NodeCallback...

In the XCode project settings, I saw a similar option called "Inline Methods 
Hidden" which was set to Yes. I tried setting that to No. It still crashes, but 
now it crashes when adding the wrapper for AnimationPathCallback (which was 
working before).

Very strange.

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





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


Re: [osg-users] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-05 Thread Stephan Maximilian Huber
Hi,

is the "Symbols hidden by default"-setting in your xcode-project set to No?

cheers,
Stephan


Am 05.04.12 17:07, schrieb Mike Wozniewski:
> Hi,
> 
> I just upgraded from OSG 2.9.8 to 3.1.1 and my project now crashes when 
> loading .osg models. The error occurs in 
> DeprecatedDotOsgWrapperManager::addDotOsgWrapper (see the backtrace below).
> 
> The funny thing is that OSG examples work fine. It's just something to do 
> with my project settings. I'm using a custom XCode project, so it's hard to 
> post details here, but can anyone suggest where to look? Am I forgetting to 
> link with something that the deprecated wrappers would need?
> 
> Everything else works well. In fact, if I enable more verbose notifications, 
> I see that the osgdb_osg plugin loads successfully:
> 
> Code:
> FindFileInPath() : USING /usr/local/lib/osgPlugins-3.1.1/osgdb_osg.so
> Opened DynamicLibrary osgPlugins-3.1.1/osgdb_osg.so
> 
> 
> 
> It looks like that plugin requests to load the osgdb_deprecated_osg plugin, 
> and then I get the crash immediately after this is printed:
> 
> Code:
> FindFileInPath() : USING 
> /usr/local/lib/osgPlugins3.1.1/osgdb_deprecated_osg.so
> CullSettings::readEnvironmentalVariables()
> CullSettings::readEnvironmentalVariables()
> 
> 
> 
> Image plugins (eg, jpeg work fine).
> 
> Any ideas?
> 
> Here's the interesting part of the backtrace:
> 
> Code:
> 
> #0  0x7fff92042b8c in __dynamic_cast ()
> #1  0x0001000f2573 in osg::NodeCallback::isSameKindAs (this=0x106bbc7b0, 
> obj=0x106bbc938) at NodeCallback:36
> #2  0x0001000f2501 in virtual thunk to 
> osg::NodeCallback::isSameKindAs(osg::Object const*) const () at 
> stl_vector.h:271
> #3  0x0001020c875c in 
> osgDB::DeprecatedDotOsgWrapperManager::addDotOsgWrapper ()
> #4  0x0001020c85bd in 
> osgDB::RegisterDotOsgWrapperProxy::RegisterDotOsgWrapperProxy ()
> #5  0x0001020c84a9 in 
> osgDB::RegisterDotOsgWrapperProxy::RegisterDotOsgWrapperProxy ()
> #6  0x000108278d3e in __cxx_global_var_init9 ()
> #7  0x000108278e6c in global constructors keyed to a ()
> #8  0x7fff5fc0fda6 in 
> __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
>  ()
> #9  0x7fff5fc0faf2 in 
> __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE 
> ()
> #10 0x7fff5fc0d2e4 in 
> __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
>  ()
> #11 0x7fff5fc0e0b7 in 
> __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
>  ()
> #12 0x7fff5fc031b9 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
> #13 0x7fff5fc09657 in __dyld_dlopen ()
> #14 0x7fff8a0d495b in dlopen ()
> #15 0x0001020d1dde in osgDB::DynamicLibrary::getLibraryHandle ()
> #16 0x0001020d1aef in osgDB::DynamicLibrary::loadLibrary ()
> #17 0x000102113002 in osgDB::Registry::loadLibrary ()
> #18 0x000106f07247 in OSGReaderWriter::loadWrappers ()
> #19 0x000106f06524 in OSGReaderWriter::readNode ()
> #20 0x000106f05749 in OSGReaderWriter::readNode ()
> #21 0x000102129cb0 in osgDB::Registry::ReadNodeFunctor::doRead ()
> #22 0x0001021176eb in osgDB::Registry::read ()
> #23 0x00010211888e in osgDB::Registry::readImplementation ()
> #24 0x00010211a7ba in osgDB::Registry::readNodeImplementation ()
> #25 0x0001020b154c in osgDB::Registry::readNode ()
> #26 0x0001021076cb in osgDB::readNodeFile ()
> #27 0x0001000bd242 in osgDB::readNodeFile (filename=@0x10817ed70) at 
> ReadFile:106
> #28 0x0001000af884 in spin::ModelNode::drawModel (this=0x107805c00) at 
> ModelNode.cpp:393
> #29 0x0001000b67ae in spin::ModelNode::setModelFromFile 
> (this=0x107805c00, filename=0x106d2d4c4 
> "~/src/OpenSceneGraph-Data-3.0.0/cow.osg") at ModelNode.cpp:162
> 
> 
> [/code]
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=46870#46870
> 
> 
> 
> 
> 
> ___
> 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] Problems with DotOsgWrapper in OSG 3.1.1 on OSX 10.7

2012-04-05 Thread Mike Wozniewski
Hi,

I just upgraded from OSG 2.9.8 to 3.1.1 and my project now crashes when loading 
.osg models. The error occurs in 
DeprecatedDotOsgWrapperManager::addDotOsgWrapper (see the backtrace below).

The funny thing is that OSG examples work fine. It's just something to do with 
my project settings. I'm using a custom XCode project, so it's hard to post 
details here, but can anyone suggest where to look? Am I forgetting to link 
with something that the deprecated wrappers would need?

Everything else works well. In fact, if I enable more verbose notifications, I 
see that the osgdb_osg plugin loads successfully:

Code:
FindFileInPath() : USING /usr/local/lib/osgPlugins-3.1.1/osgdb_osg.so
Opened DynamicLibrary osgPlugins-3.1.1/osgdb_osg.so



It looks like that plugin requests to load the osgdb_deprecated_osg plugin, and 
then I get the crash immediately after this is printed:

Code:
FindFileInPath() : USING /usr/local/lib/osgPlugins3.1.1/osgdb_deprecated_osg.so
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()



Image plugins (eg, jpeg work fine).

Any ideas?

Here's the interesting part of the backtrace:

Code:

#0  0x7fff92042b8c in __dynamic_cast ()
#1  0x0001000f2573 in osg::NodeCallback::isSameKindAs (this=0x106bbc7b0, 
obj=0x106bbc938) at NodeCallback:36
#2  0x0001000f2501 in virtual thunk to 
osg::NodeCallback::isSameKindAs(osg::Object const*) const () at stl_vector.h:271
#3  0x0001020c875c in 
osgDB::DeprecatedDotOsgWrapperManager::addDotOsgWrapper ()
#4  0x0001020c85bd in 
osgDB::RegisterDotOsgWrapperProxy::RegisterDotOsgWrapperProxy ()
#5  0x0001020c84a9 in 
osgDB::RegisterDotOsgWrapperProxy::RegisterDotOsgWrapperProxy ()
#6  0x000108278d3e in __cxx_global_var_init9 ()
#7  0x000108278e6c in global constructors keyed to a ()
#8  0x7fff5fc0fda6 in 
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE 
()
#9  0x7fff5fc0faf2 in 
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#10 0x7fff5fc0d2e4 in 
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
 ()
#11 0x7fff5fc0e0b7 in 
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
 ()
#12 0x7fff5fc031b9 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
#13 0x7fff5fc09657 in __dyld_dlopen ()
#14 0x7fff8a0d495b in dlopen ()
#15 0x0001020d1dde in osgDB::DynamicLibrary::getLibraryHandle ()
#16 0x0001020d1aef in osgDB::DynamicLibrary::loadLibrary ()
#17 0x000102113002 in osgDB::Registry::loadLibrary ()
#18 0x000106f07247 in OSGReaderWriter::loadWrappers ()
#19 0x000106f06524 in OSGReaderWriter::readNode ()
#20 0x000106f05749 in OSGReaderWriter::readNode ()
#21 0x000102129cb0 in osgDB::Registry::ReadNodeFunctor::doRead ()
#22 0x0001021176eb in osgDB::Registry::read ()
#23 0x00010211888e in osgDB::Registry::readImplementation ()
#24 0x00010211a7ba in osgDB::Registry::readNodeImplementation ()
#25 0x0001020b154c in osgDB::Registry::readNode ()
#26 0x0001021076cb in osgDB::readNodeFile ()
#27 0x0001000bd242 in osgDB::readNodeFile (filename=@0x10817ed70) at 
ReadFile:106
#28 0x0001000af884 in spin::ModelNode::drawModel (this=0x107805c00) at 
ModelNode.cpp:393
#29 0x0001000b67ae in spin::ModelNode::setModelFromFile (this=0x107805c00, 
filename=0x106d2d4c4 "~/src/OpenSceneGraph-Data-3.0.0/cow.osg") at 
ModelNode.cpp:162


[/code]

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





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