Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

Mark Dickinson dickinsm at gmail.com
Fri Sep 25 15:57:32 EDT 2009


On Sep 25, 7:56 pm, Mark Dickinson <dicki... at gmail.com> wrote:
> On Sep 25, 7:05 pm, Alejandro Valdez <alejandro.val... at gmail.com>
> wrote:
> > Hello I sent this e-mail to the python-help list but I'm not sure if
> > that list is active... so I post it again here:
>
> > I'm trying to build Python 2.6.2 from the sources downloaded from the
> > python official site on OpenSuSE 11.1 (32 bit). After installation the
> > python command line interpreter seems to run ok, but when I try to
> > install setuptools I get:
> > [...]
> > To compile Python I executed:
>
> > ./configure --prefix=/home/user/python
> > ./make
> > ./make install
>
> > The compile process seems to be ok, so I'm kind of clueless :-(
>
> > Any ideas?
>
> This is just a guess, but try configuring with:
>
> ./configure --enable-unicode=ucs4 --prefix=/home/user/python
>
> On Linux, by default, a self-compiled Python uses UCS2
> internally for its unicode support (with some support
> for UTF16).  Most Linux distributions, however, distribute
> a Python that uses UCS4 (aka UTF32) instead, so it seems
> possible that your setuptools egg is expecting to find a
> UCS4 build.

Also, make sure that setuptools is picking up the right python2.6
executable:  you want it to be using the one in /home/user/python/bin,
not the one in /usr/bin (or where-ever SuSE keeps its python).
What does 'which python2.6' give on your system, after the python
install
but before the setuptools install?

It may be necessary to set the PYTHONPATH environment variable too;
I'm not sure about this.

I admit I don't really understand how you could be getting an
undefined _PyUnicodeUCS2* symbol;  undefined _PyUnicodeUCS4* would
make more sense.

Mark



More information about the Python-list mailing list