[osg-users] running osgversion on Mac, not on console, was RE: Call for feedback : glu.h does itcontain_GLUfuncptr?

Robert Osfield robert.osfield at gmail.com
Tue Oct 2 09:06:37 PDT 2007


HI Andy,

My guess is that osgversion is by default linking to osgViewer which
isn't required.

W.r.t 64bit OSX, we'll have to cross this bridge when we get to - and
members of the OSX OSG community will have to cross it. Frankly I
think Apple are serious **** for playing stunts like dropping C API
support, its not a technical issue, just playing vendor lock-in card.
It just causes pain for developers trying to target the platform, I
just don't get how Apple can get away with such abuse.

Robert.

On 10/2/07, Andy Skinner <Andy.Skinner at mathworks.com> wrote:
> No, it was definitely not pre 2.x.  I'd say within the last month.  (The
> longest time ago would have been 2.1.5, but I probably built it more
> recently.)
>
> But no matter where/when it came in, maybe we can do something about it.
> Here's a bit more from our Mac guy:
>
> ========================
> I set a breakpoint in INIT_Processes before running osgversion, and the
> stack trace gives me this:
>
> #0  0x917dc8af in INIT_Processes ()
> #1  0x9180cfee in ProcessManagerLazyInitialization ()
> #2  0x9180d0d7 in TransformProcessType ()
> #3  0x00695535 in
> osgViewer::OSXCarbonWindowingSystemInterface::OSXCarbonWindowingSystemIn
> terface ()
> #4  0x00695684 in
> RegisterWindowingSystemInterfaceProxy::RegisterWindowingSystemInterfaceP
> roxy ()
> #5  0x00697d9a in __static_initialization_and_destruction_0 ()
> #6  0x8fe0fcb2 in
> __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkCon
> textE ()
> #7  0x8fe0a1c6 in
> __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
> #8  0x8fe0a164 in
> __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
> #9  0x8fe0c646 in
> __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE () #10
> 0x8fe03070 in __dyld__ZN4dyld24initializeMainExecutableEv ()
> #11 0x00004c92 in _start ()
> #12 0x00004bfd in start ()
>
> So, during static initialization, osgversion is registering the OSG
> windowing system interface proxy, whose interface is Carbon-based on
> Mac. That code assumes that it is run as a console (UI) application.  It
> would be probably best for osgversion to defer this initialization or
> avoid it entirely.  On the other hand, if the folks using openscenegraph
> want a 64-bit version (WE DO!), they're going to need to replace these
> Carbon calls with Cocoa calls anyway, and that would change when the
> CGContext session is initialized, possibly avoiding the problem
> entirely.
> ========================
>
> Where would static initialization be bringing in
> osgViewer::OSXCarbonWindowingSystemInterface, when all we're doing is
> getting version numbers?
>
> andy
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert
> Osfield
> Sent: Tuesday, October 02, 2007 11:02 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] Call for feedback : glu.h does
> itcontain_GLUfuncptr?
>
> Hi Andy,
>
> On 10/2/07, Andy Skinner <Andy.Skinner at mathworks.com> wrote:
> > Building with CMake.
> >
> > osgversion worked for me not that long ago.  I've built a lot as I've
> > tried different versions, gotten everything working on all our
> > platforms, etc.
>
> Could this have been pre 2.x and CMake?
>
> > Hmmm, I wonder whether any of our settings changed that might affect
> > this.
>
> Check how CMake is building osgversion it could be that there is an
> Cmake/OSG option for making osgversion as a pure console app.  I'm not
> 100% familiar with this side.
>
> > At the worst I could skip using osgversion.  I use it both as a test
> and
> > to generate the version numbers, since some of our makefiles require
> > them for file and directory names.
>
> It'd be nice to fix this, but I don't see it as an issue to hold back
> 2.2 for.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list