Opened 14 years ago

Closed 14 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:


The py-sip package has a 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/
        /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?)

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, 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)

py-sip-patch.txt (739 bytes) - added by blair (Blair Zajac) 14 years ago.
py-sip-patch2.txt (1.1 KB) - added by blair (Blair Zajac) 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by blair (Blair Zajac)

Attachment: py-sip-patch.txt added

comment:1 Changed 14 years ago by blair (Blair Zajac)

Here's a slightly tweaked Portfile that increases the revision number to 1 to force people to rebuild it.

Changed 14 years ago by blair (Blair Zajac)

Attachment: py-sip-patch2.txt added

comment:2 Changed 14 years ago by blair (Blair Zajac)

The port owner didn't respond within 72 hours, so I made the commit per

The change went in as r20262.

I'll close this ticket when I get additional Trac rights :)

Regards, Blair

comment:3 Changed 14 years ago by markd@…

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.