Bug 31598 - configure: Doesn't check for python libxml2
Summary: configure: Doesn't check for python libxml2
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-13 06:40 UTC by Cyril Brulebois
Modified: 2013-01-24 10:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
use correct version of python to make the check (616 bytes, patch)
2013-01-21 19:17 UTC, Jan Vesely
Details | Splinter Review

Description Cyril Brulebois 2010-11-13 06:40:12 UTC
My build in a (quite minimal) chroot broke with:

make[2]: Entering directory `/home/kibi/mesa/mesa/src/mesa'
python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES1.1 > main/api_exec_es1.c
Traceback (most recent call last):
  File "main/es_generator.py", line 26, in <module>
    import APIspecutil as apiutil
  File "/home/kibi/mesa/mesa/src/mesa/main/APIspecutil.py", line 28, in <module>
    import libxml2
ImportError: No module named libxml2


I guess you may want to add a check on the availability of this module in configure.ac?
Comment 1 Andreas Boll 2013-01-20 13:33:14 UTC
Fixed by commit 410b58c7bfcebbc866d2dc4ab32c6f23b55d383b
Comment 2 zephiris 2013-01-21 04:06:21 UTC
On systems where 'python' is 3.x and 'python2' is 2.x, mesa's config will store the variable PYTHON2='python2', whereas your code checks the PYTHON variable, which is unset , and always uses 'python' (3.x), which can't have libxml2. This causes the build to fail even with everything available.
Comment 3 Jan Vesely 2013-01-21 19:17:31 UTC
Created attachment 73402 [details] [review]
use correct version of python to make the check

The attached patch fixes the check on systems where python2 is not the default.
Comment 4 LoneVVolf 2013-01-21 21:11:09 UTC
build also failed on archlinux, where python 3.x is default.
I use a simple workaround for now :

PYTHON='python2' ./autogen.sh --prefix=/usr /

Please reopen this bug
Comment 5 LoneVVolf 2013-01-24 10:50:56 UTC
fixed with this commit :

build: Fix build on systems where /usr/bin/python isn't python 2.
http://cgit.freedesktop.org/mesa/mesa/commit/?id=121d19de920212225586c9269f2d34ab7e6e1aec


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.