libxcb build problem

Dennis J Perkins dennisjperkins at comcast.net
Sat Jan 17 11:38:49 MST 2009


On Sat, 2009-01-17 at 16:39 +0000, lux-integ wrote:
> On Saturday 17 January 2009 03:53:13 pm Dennis J Perkins wrote:
> > I'm having problems building libxcb.  It complains that there is no
> > Python module called _elementtree in cElementTree.py.  I've been trying
> > to trace this on the Internet, and it seems that this is due to pyexpat
> > not being built.  How does this get built?
> 
> when I last did it I   first installed expat ( version-2.0.1)   then  python  
> (then version2.5.2  with the patch) 
> 
> aside from the python problem,     I applied a patch given  at  
> http://cblfs.cross-lfs.org/index.php/Libxcb  
> 
> I dont   if its applicable to the version of libxcb you are installing.
> 
> ..hope this is of help

I installed expat before building Python.  I even went back and rebuilt
it.

The patch handles a locking problem that XCB has on some systems.

My system is a minimal biarch, that is, mostly 64-bit, but enough 32-bit
for GRUB.

On a biarch system, Python puts system-independent libraries
into /usr/lib and system-dependent libraries into /usr/lib64.

What I have found is that when I build Python, pyexpat.so is built and
installed into /usr/lib64/python2.6/lib-dynload.  Ubuntu does the same. 

When I try to compile libxcb, it cannot find the system-dependent files:

Making all in src
make[1]: Entering directory `/src/xorg/xcb/libxcb-1.1.91/src'
ln -s -f /usr/share/xcb/xproto.xml xproto.xml
/usr/bin/python ./c_client.py
-p /usr/lib/python2.6/site-packages /usr/share/xcb/xproto.xml
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "./c_client.py", line 2, in <module>
    from xml.etree.cElementTree import *
  File "/usr/lib/python2.6/xml/etree/cElementTree.py", line 3, in
<module>
    from _elementtree import *
ImportError: No module named _elementtree
make[1]: *** [xproto.c] Error 1
make[1]: Leaving directory `/src/xorg/xcb/libxcb-1.1.91/src'
make: *** [all-recursive] Error 1


I did some searching on the Internet, and it appears that the import
error is due to not finding pyexpat.so.

If I set PYTHONPATH to /usr/lib64/python2.6/lib-dynload, libxcb will
compile but it does complain that it could not find platform dependent
libraries.  Configure complains when it tries to find the python version
and when it tries to find the python platform.  Make complains 25 times.

The build suggests setting PYTHONHOME but that makes the interpreter
inaccessible.

I don't know if the warnings can be ignored or if problems will occur
when libxcb is used.  I also don't know why I should set PYTHONHOME or
PYTHONPATH because Python is installed in a standard location.

Running ldconfig didn't do anything.

This problem might not exist if I had built a pure 64-bit system.



More information about the blfs-support mailing list