Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#16111 closed defect (fixed)

python25-2.5.2 builds differing dylib and framework libraries

Reported by: blb@… Owned by: mww@…
Priority: High Milestone:
Component: ports Version: 1.7.0
Keywords: python24 python30 framework Cc: raimue (Rainer Müller), skymoo (Adam Mercer), mf2k (Frank Schima), myschizobuddy@…, andrea.bedini@…, r1pp3r@…
Port: python25

Description

With the new framework build for python25, it installs both a ${prefix}/Library/Frameworks/Python.framework/Versions/2.5/Python and a ${prefix}/lib/libpython2.5.dylib. It turns out these two are incompatible with one another.

For example, if you install a module which includes a compiled component (eg, subversion-python25bindings has svn.fs, which is in _fs.so) and links against the Python.framework/.../Python, and something else compiled against /opt/local/lib/libpython2.5.dyllib (eg, ajp-wsgi), things will not go well. I see the error

Fatal Python error: Interpreter not initialized (version mismatch?)

when using ajp-wsgi to run Trac (which uses the afore-mentioned subversion-python25bindings).

I believe the proper solution is to build python25 like Apple builds python on the OS, namely, by simply symlinking what's in ${prefix}/lib to the Python.framework/.../Python file. Will attach a tarball which includes a Portfile diff and an updated files/patch-Makefile.pre.in.diff which accomplishes this. FYI, revision is 7 since I bumped it to 6 for the update in ticket #9831.

Attachments (2)

python25-16111.tar.bz2 (1.1 KB) - added by blb@… 9 years ago.
tarball containing diff to Portfile and updated files/patch-Makefile.pre.in.diff
python25.diff (1.5 KB) - added by blb@… 9 years ago.
diff to Portfile

Download all attachments as: .zip

Change History (16)

Changed 9 years ago by blb@…

tarball containing diff to Portfile and updated files/patch-Makefile.pre.in.diff

comment:1 Changed 9 years ago by skymoo (Adam Mercer)

  • Cc ram@… added

Cc Me!

comment:2 follow-up: Changed 9 years ago by raimue (Rainer Müller)

  • Keywords python24 python30 added

I adapted this behavior from the old python24 port, so I suppose this also applies to python24 and python30.

comment:3 in reply to: ↑ 2 Changed 9 years ago by blb@…

Replying to raimue@macports.org:

I adapted this behavior from the old python24 port, so I suppose this also applies to python24 and python30.

Most likely, not sure what kinds of changes could affect this for 2.6 and 3.0, but 2.4 I'm sure will need it as well. Fortunately, it isn't too big of a deal, as this removes all libpython.dylib building then just symlinks it instead. I just did 2.5 since that's what I use and it's the latest stable version of Python.

comment:4 Changed 9 years ago by mf2k (Frank Schima)

  • Cc macsforever2000@… added

Cc Me!

comment:5 Changed 9 years ago by ajb78@…

  • Cc ajb78@… added

Cc Me!

comment:6 Changed 9 years ago by ajb78@…

  • Cc ajb78@… removed

Cc Me!

comment:7 Changed 9 years ago by blb@…

  • Keywords python25 removed
  • Port python25 added

Looks like the first set was a bit overzealous on creating ${prefix}/lib symlinks; attaching a new patch (rooted in dports/lang/python25) to update Portfile and files/patch-Makefile.pre.in.diff again, only creating libpython${branch}.dylib.

comment:8 Changed 9 years ago by blb@…

Ack, that last one isn't right either; the files/patch-Makefile.pre.in.diff is for #9831, this update actually removes the need for that diff at all (but #9831 needs a new one).

Changed 9 years ago by blb@…

diff to Portfile

comment:9 Changed 9 years ago by myschizobuddy@…

  • Cc myschizobuddy@… added

Cc Me!

comment:10 Changed 9 years ago by myschizobuddy@…

can you please post the complete portfile (not diff) and files folder thankyou

comment:11 Changed 9 years ago by andrea.bedini@…

  • Cc andrea.bedini@… added

Cc Me!

comment:12 Changed 9 years ago by blb@…

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r43000 (maintainer timeout).

comment:13 Changed 9 years ago by r1pp3r@…

  • Cc r1pp3r@… added

Cc Me!

comment:14 Changed 9 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.