Jaap Spies wrote:
> Bruce Sherwood wrote:
>> Dunno whether this might explain the problem that was seen with the Sage
[]
>> It seems that the option,"unicode=ucs4" ,is not used in compiling
>> "Python-2.5.1".
[]
> Is this option essential for vpython???
This whole problem has nothing to do with vpython, or only insofar as it
uses libboost_python for building. It is a libboost_python problem.
Libboost_python uses (by default) unicode, and therefore it needs to be
linked together with the same flavor of python, UCS2 or UCS4, that it
was built with.
From the original post it seems clear that there were two pythons
present on the machine, the one from SAGE which believes in UCS2, and
the one from the linux distribution which believes in UCS4. The
libboost_python was built against the UCS4 python, so it cannot be used
with UCS2 python. In other words, if you want to build vpython with the
python from SAGE, you first have to build libboost_python with the same
python.
After reading up on this story, I still find it incredible that the
python developers consciously decided to allow python to adhere to one
of two incompatible persuasions, UCS2 and UCS4, so that compiled modules
(extensions) must adhere to the same persuasion as the python they were
built with, or they will crash. What is worse is that you don't see from
the outside which persuasion your python was built with, unless you run
something like
python -c 'import sys; print sys.maxunicode'
or you search for UCS2 or UCS4 in symbol names in the binary executable.
AFAICT, UCS2 is still the default, i.e. you get this if you don't use
any --unicode configure flag.
--
Martin
|