All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] mozjs: fix configure host contamination
@ 2016-04-26 19:08 Mark Asselstine
  2016-04-26 21:36 ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Asselstine @ 2016-04-26 19:08 UTC (permalink / raw)
  To: openembedded-devel; +Cc: koen

When building mozjs the following error was observed

| Traceback (most recent call last):
|   File "./config.status", line 9, in <module>
|     from ConfigStatus import config_status
|   File "/build/bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/mozjs17.0.0/js/src/build/ConfigStatus.py", line 11, in <module>
|     import sys, re, os, posixpath, ntpath
|   File "/usr/lib/python2.7/ntpath.py", line 15, in <module>
|     from genericpath import _unicode
| ImportError: cannot import name _unicode
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /build//bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/temp/do_configure/log.do_configure.1056

Note the host paths found in the error msg. Further this issue can be
explored using the host python, which will not error when attempting
the above import, and the python in the sysroot, which will fail when
we attempt the import.

By inheriting pythonnative we ensure the proper paths are set to avoid
this host contamination.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
index be4b50b..1dc99ab 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
@@ -21,7 +21,7 @@ SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c
 
 S = "${WORKDIR}/${BPN}${PV}/js/src"
 
-inherit autotools pkgconfig perlnative
+inherit autotools pkgconfig perlnative pythonnative
 
 DEPENDS += "nspr zlib"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [meta-oe][PATCH] mozjs: fix configure host contamination
  2016-04-26 19:08 [meta-oe][PATCH] mozjs: fix configure host contamination Mark Asselstine
@ 2016-04-26 21:36 ` Burton, Ross
  2016-04-27 15:15   ` Mark Asselstine
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-04-26 21:36 UTC (permalink / raw)
  To: OpenEmbedded Devel List; +Cc: Koen Kooi

On 26 April 2016 at 20:08, Mark Asselstine <mark.asselstine@windriver.com>
wrote:

> | Traceback (most recent call last):
> |   File "./config.status", line 9, in <module>
> |     from ConfigStatus import config_status
> |   File
> "/build/bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/mozjs17.0.0/js/src/build/ConfigStatus.py",
> line 11, in <module>
> |     import sys, re, os, posixpath, ntpath
> |   File "/usr/lib/python2.7/ntpath.py", line 15, in <module>
> |     from genericpath import _unicode
> | ImportError: cannot import name _unicode
> | WARNING: exit code 1 from a shell command.
> | ERROR: Function failed: do_configure (log file is located at
> /build//bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/temp/do_configure/log.do_configure.1056
>

I'm not sure using pythonnative is the right fix here.  Executing python
using the host python should just work, so why does importing ntpath fail
using your host python?

What happens if you run the host python in a terminal and do "import
ntpath"? Does your host's python have a crippled class library or is broken
in some way?

Ross


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-oe][PATCH] mozjs: fix configure host contamination
  2016-04-26 21:36 ` Burton, Ross
@ 2016-04-27 15:15   ` Mark Asselstine
  2016-04-27 17:34     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Asselstine @ 2016-04-27 15:15 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

On Tue, Apr 26, 2016 at 5:36 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 26 April 2016 at 20:08, Mark Asselstine <mark.asselstine@windriver.com>
> wrote:
>
>> | Traceback (most recent call last):
>> |   File "./config.status", line 9, in <module>
>> |     from ConfigStatus import config_status
>> |   File
>> "/build/bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/mozjs17.0.0/js/src/build/ConfigStatus.py",
>> line 11, in <module>
>> |     import sys, re, os, posixpath, ntpath
>> |   File "/usr/lib/python2.7/ntpath.py", line 15, in <module>
>> |     from genericpath import _unicode
>> | ImportError: cannot import name _unicode
>> | WARNING: exit code 1 from a shell command.
>> | ERROR: Function failed: do_configure (log file is located at
>> /build//bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/temp/do_configure/log.do_configure.1056
>>
>
> I'm not sure using pythonnative is the right fix here.  Executing python
> using the host python should just work, so why does importing ntpath fail
> using your host python?

Correct. Host python should and does work but configure is executing
sysroot python and using host libraries.

>
> What happens if you run the host python in a terminal and do "import
> ntpath"? Does your host's python have a crippled class library or is broken
> in some way?

Again, host python does work, it is a matter of sysroot python being
executed and using host libs. So agreed there are two solutions, fix
things to use host python or the fix I have proposed.

Mark

>
> Ross
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-oe][PATCH] mozjs: fix configure host contamination
  2016-04-27 15:15   ` Mark Asselstine
@ 2016-04-27 17:34     ` Burton, Ross
  2016-04-27 19:06       ` Mark Asselstine
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-04-27 17:34 UTC (permalink / raw)
  To: OpenEmbedded Devel List; +Cc: Koen Kooi

On 27 April 2016 at 16:15, Mark Asselstine <mark.asselstine@windriver.com>
wrote:

> > I'm not sure using pythonnative is the right fix here.  Executing python
> > using the host python should just work, so why does importing ntpath fail
> > using your host python?
>
> Correct. Host python should and does work but configure is executing
> sysroot python and using host libraries.
>

How is it finding and executing the sysroot python without inheriting
pythonnative?

Ross


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-oe][PATCH] mozjs: fix configure host contamination
  2016-04-27 17:34     ` Burton, Ross
@ 2016-04-27 19:06       ` Mark Asselstine
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Asselstine @ 2016-04-27 19:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

On Wed, Apr 27, 2016 at 1:34 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 27 April 2016 at 16:15, Mark Asselstine <mark.asselstine@windriver.com>
> wrote:
>
>> > I'm not sure using pythonnative is the right fix here.  Executing python
>> > using the host python should just work, so why does importing ntpath fail
>> > using your host python?
>>
>> Correct. Host python should and does work but configure is executing
>> sysroot python and using host libraries.
>>
>
> How is it finding and executing the sysroot python without inheriting
> pythonnative?

I originally hit this issue when building Wind River Linux and I
usually take steps to ensure these changes are applicable to non-Wind
River Linux builds before sending anything out. It appears my checks
have failed me. Looking again at a Yocto build I see that host python
is being picked up and thus the issue does not exist.

Thanks Ross for the review.

Mark


>
> Ross
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-27 19:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 19:08 [meta-oe][PATCH] mozjs: fix configure host contamination Mark Asselstine
2016-04-26 21:36 ` Burton, Ross
2016-04-27 15:15   ` Mark Asselstine
2016-04-27 17:34     ` Burton, Ross
2016-04-27 19:06       ` Mark Asselstine

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.