On Mon, Jul 27, 2009 at 10:31:57AM -0400, Stephen Langer wrote:
> Hi --
> 
> I've just found that fink's python 2.5  and python 2.6 are built with  
> different values of LDSHARED, and this is  (probably) what's  
> preventing my python extension from building properly under 2.6.   
> LDSHARED contains linker arguments, and when building an extension,  
> the value of LDSHARED used to build python is automatically used for  
> the extension.  But fink's 2.5 and 2.6 use different values:
> 
> % /sw/bin/python2.5 -c 'from distutils import sysconfig; print  
> sysconfig.get_config_var("LDSHARED")'
> gcc -L/sw/lib -bundle -undefined dynamic_lookup
> % /sw/bin/python2.6 -c 'from distutils import sysconfig; print  
> sysconfig.get_config_var("LDSHARED")'
> gcc -L/sw/lib -bundle -L/sw/lib/python2.6/config -lpython2.6
> 
> "-undefined dynamic_lookup" is missing from 2.6, and this prevents an  
> extension that uses multiple .dylibs from building.

Why isn't your extension linking against the .dylib(s) that it uses?
This linker flag change was intentional, part of the DescPackaging note:

  Make sure all compiled modules link against libpython2.6 (and
  propagate this to third-party compiled modules) to ensure that
  all symbols resolved at compile-time to avoid packager
  mistakes and user runtime surprises.

We've had cases where a module didn't link against a dependent library
(the upstream author assumed it would somehow get linked or loaded
somewhere else, or made a platform-non-portable assumption about what
lib would supply a certain symbol). The result is that the module
compiles fine but at runtime users get an error message that a certain
symbol could not be resolved--that's totally a packager mistake that
the user cannot fix without hacking, and fink is Just Supposed To
Work. Forcing a module to link against its dependencies shifts the
burden to the packager to get it right before it ever gets to the
user.

dan

-- 
Daniel Macks
[email protected]
http://www.netspace.org/~dmacks


------------------------------------------------------------------------------
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to