Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#17975 closed defect (duplicate)

boost +python25 links with system python libs (instead of macport libs)

Reported by: evert.rol@… Owned by: sanchom (Sancho McCann)
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: boost python Cc: dbsgeo@…, stromnov (Andrey Stromnov), muanis@…
Port: boost

Description (last modified by jmroot (Joshua Root))

The ${prefix}/lib/libboost_python-mt.dylib (& related) library has a dependency on the system python library, not on the python2.5 installed by macports (obviously only when installing boost with port install boost +python25). This can be seen using eg:

$> otool -L lib/libboost_python-mt.dylib 

lib/libboost_python-mt.dylib:

	/opt/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)

	/System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1)

	/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 111.0.0)

The problem only really shows up when compiling a source to a .so module with boost-python: the macports python2.5 complains when importing the module: "Fatal Python error: Interpreter not initialized (version mismatch?)", while the system python does not show this error.

(Note that printing sys.path in macports python2.5 does not show any standard system path, only the macports one, as it should.)

The problem does not exist for the python 2.6 (probably since there are no system libraries for this version).

See also this thread: http://lists.macosforge.org/pipermail/macports-users/2009-January/013226.html

Change History (11)

comment:1 Changed 16 years ago by blb@…

Could be related to the LINKFORSHARED issue, see #15099.

comment:2 Changed 16 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: changed from macports-tickets@… to sanchom@…

comment:3 Changed 16 years ago by evert.rol@…

Ticket can now be closed: the origin of the problem is probably in an incorrect python2.5 installation, see #17998.

comment:4 Changed 16 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed

Could have just modified this ticket... oh well.

comment:5 Changed 16 years ago by dbsgeo@…

Cc: dbsgeo@… added

Cc Me!

comment:6 Changed 16 years ago by stromnov (Andrey Stromnov)

Cc: stromnov@… added

Cc Me!

comment:7 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:8 Changed 16 years ago by stromnov (Andrey Stromnov)

Temporary workaround (for now can be implemented in post-build phase):

install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.5/Python /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Python libboost_python-mt.dylib

comment:9 Changed 15 years ago by peimei@…

And don't forget about libboost_python.dylib, when installing with +st variant

comment:10 Changed 15 years ago by muanis@…

Cc: muanis@… added

Cc Me!

comment:11 Changed 15 years ago by arobson73@…

so does this mean if i want the libboost-python.dylib then i need to install the boost port as follows; sudo port install boost+python26

i previously just installed boost ,e.g : sudo port install boost

if i do that then it does not generate the libboost-python.dylib

please let me know

Note: See TracTickets for help on using tickets.