New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #17975 (closed defect: duplicate)

Opened 8 years ago

Last modified 6 years ago

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

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

Description (last modified by jmr@…) (diff)

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 


	/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:

Change History

comment:1 Changed 8 years ago by blb@…

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

comment:2 Changed 8 years ago by jmr@…

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

comment:3 Changed 8 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 8 years ago by jmr@…

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

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

comment:5 Changed 8 years ago by dbsgeo@…

  • Cc dbsgeo@… added

Cc Me!

comment:6 Changed 8 years ago by stromnov@…

  • Cc stromnov@… added

Cc Me!

comment:7 Changed 7 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

comment:8 Changed 7 years ago by 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 7 years ago by peimei@…

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

comment:10 Changed 7 years ago by muanis@…

  • Cc muanis@… added

Cc Me!

comment:11 Changed 6 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.