[Pythonmac-SIG] 4Suite troubles
Jack Jansen
Jack.Jansen@oratrix.com
Thu, 27 Mar 2003 23:46:47 +0100
On donderdag, maa 27, 2003, at 22:47 Europe/Amsterdam, Joel Bender
wrote:
> Second, after the 'python setup.py build' and 'python setup.py
> install' which will be successful, you need to do this strange dance:
>
> % cat >foo.txt
> _initcDomlettec
> % sudo nmedit -s foo.txt
> /usr/lib/python2.2/site-packages/Ft/Xml/cDomlettec.so
I think I understand what the problem is, if this is the solution. I
actually started writing
an email that started with the inverse of that sentence, but have been
enlightened and started
afresh:-)
The command you give hides all external symbols, except
_initcDomlettec. This
doesn't influence the module itself, but because Python 2.2 is linked
with a
single, global, namespace for all external symbols it may influence
other modules:
they can no longer access symbols from this module, if it happens to
have been
loaded previously. This ability, accessing symbols from previously
loaded
modules, is viewed as a feature by some and as a bug by others
(including me).
I see it as a bug because this will cause symbols to be resolved from a
different
place as was intended during link time.
However, because some people view it as a feature and actually use it,
it cannot
be fixed in Python 2.2.X: micro-releases must be backwards compatible,
and fixing
this would break modules of authors who view this as a feature.
So, the bad news is that this cannot be fixed for 2.2.X.
The good news, however, is that in 2.3 it has been fixed (I've added a
loophole
for people who really need it, but if you don't use the loophole you
get what I view
as the correct behavior: at link time it is determined where symbols
are resolved
from).
All that said, it should be possible to adapt the 4suite setup.py to
include this
stopgap, but do it only for Python 2.2.
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma
Goldman -