Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] mesa3d:  "ImportError: No module named libxml2"
Date: Sat, 10 Nov 2012 02:51:24 +0100	[thread overview]
Message-ID: <509DB31C.90903@mind.be> (raw)
In-Reply-To: <1531E53627F1F749B4FE809BF2A4EB6703A24FFD@wetmex10>

On 11/05/12 10:18, Vellemans, Noel wrote:
> I do end up with this error while building mesa3d"  "ImportError: No
> module named libxml2" (ONLY if I do build into a clean-output
> directory!)
>
> The strange thing is that when building for a second time it all builds
> fine.

  The problem is that host-python is used, not native python, and host-python
doesn't have libxml2 bindings.  python is used to generate api_exec_es1.c:
python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES1.1 > main/api_exec_es1.c
When you run it the second time, the file exists (and is empty), so you
won't get an error.  But as soon as you try to use GLES, you'll notice that
it doesn't work :-)

  The problem is that libxml2 python bindings are part of libxml2.  If we want
to build them, we would have to make host-libxml2 depend on host-python...
And that's certainly something we don't want.

  A work-around is to set
MESA3D_CONF_ENV = PYTHON2=/usr/bin/python
but that's not something we want to do in buildroot either, because there is
not guarantee that native python has libxml2, or that the native python is
python2, or that it is in /usr/bin.

  The only realistic solution I can think of is to create a blind
BR2_NEED_HOST_LIBXML2_PYTHON_BINDINGS and select this from mesa3d.  Then we
can conditionally depend on host-python and build the bindings in libxml2.mk.
But it is still fairly horrible.

  BTW, Thomas already told you this on October 12 (though his explanation
was a bit shorter :-).

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  parent reply	other threads:[~2012-11-10  1:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05  9:18 [Buildroot] mesa3d: "ImportError: No module named libxml2" Vellemans, Noel
2012-11-05  9:38 ` Maxime Ripard
2012-11-10  1:51 ` Arnout Vandecappelle [this message]
2012-11-12 11:39   ` Vellemans, Noel
2012-11-12 11:56     ` Will Wagner
2012-11-12 21:06       ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=509DB31C.90903@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox