[Pythonmac-SIG] Problem with module linking

Jack Jansen Jack.Jansen@oratrix.com
Thu, 12 Dec 2002 01:33:29 +0100


On woensdag, dec 11, 2002, at 22:55 Europe/Amsterdam, Nicholas Riley 
wrote:
> Is there any way to get a more detailed error message?

Yes, by getting Python 2.3a0, i.e. the CVS version from Python. It 
prints more information, including the text of the error message from 
dyld. You could also try to graft the following code (which I lifted 
from 2.3a0) onto your 2.2.2 version of Python/dynload_next.c:
		newModule = NSLinkModule(image, pathname, LINKOPTIONS);
		if (newModule == NULL) {
			int errNo;
			char *fileName, *moreErrorStr;
			NSLinkEditErrors c;
			NSLinkEditError( &c, &errNo, &fileName, &moreErrorStr );
			PyOS_snprintf(errBuf, 512, "Failure linking new module: %s: %s",
					fileName, moreErrorStr);
			errString = errBuf;
		}

If you look for the "Failure linking new module" error message you 
should find the spot where you need to put this.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -