On Jul 27, 2009, at 3:08 PM, Daniel Macks wrote:

> 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.


Thanks.  The problem was due to a different error that was being  
masked by "-undefined dynamic_lookup", so the changes in LDSHARED were  
a red herring.

  -- Steve

--
-- [email protected]                    Tel: (301) 975-5423 --
-- http://math.nist.gov/mcsd/Staff/SLanger/   Fax: (301) 975-3553 --
-- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --

-- "I don't think this will work.  That's why it's science."      --
--                     Naomi Langer (age 6),  17 Feb 2003         --






------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to