Skip to contentSkip to conversation

Morgan Little : python: Update for python-native changes

oe-commits In review Martin Jansa 2 participants 12 messages Jul 23, 2012 – Aug 6, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20120722104358.0339C10217@opal

#1 lore raw
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)

NOTE: package package-index-1.0-r0: task do_package_index: Failed

Cheers,

Quoted 74 lines

---

 meta/recipes-devtools/python/python_2.7.3.bb |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
meta/recipes-devtools/python/python_2.7.3.bb +9 -9
index b736cc2..d27ff05 100644
@@ -1,6 +1,6 @@
 require python.inc
 DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
@@ -30,7 +30,7 @@ SRC_URI += "\
 
 S = "${WORKDIR}/Python-${PV}"
 
-inherit autotools multilib_header
+inherit autotools multilib_header pythonnative
 
 # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
 #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
@@ -45,7 +45,7 @@ do_configure_prepend() {
 do_compile() {
         # regenerate platform specific files, because they depend on system headers
         cd Lib/plat-linux2
-        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python \
+        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
                 ${S}/Tools/scripts/h2py.py -i '(u_long)' \
                 ${STAGING_INCDIR}/dlfcn.h \
                 ${STAGING_INCDIR}/linux/cdrom.h \
@@ -89,8 +89,8 @@ do_compile() {
 
 	export CROSS_COMPILE="${TARGET_PREFIX}"
 
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
 		STAGING_LIBDIR=${STAGING_LIBDIR} \
 		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
 		STAGING_INCDIR=${STAGING_INCDIR} \
@@ -99,8 +99,8 @@ do_compile() {
 
 	oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
 
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
 		STAGING_LIBDIR=${STAGING_LIBDIR} \
 		STAGING_INCDIR=${STAGING_INCDIR} \
 		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
@@ -115,8 +115,8 @@ do_install() {
 
 	export CROSS_COMPILE="${TARGET_PREFIX}"
 
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
 		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
 		STAGING_LIBDIR=${STAGING_LIBDIR} \
 		STAGING_INCDIR=${STAGING_INCDIR} \

_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 33 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)
Quoted 1 line

NOTE: package package-index-1.0-r0: task do_package_index: Failed

What is the header of opkg-make-index? Is it a path to python or a /usr/bin/env python?

Cheers,

Richard

#3 lore raw
Quoted 36 lines · Richard Purdie
Quoted 33 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)
Quoted 1 line

NOTE: package package-index-1.0-r0: task do_package_index: Failed

Quoted 2 lines

What is the header of opkg-make-index? Is it a path to python or a /usr/bin/env python?

$ head -n1 jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/opkg-make-index
#!/usr/bin/env python

Cheers,

Quoted 11 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw
Quoted 37 lines · Martin Jansa
Quoted 36 lines · Richard Purdie
Quoted 34 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)

NOTE: package package-index-1.0-r0: task do_package_index: Failed

Quoted 5 lines
Quoted 2 lines

What is the header of opkg-make-index? Is it a path to python or a /usr/bin/env python?

$ head -n1 jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/opkg-make-index
#!/usr/bin/env python

package-index doesn't inherit pythonnative. The python found from env would therefore be the host system python but its using files from the sysroot. Mixing the two is a bad idea.

The question is how is it mixing these up, the host system python shouldn't be looking there for modules.

So I'm not sure why they're getting mixed up but its likely the problem. Does anything jump out at you on the machine in question with the above in mind?

Cheers,

Richard

#5 lore raw
Quoted 48 lines · Richard Purdie
Quoted 37 lines · Martin Jansa
Quoted 36 lines · Richard Purdie
Quoted 34 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)

NOTE: package package-index-1.0-r0: task do_package_index: Failed

Quoted 5 lines
Quoted 2 lines

What is the header of opkg-make-index? Is it a path to python or a /usr/bin/env python?

$ head -n1 jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/opkg-make-index
#!/usr/bin/env python

package-index doesn't inherit pythonnative. The python found from env would therefore be the host system python but its using files from the sysroot. Mixing the two is a bad idea.

Quoted 6 lines

The question is how is it mixing these up, the host system python shouldn't be looking there for modules.

So I'm not sure why they're getting mixed up but its likely the problem. Does anything jump out at you on the machine in question with the above in mind?

Not really and it happens only in some builds (all today - haven't seen this error before) and sofar it failed in 4/10 image/feed builds and worked in remaining 6.

Even for the same combination of MACHINE and target it once worked and once failed without any metadata changes or host distro changes between.

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw
Quoted 56 lines · Martin Jansa
Quoted 48 lines · Richard Purdie
Quoted 37 lines · Martin Jansa
Quoted 36 lines · Richard Purdie
Quoted 34 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)

NOTE: package package-index-1.0-r0: task do_package_index: Failed

Quoted 5 lines
Quoted 2 lines

What is the header of opkg-make-index? Is it a path to python or a /usr/bin/env python?

$ head -n1 jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/opkg-make-index
#!/usr/bin/env python

package-index doesn't inherit pythonnative. The python found from env would therefore be the host system python but its using files from the sysroot. Mixing the two is a bad idea.

Quoted 6 lines

The question is how is it mixing these up, the host system python shouldn't be looking there for modules.

So I'm not sure why they're getting mixed up but its likely the problem. Does anything jump out at you on the machine in question with the above in mind?

Quoted 6 lines

Not really and it happens only in some builds (all today - haven't seen this error before) and sofar it failed in 4/10 image/feed builds and worked in remaining 6.

Even for the same combination of MACHINE and target it once worked and once failed without any metadata changes or host distro changes between.

env doesn't show anything interesting related to python

changing shebang to path/tmp-eglibc/sysroots/x86_64-linux/usr/bin/python-native/python

made all currently failing builds to succeed again, but the issue is still there..

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#7 lore raw
Quoted 22 lines · Martin Jansa
Quoted 14 lines · Martin Jansa
Quoted 6 lines · Richard Purdie
Quoted 1 line · Martin Jansa

On Mon, Jul 23, 2012 at 12:32:55PM +0100, Richard Purdie wrote:

package-index doesn't inherit pythonnative. The python found from env would therefore be the host system python but its using files from the sysroot. Mixing the two is a bad idea.

Quoted 6 lines

The question is how is it mixing these up, the host system python shouldn't be looking there for modules.

So I'm not sure why they're getting mixed up but its likely the problem. Does anything jump out at you on the machine in question with the above in mind?

Quoted 6 lines

Not really and it happens only in some builds (all today - haven't seen this error before) and sofar it failed in 4/10 image/feed builds and worked in remaining 6.

Even for the same combination of MACHINE and target it once worked and once failed without any metadata changes or host distro changes between.

Quoted 7 lines

env doesn't show anything interesting related to python

changing shebang to path/tmp-eglibc/sysroots/x86_64-linux/usr/bin/python-native/python

made all currently failing builds to succeed again, but the issue is still there..

Is this on the same build machine? There must be something in common with the failed builds. Do they always fail if you
hardcode /usr/bin/python in there? If so, can we figure out why the host python is looking at files in the sysroot? LD_LIBRARY_PATH isn't set or something odd like that?

Cheers,

Richard

#8 lore raw
Quoted 25 lines · Richard Purdie
Quoted 24 lines · Martin Jansa
Quoted 14 lines · Martin Jansa
Quoted 6 lines · Richard Purdie
Quoted 1 line · Martin Jansa

On Mon, Jul 23, 2012 at 12:32:55PM +0100, Richard Purdie wrote:

package-index doesn't inherit pythonnative. The python found from env would therefore be the host system python but its using files from the sysroot. Mixing the two is a bad idea.

Quoted 6 lines

The question is how is it mixing these up, the host system python shouldn't be looking there for modules.

So I'm not sure why they're getting mixed up but its likely the problem. Does anything jump out at you on the machine in question with the above in mind?

Quoted 6 lines

Not really and it happens only in some builds (all today - haven't seen this error before) and sofar it failed in 4/10 image/feed builds and worked in remaining 6.

Even for the same combination of MACHINE and target it once worked and once failed without any metadata changes or host distro changes between.

env doesn't show anything interesting related to python

Quoted 8 lines
Quoted 5 lines

changing shebang to path/tmp-eglibc/sysroots/x86_64-linux/usr/bin/python-native/python

made all currently failing builds to succeed again, but the issue is still there..

Is this on the same build machine? There must be something in common with the failed builds. Do they always fail if you

Yes, same machine same builddir..

One failing image succeeded later, the remaining 3 are: 1 image (bitbake shr-image) and 2 bitbake package-index tasks (which are called after bitbake task-shr-feed is finished).

I'm doing 8 image builds + 4 feed builds in 2 separate builddirs there. All about 3 times already since yesterday.

So I don't see anything special on those 3 failing :/.

Quoted 1 line

hardcode /usr/bin/python in there? If so, can we figure out why the host

With hardcoded /usr/bin/python it was failing, then I've tried to hardcode that python-native which worked.

Quoted 2 lines

python is looking at files in the sysroot? LD_LIBRARY_PATH isn't set or something odd like that?

LD_LIBRARY_PATH is set to empty in setup-env script.

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#9 lore raw

PATCH 1/1 opkg-utils: inherit pythonnative

In reply to Martin Jansa
---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -1
index 92e6624..caa66f7 100644
@@ -8,7 +8,9 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "49cc783d8e0415059d126ae22c892988717ffda7"
 PV = "0.1.8+git${SRCPV}"
-PR = "r0"
+PR = "r1"
+
+inherit pythonnative
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=git \
            "
Signature · 1 line
1.7.8.6
#10 lore raw

Re: [PATCH] opkg-utils: inherit pythonnative

Quoted 10 lines · Martin Jansa
---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +0 -0
index 92e6624..caa66f7 100644

meta/recipes-devtools/opkg-utils/opkg-utils_git.bb RDEPENDS_${PN} = "python" · line 16

Quoted 10 lines
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -1
@@ -8,7 +8,9 @@ RDEPENDS_${PN} = "python"
 RDEPENDS_${PN}_virtclass-native = ""
 SRCREV = "49cc783d8e0415059d126ae22c892988717ffda7"
 PV = "0.1.8+git${SRCPV}"
-PR = "r0"
+PR = "r1"
+
+inherit pythonnative
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=git \
            "

Please ignore this patch, this needs to be in package-index recipe (and I had both patches when testing this :/)

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#11 lore raw
In reply to Martin Jansa
Quoted 33 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)
Quoted 1 line

NOTE: package package-index-1.0-r0: task do_package_index: Failed

similar issue when building libxcb (http://pastie.org/4352949), works after applying

http://patchwork.openembedded.org/patch/31987/
http://patchwork.openembedded.org/patch/31977/

and bitbake -c cleansstate libxcb-native libxcb xcb-proto-native xcb-proto to rebuild them (missing PR bumps).

Cheers,

NOTE: package inputproto-1_2.2-r0: task do_populate_sysroot: Started
ERROR: Function failed: do_compile (see /OE/shr-core/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libxcb/libxcb-1.8.1-r0/temp/log.do_compile.17687 for further information)
ERROR: Logfile of failure stored in: /OE/shr-core/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libxcb/libxcb-1.8.1-r0/temp/log.do_compile.17687 Log data follows:

| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make
| Making all in src
| make[1]: Entering directory `/OE/shr-core/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libxcb/libxcb-1.8.1-r0/libxcb-1.8.1/src'
| /usr/bin/python ./c_client.py -p /OE/shr-core/tmp-eglibc/sysroots/crespo//usr/lib64/python2.7/site-packages /OE/shr-core/tmp-eglibc/sysroots/crespo//usr/share/xcb/xproto.xml
| 
| Failed to load the xcbgen Python package!
| Make sure that xcb/proto installed it on your Python path.
| If not, you will need to create a .pth file or define $PYTHONPATH
| to extend the path.
| Refer to the README file in xcb/proto for more info.
| 
| Traceback (most recent call last):
|   File "./c_client.py", line 2307, in <module>
|     from xcbgen.state import Module
| ImportError: No module named xcbgen.state
| make[1]: *** [xproto.c] Error 1
| make[1]: Leaving directory `/OE/shr-core/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libxcb/libxcb-1.8.1-r0/libxcb-1.8.1/src'
| make: *** [all-recursive] Error 1
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (see /OE/shr-core/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libxcb/libxcb-1.8.1-r0/temp/log.do_compile.17687 for further information)

NOTE: package libxcb-1.8.1-r0: task do_compile: Failed
ERROR: Task 2798 (/OE/shr-core/openembedded-core/meta/recipes-graphics/xcb/libxcb_1.8.1.bb, do_compile) failed with exit code '1' Waiting for 1 running tasks to finish:
0: inputproto-1_2.2-r0 do_populate_sysroot (pid 17723)
NOTE: package inputproto-1_2.2-r0: task do_populate_sysroot: Succeeded
NOTE: Tasks Summary: Attempted 2315 tasks of which 1252 didn't need to be rerun and 1 failed.
ERROR: An uncaught exception occured in runqueue, please see the failure below:

Summary: 1 task failed:
/OE/shr-core/openembedded-core/meta/recipes-graphics/xcb/libxcb_1.8.1.bb, do_compile
Summary: There were 4 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#12 lore raw
Quoted 36 lines · Martin Jansa
Quoted 33 lines · Martin Jansa
Quoted 8 lines · On Sun, Jul 22, 2012 at 10:43:53AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 284a65d55f0ffad0f4f7f32d72da0f9410578643
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=284a65d55f0ffad0f4f7f32d72da0f9410578643
Author: Morgan Little <[email protected]>
Date:   Thu Jul 19 13:46:07 2012 -0400
Quoted 7 lines

python: Update for python-native changes

Add pythonnative onto the list of inherits and update the paths to the binaries referenced in the recipe to the new paths.

Any idea why is opkg package-index now failing _sometimes_ ?

| + '[' -e /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/ ']'
| + touch /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages
| + flock /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages.flock -c 'opkg-make-index -r /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -p /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/Packages -m /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/deploy/ipk/'
| Traceback (most recent call last):
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 569, in <module>
|     main()
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 552, in main
|     known_paths = addsitepackages(known_paths)
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 329, in addsitepackages
|     for sitedir in getsitepackages():
|   File "/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib/python2.7/site.py", line 303, in getsitepackages
|     sitepackages.append(os.path.join(prefix, sys.lib,
| AttributeError: 'module' object has no attribute 'lib'
| ERROR: Function failed: do_package_index (see /var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_index.17223 for further information)
Quoted 1 line

NOTE: package package-index-1.0-r0: task do_package_index: Failed

Quoted 4 lines

similar issue when building libxcb (http://pastie.org/4352949), works after applying

http://patchwork.openembedded.org/patch/31987/
http://patchwork.openembedded.org/patch/31977/

I've merged the latter. The former is incorrect and we need to fix up the paths in the python module. I'll try and look at it tomorrow if nobody beats me to it.

Cheers,

Richard