From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/qpid-proton: needs host-python2
Date: Tue, 14 Jul 2015 15:59:58 +0200 [thread overview]
Message-ID: <20150714135958.GC26192@free.fr> (raw)
In-Reply-To: <20150714120325.GB2332@tarshish>
Baruch, All,
On 2015-07-14 15:03 +0300, Baruch Siach spake thusly:
> On Tue, Jul 14, 2015 at 01:56:27PM +0200, Thomas Petazzoni wrote:
> > On Tue, 14 Jul 2015 14:48:04 +0300, Baruch Siach wrote:
> > > My interpretation of the cmake log is that cmake uses the python
> > > interpreter it detects to run the scripts. In the failed cases cmake
> > > detected host-python3 because host-python3 happened to build before
> > > qpid-proton. cmake did not use the distro installed host python even
> > > though it's python2 (most likely). So I'm not sure patching the scripts is
> > > necessary.
> >
> > It is necessary if your host machine has a Python 3 interpreter and not
> > a Python 2 interpreter. In this case the scripts will
> > run /usr/bin/python (because it's hardcoded in their source code), and
> > this will run Python 3.
> >
> > So Yann's solution looks good. Am I missing something?
>
> My point is that in the failed cases /usr/bin/python was not used, otherwise
> the build would have succeeded. It seems that cmake uses the python
> interpreter it detects to run the scripts. So patching the scripts doesn't
> change anything by itself, IIUC.
OK, so you were right and wrong at the same time! ;-)
In fact, if we just add host-python as a dependency, and we do not have
a target python3 package, then we have no $(HOST_DIR)/usr/bin/python ,
only $(HOST_DIR)/usr/bin/python2 so cmake won't find it, and will
fallback to using the host's python, and we're back to square-one.
So, we have to tell cmake what python to use, with something like
-DPYTHON_EXECUTABLE=$(HOST_DIR)/usr/bin/python2
And now, it works! :-) (patch incoming shortly)
Thanks for directing me in the right direction! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2015-07-14 13:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 11:38 [Buildroot] [PATCH] package/qpid-proton: needs host-python2 Yann E. MORIN
2015-07-14 11:48 ` Baruch Siach
2015-07-14 11:56 ` Thomas Petazzoni
2015-07-14 12:03 ` Baruch Siach
2015-07-14 12:42 ` Yann E. MORIN
2015-07-14 13:59 ` Yann E. MORIN [this message]
2015-07-14 15:43 ` Thomas Petazzoni
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=20150714135958.GC26192@free.fr \
--to=yann.morin.1998@free.fr \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.