Update classextend file to support multiple multilib item
cover Update classextend file to support multiple multilib item
From: Kai Kang <[email protected]>
Add following configure to local.conf, then failure appears.
===============================================
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32 multilib:lib64"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
DEFAULTTUNE_virtclass-multilib-lib64 = "x86-64"
===============================================
Run:
$ bitbake lib64-meta-ide-support [10:38:25]
Loading cache: 100% |#########################################################################| ETA: 00:00:00 Loaded 3126 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/lib32-lib64-libc'. Close matches:
virtual/lib64-libc
virtual/lib32-libc
virtual/lib32-libgl
ERROR: Required build target 'lib64-meta-ide-support' has no buildable providers.
Missing or unbuildable dependency chain was: ['lib64-meta-ide-support', 'virtual/lib32-lib64-libc']
The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1:
build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib kangkai/multilib
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kangkai/multilib
Kai Kang (1):
classextend.py: update filter to support multiple multilib items
meta/lib/oe/classextend.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
Signature · 1 line
2.6.1
PATCH 1/1 classextend.py: update filter to support multiple multilib items
From: Kai Kang <[email protected]>
If it is set with two or more mutliblib items, such as:
MULTILIBS = "multilib:lib32 multilib:lib64"
it expands some virtual providers wrongly:
| ERROR: Nothing PROVIDES 'virtual/lib32-lib64-libc'.
Update the filter that do not extend variables which already have one of mulitlib prefixes.
--- meta/lib/oe/classextend.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
meta/lib/oe/classextend.py +12 -9
@@ -15,10 +15,10 @@ class ClassExtender(object): name = name.replace("-" + self.extname, "") if name.startswith("virtual/"): subs = name.split("/", 1)[1] - if not subs.startswith(self.extname): + if not self.check_prefix(subs): return "virtual/" + self.extname + "-" + subs return name - if not name.startswith(self.extname): + if not self.check_prefix(name): return self.extname + "-" + name return name
@@ -57,13 +57,6 @@ class ClassExtender(object): if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep): return dep else: - # Do not extend for that already have multilib prefix - var = self.d.getVar("MULTILIB_VARIANTS", True) - if var: - var = var.split() - for v in var: - if dep.startswith(v): - return dep return self.extend_name(dep) def map_depends_variable(self, varname, suffix = ""):
@@ -108,6 +101,16 @@ class ClassExtender(object): for subs in variables: self.d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1])) + def check_prefix(self, name): + ml_prefixes = (self.d.getVar("MULTILIB_VARIANTS", True) or "").split() + if self.extname in ml_prefixes: + for var in ml_prefixes: + if name.startswith(var): + return True + return False + else: + return name.startswith(self.extname) + class NativesdkClassExtender(ClassExtender): def map_depends(self, dep): if dep.startswith(self.extname):
Signature · 1 line
2.6.1
Re: [PATCH 1/1] classextend.py: update filter to support multiple multilib items
meta/lib/oe/classextend.py
Quoted 19 lines · On 2015年11月13日 10:32, [email protected] wrote:
From: Kai Kang <[email protected]>
If it is set with two or more mutliblib items, such as:
MULTILIBS = "multilib:lib32 multilib:lib64"
it expands some virtual providers wrongly:
| ERROR: Nothing PROVIDES 'virtual/lib32-lib64-libc'.
Update the filter that do not extend variables which already have one of mulitlib prefixes.
Signed-off-by Kai Kang <[email protected]>--- meta/lib/oe/classextend.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)meta/lib/oe/classextend.py +0
-0
It is better to be fixed in toolchain-scripts.bbclass where call the fucs of class ClassExtender. So ignore this one please. I'll send another patch to fix it.
--Kai
Quoted 47 lines
index 5107ecd..6a6affb 100644
meta/lib/oe/classextend.py +12
-9@@ -15,10 +15,10 @@ class ClassExtender(object): name = name.replace("-" + self.extname, "") if name.startswith("virtual/"): subs = name.split("/", 1)[1] - if not subs.startswith(self.extname): + if not self.check_prefix(subs): return "virtual/" + self.extname + "-" + subs return name - if not name.startswith(self.extname): + if not self.check_prefix(name): return self.extname + "-" + name return name@@ -57,13 +57,6 @@ class ClassExtender(object): if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep): return dep else: - # Do not extend for that already have multilib prefix - var = self.d.getVar("MULTILIB_VARIANTS", True) - if var: - var = var.split() - for v in var: - if dep.startswith(v): - return dep return self.extend_name(dep) def map_depends_variable(self, varname, suffix = ""):@@ -108,6 +101,16 @@ class ClassExtender(object): for subs in variables: self.d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1])) + def check_prefix(self, name): + ml_prefixes = (self.d.getVar("MULTILIB_VARIANTS", True) or "").split() + if self.extname in ml_prefixes: + for var in ml_prefixes: + if name.startswith(var): + return True + return False + else: + return name.startswith(self.extname) + class NativesdkClassExtender(ClassExtender): def map_depends(self, dep): if dep.startswith(self.extname):
Signature · 2 lines
Regards, Neil | Kai Kang