• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C++ RTTI/dynamic_cast across shared module boundaries?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ RTTI/dynamic_cast across shared module boundaries?


  • Subject: Re: C++ RTTI/dynamic_cast across shared module boundaries?
  • From: Zachary Pincus <email@hidden>
  • Date: Sun, 12 Mar 2006 17:09:46 -0800

Thanks for your email.

I've recently found that the problem was that python on the mac provides an interface for setting the dlopen flags, but does not seem to respect the values set in that interface. (Ugh... after all of these emails to the XCode list about how I was having these troubles even after setting RTLD_GLOBAL in Python, it turns out that python wasn't even looking at what flags I set.)

I've submitted a patch to make python use dlopen on 10.3 and 10.4 instead of NSLinkImage and friends -- hopefully the python people will accept the patch, so that mac python works like python does on other unix-like systems.

Zach

On Mar 12, 2006, at 2:31 PM, Steve Baxter wrote:

The problem is that the decision on whether to load plugins/bundles with global visibility or not is up to the loader (i.e. Python in this case) not the loadee (the plugin). Unless you can get the Python guys to change their loading scheme you are stuck I think.

Cheers,

Steve.

On 6 Mar 2006, at 4:03, Peter O'Gorman wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Zachary Pincus wrote:
| Python appears to be using:
| NSCreateObjectFileImageFromFile and NSLinkImage
|
| http://svn.python.org/view/python/trunk/Python/dynload_next.c?
| rev=36531&view=markup
|
| It looks like the options passed to NSLinkImage (which, I assume, is
| where the GLOBAL type flags would go that are passed to dlopen
| eventually) are hard-coded for Mac Python, so there's the selection of
| loading bundles globally versus locally is done at compile- time, not
| at run-time.
|
| I'll take this up with the python folk.


Hmm. You could implement your module in two parts, I guess. A loadable
bundle that python can load, and a shared library that the bundle uses (or a
number of bundles and shared libraries). On Mac OS X 10.3, NSLinkModule,
et.al. had a private flag, but that only applied to the module itself, not
any of the libraries that the module used, they were loaded globally. I
don't think that behavior changed with the new dyld, Nick could confirm, so
it might work for you.


Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iQCVAwUBRAu0gbiDAg3OZTLPAQKNDAP/UbAEMeE1mNoWZQA51JkfEvG2ii6ew5mr
kvDZVbRRkU6BKCTTXFIew+/NJIQ92dOCrOG6juFQzeiJIjsTyJ2rTZOAjZLBoCT6
LcU8cU01cXbSI7O92tFSojJfjyz0FBS/Ox6Q3e6hA2xvva3WbZqVaXki6iq7cOma
+aiwPdFLWTs=
=gzER
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40improvision.com


This email sent to email@hidden

Steve Baxter Software Development Manager Improvision +44-2476-692229

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40stanford.edu


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: Zachary Pincus <email@hidden>)
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: Howard Hinnant <email@hidden>)
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: Zachary Pincus <email@hidden>)
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: Eric Albert <email@hidden>)
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: Zachary Pincus <email@hidden>)
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: "Peter O'Gorman" <email@hidden>)
 >Re: C++ RTTI/dynamic_cast across shared module boundaries? (From: Steve Baxter <email@hidden>)

  • Prev by Date: Re: C++ RTTI/dynamic_cast across shared module boundaries?
  • Next by Date: conversion from Xcode 1.5 project to Xcode 2.0
  • Previous by thread: Re: C++ RTTI/dynamic_cast across shared module boundaries?
  • Next by thread: Searching Xcode help (was: Developing a Widget)
  • Index(es):
    • Date
    • Thread