[Pythonmac-SIG] pyobjc.so [was: Knock me over with a spoon!]
Bob Ippolito
bob@redivi.com
Fri, 18 Jan 2002 19:06:59 -0500
Do _not_ use the dynload_next that ships with python 2.2! It's broke as
hell. If you have say, MyPackage/blah.so and MyOtherPackage/blah.so it
will confuse the two. The version that Apple wrote works perfectly with
the libdl stuff in Python.
What you need to do is download libdlcompat (may be called libcompat)
from Darwin CVS, and hack the configure script to use the bsd style
dynamic loader (-ldl, but not -ldld). It's pretty easy, if you need
more help let me know and I can backtrack to figure out what exactly I
did.
-bob
On Friday, January 18, 2002, at 06:53 PM, Steven Majewski wrote:
>
>
> On Sat, 19 Jan 2002, Jack Jansen wrote:
>
>>> Looks like I need to insert a call to NSLinkEditError to
>>> get the specific error info.
>>>
>> If you get a better exception could you post a patch?
>
> Courtesy of Guido, the bug that I was hitting was:
> http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=
> 498915
>
>
> But below is that change that gave me the following more detailed
> error string:
>
>>>> import pyobjc
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: dyld: /usr/local/src/Python-2.2/python.exe Undefined
> symbols:
> _PyObject_DelItemString
> Failure linking new module
>>>>
>
>
> -- Steve
>
>
> *** dynload_next.c.0 Fri Jan 18 13:50:06 2002
> --- dynload_next.c Fri Jan 18 14:08:13 2002
> ***************
> *** 150,157 ****
> if (errString == NULL) {
> newModule = NSLinkModule(image, pathname,
> NSLINKMODULE_OPTION_BINDNOW|NSLINKMODULE_OPTION_RETURN_ON_ERROR);
> ! if (!newModule)
> ! errString = "Failure linking new module";
> }
> if (errString != NULL) {
> PyErr_SetString(PyExc_ImportError, errString);
> --- 150,164 ----
> if (errString == NULL) {
> newModule = NSLinkModule(image, pathname,
> NSLINKMODULE_OPTION_BINDNOW|NSLINKMODULE_OPTION_RETURN_ON_ERROR);
> ! if (!newModule) { // sdm7g
> ! int errNo;
> ! char *fileName, *moreErrorStr;
> ! NSLinkEditErrors c;
> ! errString = "Failure linking new module";
> ! NSLinkEditError( &c, &errNo, &fileName, &moreErrorStr );
> ! errString = strcat( fileName, errString );
> ! errString = strcat( moreErrorStr, errString );
> ! } // sdm7g
> }
> if (errString != NULL) {
> PyErr_SetString(PyExc_ImportError, errString);
>
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig