Compiling Cairo for unicode ucs2

Dave Coventry <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CACbSWtY2esj-9gFNWFjP23db_Hj4tsq-p+zOyayJ1DK8uF72Eg@mail.gmail.com>
Hi,

I've been using a Hidden line removal python script which uses cairo,
but I'm getting the following error:

/usr/lib/python2.6/dist-packages/cairo/_cairo.so: undefined symbol:
PyUnicodeUCS4_AsUTF8String

Apparently I need to compile cairo with Python compiled to ucs2.

I've downloaded pycairo-1.10.0.tar.bz2, extracted to
/opt/pycairo-1.10.0 and then run ./waf configure which gives the
following results:


Murray py2cairo-1.10.0 # ./waf configure
  ./options()
Setting top to                           : /opt/py2cairo-1.10.0
Setting out to                           : /opt/py2cairo-1.10.0/build_directory
  ./configure()
Checking for 'gcc' (c compiler)          : ok
Checking for program python              : /usr/bin/python
Checking for python version              : (2, 7, 2, 'final', 0)
Checking for library python2.7           : yes
Checking for program python2.7-config    : /usr/bin/python2.7-config
Checking for header Python.h             : yes
Checking for program pkg-config          : /usr/bin/pkg-config
Checking for 'cairo' >= 1.10.0           : yes
Configuration:
PREFIX                                   : /usr/local
LIBDIR                                   : /usr/local/lib
'configure' finished successfully (0.984s)

Clearly the version that cairo is compiling against is python2.7 and
my PyUnicodeUCS4_AsUTF8String error is against Python2.6.

But when I run waf with python2.6 it appears to compile against python2.7:


Murray py2cairo-1.10.0 # python2.6 waf install
  ./options()
Waf: Entering directory `/opt/py2cairo-1.10.0/build_directory'
  ./build()
  src/build()
- install /usr/local/include/pycairo/pycairo.h (from src/pycairo.h)
[ 2/12] subst: pycairo.pc.in -> pycairo.pc
+ install /usr/local/lib/python2.7/site-packages/cairo/_cairo.so (from
build_directory/src/_cairo.so)
+ install /usr/local/lib/pkgconfig/pycairo.pc (from pycairo.pc)
Waf: Leaving directory `/opt/py2cairo-1.10.0/build_directory'
- install /usr/local/lib/python2.7/site-packages/cairo/__init__.py
(from src/__init__.py)
+ byte compiling '/usr/local/lib/python2.7/site-packages/cairo/__init__.py'
'install' finished successfully (0.318s)

How do I compile Cairo against the correct Unicode version?

Kind Regards,

Dave Coventry
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.