Skip to contentSkip to conversation

staging/image: Fix multilib recipe sysroot issues

PATCH New Richard Purdie 1 participant 2 messages Jun 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging/image: Fix multilib recipe sysroot issues

Currently if you enable multilib, then build an image, the multilib recipe sysroot is build in the wrong WORKDIR. If you then clean and rebuild the image you see "file exists" errors.

This patch ensures the real WORKDIR is used consistently and then cleans/rebuilds also work correctly.

---
 meta/classes/staging.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta/classes/staging.bbclass +4 -0
index 3fcbc9f15d3..f04c7b637d9 100644
@@ -471,6 +471,10 @@ python extend_recipe_sysroot() {
         os.symlink(c + "." + taskhash, depdir + "/" + c)
 
         manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "populate_sysroot", d, multilibs)
+        if d2 is not d:
+            # If we don't do this, the recipe sysroot will be placed in the wrong WORKDIR for multilibs
+            # We need a consistent WORKDIR for the image
+            d2.setVar("WORKDIR", d.getVar("WORKDIR"))
         destsysroot = d2.getVar("RECIPE_SYSROOT")
 
         native = False
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 xtrans: Fix multilib .pc file conflict

Error: Transaction check error:
file /usr/share/pkgconfig/xtrans.pc from install of lib32-xtrans-dev-1:1.3.5-r0.core2_32 conflicts with file from package xtrans-dev-1:1.3.5-r0.core2_64

---
 .../xorg-lib/xtrans/multilibfix.patch          | 18 ++++++++++++++++++
 meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb |  2 ++
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/xtrans/multilibfix.patch
meta/recipes-graphics/xorg-lib/xtrans/multilibfix.patch new file +18 -0
new file mode 100644
index 00000000000..c513bad20e6
@@ -0,0 +1,18 @@
+The xtrans.pc file is installed into a non-arch directory yet contains libdir
+which can vary depending on which multilib is configured. The .pc file does
+not require libdir so remove this to fix multilib builds.
+
+Signed-off-by: Richard Purdie <[email protected]>
+Upstream-Status: Pending
+
+Index: xtrans-1.3.5/xtrans.pc.in
+===================================================================
+--- xtrans-1.3.5.orig/xtrans.pc.in
++++ xtrans-1.3.5/xtrans.pc.in
+@@ -1,6 +1,5 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
+ includedir=@includedir@
+ 
+ Name: XTrans
meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb +2 -0
index d5b7f1a2c6b..200716fb023 100644
@@ -12,6 +12,8 @@ require xorg-lib-common.inc
 LICENSE = "MIT & MIT-style"
 LIC_FILES_CHKSUM = "file://COPYING;md5=49347921d4d5268021a999f250edc9ca"
 
+SRC_URI += "file://multilibfix.patch"
+
 PE = "1"
 
 RDEPENDS_${PN}-dev = ""
Signature · 1 line
2.17.1