Re: [pyxpcom] pyxpcom on mac, anyone?
by Shane Caraveo other posts by this author
Aug 17 2005 7:32PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] pyxpcom on mac, anyone?
|
Re: [pyxpcom] pyxpcom on mac, anyone?
Brendan O'Connor wrote:
> Shane, the patch works great -- I can build pyxpcom under seamonkey
> against OS X 10.4's builtin python installation, and everything seems
> to work.
>
> I'm trying to build it against my own custom python, but I at runtime
> I get the error
I'm assuming your own python build is a framework build...
> The Python XPCOM loader is adding
> '/Users/osaf/mozilla/od-ch3/dist/SeaMonkeyDebug.app/Contents/MacOS/python'
> to sys.path
> Could not import the Python XPCOM extension
> exceptions.ImportError: Inappropriate file type for dynamic loading
>
> I think it found the python shared libraries alright. For the OS X
> native python build, which works fine, I had to edit autoconf.mk to
> use
>
> PYTHON_LIBS = -L/usr/lib -lpython2.3
That worries me some, you shouldn't be using -l but rather -framework.
> for my local python, configure didn't quite find all the library paths, so I did
>
> PYTHON_INCLUDES =
> -I/Users/osaf/chandler-trunk/chandler/debug/Library/Frameworks/Python.framework/Versions/2
.4/include/python2.4
> PYTHON_LIBS = -F/Users/osaf/chandler-trunk/chandler/debug/Library/Frameworks
> -framework Python
>
> and, .../Frameworks/Python.framework/Python is the python shared
> library, which, if I understand the OS X ld correctly, gets linked in
> via -F and -framework instead of -L and -l.
We didn't do any work towards locating python in a non-standard
location. I'll have to look into what we did to make this use the
python in our Komodo.app/Frameworks/Python.framework. I think we do
something post build to force the linkage to the executable's python
framework. Our linkage for _xpcom.so looks like:
otool -L /Applications/Komodo.app/Contents/MacOS/python/xpcom/_xpcom.so
/Applications/Komodo.app/Contents/MacOS/python/xpcom/_xpcom.so:
@executable_path/libxpcom.dylib (compatibility version 1.0.0,
current version 1.0.0)
@executable_path/libplds4.dylib (compatibility version 1.0.0,
current version 1.0.0)
@executable_path/libplc4.dylib (compatibility version 1.0.0,
current version 1.0.0)
@executable_path/libnspr4.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 71.1.3)
@executable_path/../Frameworks/Python.framework/Versions/2.4/Python
(compatibility version 2.4.0, current version 2.4.0)
Regards,
Shane
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Brendan O'Connor
Shane Caraveo
Brendan O'Connor
Shane Caraveo
Trent Mick
Brendan O'Connor
Trent Mick
Brendan O'Connor
Brendan O'Connor
|