[Python-bugs-list] [ python-Bugs-534807 ] C extension modules with same short name

noreply@sourceforge.net noreply@sourceforge.net
Thu, 28 Mar 2002 08:56:12 -0800


Bugs item #534807, was opened at 2002-03-25 13:54
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=534807&group_id=5470

Category: Extension Modules
Group: Python 2.3
Status: Closed
Resolution: None
Priority: 5
Submitted By: Tom Epperly (tepperly)
Assigned to: Nobody/Anonymous (nobody)
Summary: C extension modules with same short name

Initial Comment:
I am working on a language interoperability project,
http://www.llnl.gov/CASC/components/. We have an IDL
that gets converted into Python C extension modules. If
we have an IDL such as this:

package MPIB {
  interface Base {
  }
}

package MPIB.Default {
  class Base implements-all MPIB.Base {
  }
}

We end up with two C extension modules whose short name
is Base.  There is a symbol conflict when loading both
because they both use "initBase" as the DLL/SO
initialization function.  It would be nice if C
extension modules could use the fully qualified module
name instead of the short name for the initialization
function.  For example,

initMPID_Base and initMPIB_Default_Base 
or
initMPIDBase and initMPIDDefaultBase

What do you think?

----------------------------------------------------------------------

Comment By: Matthew G. Knepley (knepley)
Date: 2002-03-28 11:56

Message:
Logged In: YES 
user_id=58554

I filed this bug with Tom. I would like to get all the Python stubs for single package in his IDL in one shared object. However, each interface/class is a module in order to handle static methods, etc. Therefore, I end up making links from each small .so to one big one since this is much easier to build. I wanted a way t odictate the form of the global symbol which is necessary to load the module.
  I don't think would be too hard, but it is more of a 2.3/3.0 candidate. I got the source and am trying to work through it myself before offering a suggestion to python-dev.

----------------------------------------------------------------------

Comment By: Tom Epperly (tepperly)
Date: 2002-03-28 11:47

Message:
Logged In: YES 
user_id=94539

I apologize for filing this bug. It turns out that it was a
misunderstanding between me and a user who filed a bug report
against my software project.  He was building his .so in a
non-standard way (from a Python perspective) that caused a
symbol conflict.  Basically, he was putting a whole bunch of
extension modules in a single .so.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-03-27 07:32

Message:
Logged In: YES 
user_id=21627

I can't see why this gives a conflict. When Python loads the
module, it requests the symbol specifically from the shared
library it just loaded. What operating system are you using?

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2002-03-26 08:02

Message:
Logged In: YES 
user_id=6656

There is exactly no way in which this is a 2.2.1 candidate.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=534807&group_id=5470