[wxPython-mac] Fwd: [Pythonmac-SIG] Additional binary packages
for Python2.3 on 10.2.6
Bob Ippolito
bob at redivi.com
Wed Sep 10 01:26:57 EDT 2003
On Wednesday, Sep 10, 2003, at 00:00 America/New_York, Robin Dunn wrote:
> Andrew Straw wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> Hi wxPython Mac folks--
>> Most of you are probably on the Pythonmac-SIG, but in case you're
>> not, I'm forwarding a recent thread which deals with compile issues
>> for the wxPython modules. Could we change the build process to take
>> this into account and stop using "-undefined suppress
>> -flat_namespace" in the SHARED_LD macro?
>
> I played with that today and unfortunately I can't get it to work
> right yet. It's okay when wxMac is built as one big dynlib as it is
> in 2.4, but in 2.5 wxWindows is migrating to a multi-lib build and I
> get link errors when the dynlibs are linked if I don't use those
> flags. I've tried some other approaches with varioius link flags and
> such but am running out of ideas... Any suggestions?
>
> I expect that the libs may have to be reorganized again to avoid the
> dependencies causing the errors. <blech!>
I'd have to see some build or dyld errors in order to give an educated
suggestion, but my guess is that some library expects to get all of the
symbols from another another library as well as all of its "child"
symbols when linking. This is a simple linker flag issue. Each
library should link to the libraries it uses symbols from under normal
circumstances. The two exceptions I know of are when building with
-flat_namespace or linking to an -umbrella framework (which implicitly
links to all of its -sub_umbrella's and -sub_library's).
Here's a python code analogy
## this set of modules mimics the semantics of a flat namespace
# module_a.py
a_value = 1
# module_b.py
from module_a import *
b_value = a_value + 1
# module_c.py
from module_b import *
c_value = a_value + b_value + 1
## this set of modules mimics the semantics of a two level namespace
# module_a.py
a_value = 1
# module_b.py
import module_a
b_value = a_value + 1
# module_c.py
import module_b
c_value = module_a.a_value + module_b.b_value + 1
^^^^^^ this will get a NameError, because module_a is not imported
so module_c's code needs to have "import module_a" at the beginning.
This is analagous to adding -lmodule_a to module_c's compile flags.
-bob
More information about the Pythonmac-SIG
mailing list