I am attempting to extend Stackless Python on Ubuntu 8.04 with boost::python.

I have built the examples in boost_1_35_0/libs/python/example/quickstart with bjam. This passes the tests if I run it with the default Ubuntu python installation (/usr/lib/python25). However it fails if I run it with the stackless python installation (/usr/local/lib/python25).

I get the error:

Trying:
  from extending import *
Expecting nothing
**********************************************************************
File "/home/simon/Dev/testSpace/boostPython/test_extending.py", line 6, in test_extending
Failed example:
  from extending import *
Exception raised:
  Traceback (most recent call last):
    File "/usr/local/lib/python2.5/doctest.py", line 1228, in __run
      compileflags, 1) in test.globs
    File "<doctest test_extending[0]>", line 1, in <module>
      from extending import *
ImportError: /usr/local/lib/libboost_python-gcc42-d-1_35.so.1.35.0: undefined symbol: PyUnicodeUCS4_FromEncodedObject


I built libboost_python-gcc42-d-1_35.so.1.35.0 by pointing bjam at my stackless python installation:

sudo bjam -sPYTHON_ROOT=/usr/local/lib/python25 -sPYTHON_VERSION=2.5 stage

It is obviously some sort of Unicode error. It appears my Ubuntu version is UCS4 (looking at sys.maxunicode), while my stackless version, built from svn, is UCS2. This would explain the missing PyUnicodeUCS4_FromEncodedObject, I guess.

I tried building stackless with

./configure --enable-unicode=ucs4

but the make and install fail:

running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
*** WARNING: renaming "_ctypes" since importing it failed: build/lib.linux-i686-2.5/_ctypes.so: undefined symbol: PyUnicodeUCS2_FromEncodedObject *** WARNING: renaming "array" since importing it failed: build/lib.linux-i686-2.5/array.so: undefined symbol: PyUnicodeUCS2_FromUnicode *** WARNING: renaming "_testcapi" since importing it failed: build/lib.linux-i686-2.5/_testcapi.so: undefined symbol: PyUnicodeUCS2_Decode *** WARNING: renaming "unicodedata" since importing it failed: build/lib.linux-i686-2.5/unicodedata.so: undefined symbol: _PyUnicodeUCS2_ToNumeric *** WARNING: renaming "_locale" since importing it failed: build/lib.linux-i686-2.5/_locale.so: undefined symbol: PyUnicodeUCS2_FromObject *** WARNING: renaming "cPickle" since importing it failed: build/lib.linux-i686-2.5/cPickle.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8 *** WARNING: renaming "pyexpat" since importing it failed: build/lib.linux-i686-2.5/pyexpat.so: undefined symbol: PyUnicodeUCS2_Decode *** WARNING: renaming "_elementtree" since importing it failed: build/lib.linux-i686-2.5/_elementtree.so: undefined symbol: PyUnicodeUCS2_Decode *** WARNING: renaming "_multibytecodec" since importing it failed: build/lib.linux-i686-2.5/_multibytecodec.so: undefined symbol: PyUnicodeUCS2_Resize
running build_scripts


Is there anyway to overcome this incompatibility between UCS2 stackless and UCS4 boost?

Thanks

Simon

Thanks

Si

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to