All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [jethro/master] Misc fixes
@ 2015-11-25 20:44 Mark Hatle
  2015-11-25 20:44 ` [PATCH 1/3] allarch.bbclass: allarch packages are having their hashes altered by baselib Mark Hatle
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mark Hatle @ 2015-11-25 20:44 UTC (permalink / raw)
  To: openembedded-core

The following fixes have been tested on Jethro, I believe they are 
also applicable on master.

Note that the python change fixes an illegal instruction problem -- but in
some of my testing has exposed a second issue where 'unsafe' include/lib 
dir warnings are present.  I'm still working with others for a solution
to that.

Mark Hatle (3):
  allarch.bbclass: allarch packages are having their hashes altered by
    baselib
  python: Fix cross compiling x86->x86
  package_manager.py: Avoid installing an empty package list

 meta/classes/allarch.bbclass                       |  5 +++++
 meta/lib/oe/package_manager.py                     |  3 +++
 .../use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch | 23 ++++++++++++++++++++++
 meta/recipes-devtools/python/python_2.7.9.bb       |  4 ++--
 4 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python/use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch

-- 
1.9.3



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

* [PATCH 1/3] allarch.bbclass: allarch packages are having their hashes altered by baselib
  2015-11-25 20:44 [PATCH 0/3] [jethro/master] Misc fixes Mark Hatle
@ 2015-11-25 20:44 ` Mark Hatle
  2015-11-25 20:44 ` [PATCH 2/3] python: Fix cross compiling x86->x86 Mark Hatle
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2015-11-25 20:44 UTC (permalink / raw)
  To: openembedded-core

In a multilib configuration baselib can change, but allarch packages should not
changed from multilib to multilib.  So we set the value of baselib to none
which should act as a market for any errant users of libdir.
nonarch_base_libdir / nonarch_libdir should be used instead.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/allarch.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index 2fea7c0..6fa7a23 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -28,6 +28,11 @@ python () {
         d.setVar("SDK_ARCH", "none")
         d.setVar("SDK_CC_ARCH", "none")
 
+        # In a multilib configuration baselib can change, but we shouldn't be
+        # using it anyway.  All packages should use nonarch_base_libdir or 
+        # nonarch_libdir.
+        d.setVar("baselib", "none")
+
         # Avoid this being unnecessarily different due to nuances of
         # the target machine that aren't important for "all" arch
         # packages.
-- 
1.9.3



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

* [PATCH 2/3] python: Fix cross compiling x86->x86
  2015-11-25 20:44 [PATCH 0/3] [jethro/master] Misc fixes Mark Hatle
  2015-11-25 20:44 ` [PATCH 1/3] allarch.bbclass: allarch packages are having their hashes altered by baselib Mark Hatle
@ 2015-11-25 20:44 ` Mark Hatle
  2015-11-25 20:44 ` [PATCH 3/3] package_manager.py: Avoid installing an empty package list Mark Hatle
  2015-11-25 21:26 ` [PATCH 0/3] [jethro/master] Misc fixes Burton, Ross
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2015-11-25 20:44 UTC (permalink / raw)
  To: openembedded-core

If the target and host have the same type, the system may try to execute the
instructions from the target version.  This can lead to illegal instructions
as well as the wrong copy of the code running.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 .../use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch | 23 ++++++++++++++++++++++
 meta/recipes-devtools/python/python_2.7.9.bb       |  4 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python/use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch

diff --git a/meta/recipes-devtools/python/python/use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python/use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
new file mode 100644
index 0000000..3c44cc0
--- /dev/null
+++ b/meta/recipes-devtools/python/python/use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -0,0 +1,23 @@
+configure.ac: use CROSSPYTHONPATH instead of a static list
+
+When building x86->x86 the system will try to execute .so and related items
+from the default PYTHONPATH.  This will fail if the target CPU contains
+instructions that the host CPU does not have.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: Python-2.7.9/configure.ac
+===================================================================
+--- Python-2.7.9.orig/configure.ac
++++ Python-2.7.9/configure.ac
+@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+ 	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ 	fi
+         AC_MSG_RESULT($interp)
+-	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
++	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp
+     fi
+ elif test "$cross_compiling" = maybe; then
+     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/meta/recipes-devtools/python/python_2.7.9.bb b/meta/recipes-devtools/python/python_2.7.9.bb
index f7e2f27..183f715 100644
--- a/meta/recipes-devtools/python/python_2.7.9.bb
+++ b/meta/recipes-devtools/python/python_2.7.9.bb
@@ -26,6 +26,7 @@ SRC_URI += "\
   file://parallel-makeinst-create-bindir.patch \
   file://use_sysroot_ncurses_instead_of_host.patch \
   file://avoid_parallel_make_races_on_pgen.patch \
+  file://use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
@@ -38,6 +39,7 @@ CONFIGUREOPTS += " --with-system-ffi "
 #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
 TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
 TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
 
 # The following is a hack until we drop ac_cv_sizeof_off_t from site files
 EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)} ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
@@ -101,7 +103,6 @@ do_install() {
 	# install can race with the build so we have to run this first, then install
 	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} \
 		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
@@ -110,7 +111,6 @@ do_install() {
 	
 	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} \
 		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-- 
1.9.3



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

* [PATCH 3/3] package_manager.py: Avoid installing an empty package list
  2015-11-25 20:44 [PATCH 0/3] [jethro/master] Misc fixes Mark Hatle
  2015-11-25 20:44 ` [PATCH 1/3] allarch.bbclass: allarch packages are having their hashes altered by baselib Mark Hatle
  2015-11-25 20:44 ` [PATCH 2/3] python: Fix cross compiling x86->x86 Mark Hatle
@ 2015-11-25 20:44 ` Mark Hatle
  2015-11-25 21:26 ` [PATCH 0/3] [jethro/master] Misc fixes Burton, Ross
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2015-11-25 20:44 UTC (permalink / raw)
  To: openembedded-core

It is possible in an attempt only install, that everything listed is not
available to be installed.  This will have the effect of clearing the
package list.  However, we only check for an empty package list at
the beginning of the function.  We need to also check before running the
install, otherwise we can fail due to 'error: no package(s) given".

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/lib/oe/package_manager.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 36bd29f..2483e97 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1171,6 +1171,9 @@ class RpmPM(PackageManager):
                     new_depends[new_depend] = deps[depend]
                 pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ')
         pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
+        if not pkgs:
+            bb.note("There are no packages to install")
+            return
         if not attempt_only:
             bb.note('to be installed: %s' % ' '.join(pkgs))
             cmd = "%s %s install -y %s" % \
-- 
1.9.3



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

* Re: [PATCH 0/3] [jethro/master] Misc fixes
  2015-11-25 20:44 [PATCH 0/3] [jethro/master] Misc fixes Mark Hatle
                   ` (2 preceding siblings ...)
  2015-11-25 20:44 ` [PATCH 3/3] package_manager.py: Avoid installing an empty package list Mark Hatle
@ 2015-11-25 21:26 ` Burton, Ross
  2015-11-25 22:17   ` Mark Hatle
  3 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2015-11-25 21:26 UTC (permalink / raw)
  To: Mark Hatle; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

On 25 November 2015 at 20:44, Mark Hatle <mark.hatle@windriver.com> wrote:

> The following fixes have been tested on Jethro, I believe they are
> also applicable on master.
>

As we generally want to ensure fixes go to master before jethro, can you
rebase these to master (at least 1 and 2 don't apply anymore).

Also is the python2 fix applicable to python3 too?

Ross

[-- Attachment #2: Type: text/html, Size: 861 bytes --]

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

* Re: [PATCH 0/3] [jethro/master] Misc fixes
  2015-11-25 21:26 ` [PATCH 0/3] [jethro/master] Misc fixes Burton, Ross
@ 2015-11-25 22:17   ` Mark Hatle
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2015-11-25 22:17 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 11/25/15 3:26 PM, Burton, Ross wrote:
> 
> On 25 November 2015 at 20:44, Mark Hatle <mark.hatle@windriver.com
> <mailto:mark.hatle@windriver.com>> wrote:
> 
>     The following fixes have been tested on Jethro, I believe they are
>     also applicable on master.
> 
> 
> As we generally want to ensure fixes go to master before jethro, can you rebase
> these to master (at least 1 and 2 don't apply anymore).

Luckily master hasn't deviated much.  But honestly, I don't have time to rebase
right now.  Next week would likely be the earliest.

> Also is the python2 fix applicable to python3 too?

The python2 fix was derived from the fix python3 already had.

HOWEVER, we've found conditions where it breaks python2.  So it should not be
applied.

There is still a host contamination issue that needs to be resolved, but I don't
have any idea of a fix.

> Ross



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

end of thread, other threads:[~2015-11-25 22:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 20:44 [PATCH 0/3] [jethro/master] Misc fixes Mark Hatle
2015-11-25 20:44 ` [PATCH 1/3] allarch.bbclass: allarch packages are having their hashes altered by baselib Mark Hatle
2015-11-25 20:44 ` [PATCH 2/3] python: Fix cross compiling x86->x86 Mark Hatle
2015-11-25 20:44 ` [PATCH 3/3] package_manager.py: Avoid installing an empty package list Mark Hatle
2015-11-25 21:26 ` [PATCH 0/3] [jethro/master] Misc fixes Burton, Ross
2015-11-25 22:17   ` Mark Hatle

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.