[MacPorts] #21444: boost with +python26 links against wrong python on Snow Leopard

MacPorts noreply at macports.org
Sun Oct 4 09:38:50 PDT 2009


#21444: boost with +python26 links against wrong python on Snow Leopard
---------------------------------+------------------------------------------
  Reporter:  stromnov@…          |       Owner:  nox@…           
      Type:  defect              |      Status:  closed          
  Priority:  Normal              |   Milestone:                  
 Component:  ports               |     Version:  1.8.0           
Resolution:  worksforme          |    Keywords:                  
      Port:  boost               |  
---------------------------------+------------------------------------------

Comment(by dbsgeo@…):

 Replying to [comment:18 stromnov@…]:
 > stromnov at stromnov:~$ ls -l `which python`
 > -rwxr-xr-x  2 root  wheel  86000 Jul  8 10:57 /usr/bin/python

 That worries me. Nothing but a hunch here because I'm no expert in
 linking, but I've noticed that the bjam/gcc linking is really fragile and
 may be failing it may falling back to the system python. When compiling
 boost from source I've seen this with more regularity when the above
 command returns the system python (which I assume that does).

 Anyway, most importantly I think that this type of linking syntax is
 brittle (taken from your logs):

 {{{
     "/usr/bin/g++-4.2" -dynamiclib -Wl,-single_module -install_name
 "/opt/local/lib/libboost_python-mt.dylib"
 -L"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib"
 -L"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config"
 [...snip...]  -lpython2.6    -headerpad_max_install_names -Wl,-dead_strip
 -no_dead_strip_inits_and_terms
 }}}

 and this unresolved bug: http://lists.boost.org/boost-
 users/2008/08/39302.php

 could likely be fixed if bjam were patched to issue a linker command like:

 {{{
 '-F/opt/local/Library/Frameworks -framework Python'
 }}}

 This is a change I had to make upstream to mapnik for the py26-mapnik port
 to consistently link to the macports python
 (https://trac.mapnik.org/changeset/967 and
 https://trac.mapnik.org/changeset/1187/trunk/bindings/python/SConscript)

 instead of this (which I think is failing unpredictably, for reasons I
 wish I understood more)
 {{{
 L"/opt/local/Library/Frameworks....." -lpython2.6
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/21444#comment:21>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list