-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm-project-source breaks archiver.bbclass #885
Comments
archiver functionality is implemented in a class and classes can not be extended via bbappends etc. so it has to be implemented in original archiver.bbclass in core layer. |
i understand that this would need to go upstream. it seems to me that the archiver class is not very extensible in this special case of dealing with work-shared recipes - is this something that should be fixed more generally, or keep on special casing it? tentatively here is my fix, but i am not sure if this is correct. diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 4a5865d7b5..30aedd14d0 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -102,7 +102,7 @@ python () {
return
# TARGET_SYS in ARCHIVER_ARCH will break the stamp for gcc-source in multiconfig
- if pn.startswith('gcc-source'):
+ if pn.startswith('gcc-source') or pn.startswith('llvm-project-source'):
d.setVar('ARCHIVER_ARCH', "allarch")
def hasTask(task):
@@ -278,7 +278,7 @@ python do_ar_configured() {
pn = d.getVar('PN')
# "gcc-source-${PV}" recipes don't have "do_configure"
# task, so we need to run "do_preconfigure" instead
- if pn.startswith("gcc-source-"):
+ if pn.startswith("gcc-source-") or pn.startswith('llvm-project-source'):
d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR'))
bb.build.exec_func('do_preconfigure', d)
@@ -460,6 +460,7 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
def is_work_shared(d):
pn = d.getVar('PN')
return pn.startswith('gcc-source') or \
+ (d.expand("${TMPDIR}/work-shared") in d.getVar('S')) or \
bb.data.inherits_class('kernel', d) or \
(bb.data.inherits_class('kernelsrc', d) and d.expand("${TMPDIR}/work-shared") in d.getVar('S'))
|
Your patch looks good imo, I would only change the last line: @@ -460,6 +460,7 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
def is_work_shared(d):
pn = d.getVar('PN')
- return pn.startswith('gcc-source') \
+ return pn.startswith('gcc-source') or pn.startswith('llvm-project-source') \
bb.data.inherits_class('kernel', d) or \
(bb.data.inherits_class('kernelsrc', d) and d.expand("${TMPDIR}/work-shared") in d.getVar('S')) please sent it to oe-core mailing list so you can get more help on review |
Some tasks may reference ${B} for llvm-source which in general would not exist. It has dependencies on HOST_SYS and TARGET_SYS which are not appropriate for a shared recipe like llvm-source. This causes problems for the archiver and multiconfigs in particlar. Set B to something else to avoid these task hash issues. Fixes issues kraj#885 Signed-off-by: Khem Raj <[email protected]>
Some tasks may reference ${B} for llvm-source which in general would not exist. It has dependencies on HOST_SYS and TARGET_SYS which are not appropriate for a shared recipe like llvm-source. This causes problems for the archiver and multiconfigs in particlar. Set B to something else to avoid these task hash issues. Fixes issues kraj#885 Signed-off-by: Khem Raj <[email protected]>
Some tasks may reference ${B} for llvm-source which in general would not exist. It has dependencies on HOST_SYS and TARGET_SYS which are not appropriate for a shared recipe like llvm-source. This causes problems for the archiver and multiconfigs in particlar. Set B to something else to avoid these task hash issues. Fixes issues #885 Signed-off-by: Khem Raj <[email protected]>
Describe the bug
we use poky's archiver.bbclass to assist with open source copyright and license compliance. we do not redistribute parts of clang or llvm, but the archiver tasks still run when we otherwise want to use clang at build time.
the archiver tries to use a separate workdir for unpacking and patching, but this does not seem to work for
work-shared
cases likellvm-project-source
and needs to be special cased.do_unpack_and_patch
should be using the archiver's special workdir, but tries to apply patches to the non-archiver workdir in work-shared.there's also a race here when trying to build clang native itself - something about the archiver is deleting or moving the llvm source tree.
To Reproduce
Steps to reproduce the behavior:
to build/conf/local.conf
Expected behavior
archiver class should work with meta-clang / clang-native / llvm-project-source.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: