Opened 18 years ago
Closed 18 years ago
#10953 closed defect (fixed)
[PATCH] py-sip: import sip core dumps
Reported by: | blair (Blair Zajac) | Owned by: | mww@… |
---|---|---|---|
Priority: | High | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: |
Description
The py-sip package has a sip.so that currently is dynamically linking against the latest version of the Python framework installed into the system area.
Here, somebody has installed a Python 2.5 and MacPort's is picking up this version and not MacPorts' version:
$ knoxville:~ root# otool -L /opt/local/lib/python2.4/site-packages/sip.so /opt/local/lib/python2.4/site-packages/sip.so: /System/Library/Frameworks/Python.framework/Versions/2.3/Python (compatibility version 2.3.0, current version 2.3.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.4)
If you try to import it:
$ /opt/local/bin/python Python 2.4.3 (#1, Oct 27 2006, 06:51:42) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sip Fatal Python error: Interpreter not initialized (version mismatch?) Abort
I'm attaching a modified Portfile that passes -F to the link command and enables a test of
python -c 'import sip'
to ensure that it works.
The fix is to add a -F to the link.
One problem is moving to Python 2.5. It turns out that importing qt in Python also loads sip.so, so the two should be updated at the same time. However, if somebody has a framework version of 2.4 and 2.5 installed in MacPorts, then it's not clear how the -F will work and it may pick up 2.5. So we may want to ensure that the building of py-sip requires that python2.5 not be installed.
Regards, Blair
Attachments (2)
Change History (5)
Changed 18 years ago by blair (Blair Zajac)
Attachment: | py-sip-patch.txt added |
---|
comment:1 Changed 18 years ago by blair (Blair Zajac)
Changed 18 years ago by blair (Blair Zajac)
Attachment: | py-sip-patch2.txt added |
---|
comment:2 Changed 18 years ago by blair (Blair Zajac)
The port owner didn't respond within 72 hours, so I made the commit per
http://darwinports.opendarwin.org/docs/ch14s02.html#id1002379
The change went in as r20262.
I'll close this ticket when I get additional Trac rights :)
Regards, Blair
comment:3 Changed 18 years ago by markd@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
Here's a slightly tweaked Portfile that increases the revision number to 1 to force people to rebuild it.