* [PATCH 0/3] ccahe: ccache.bbclass: Use ccache-native and disable ccache for native recipes
@ 2021-01-19 9:23 Robert Yang
2021-01-19 9:23 ` [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution" Robert Yang
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Robert Yang @ 2021-01-19 9:23 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 5f3cace37496fe1dc4fd045f688f7d441505c437:
boost: drop arm-intrinsics.patch (2021-01-17 11:27:59 +0000)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/ccache
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/ccache
Robert Yang (3):
Revert "ccache.bbclass: use ccache from host distribution"
ccache.bbclass: Use ccache-native and disable ccache for native
recipes
apt: Fix do_compile error when enable ccache
meta/classes/ccache.bbclass | 5 ++---
meta/conf/bitbake.conf | 2 +-
meta/lib/oeqa/selftest/cases/buildoptions.py | 19 ++++++++++---------
meta/recipes-devtools/apt/apt_1.8.2.1.bb | 6 +++++-
4 files changed, 18 insertions(+), 14 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution"
2021-01-19 9:23 [PATCH 0/3] ccahe: ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
@ 2021-01-19 9:23 ` Robert Yang
2021-01-19 9:23 ` [PATCH 2/3] ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2021-01-19 9:23 UTC (permalink / raw)
To: openembedded-core
This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8.
Will use ccache-native which is more reliable.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/ccache.bbclass | 3 +--
meta/conf/bitbake.conf | 2 +-
meta/lib/oeqa/selftest/cases/buildoptions.py | 8 ++++----
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index f00fafc292a..fc4745609ce 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -1,7 +1,5 @@
#
# Usage:
-# - Install ccache package on the host distribution and set up a build directory
-#
# - Enable ccache
# Add the following line to a conffile such as conf/local.conf:
# INHERIT += "ccache"
@@ -53,6 +51,7 @@ python() {
# quilt-native doesn't need ccache since no c files
if not (pn in ('ccache-native', 'quilt-native') or
bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
+ d.appendVar('DEPENDS', ' ccache-native')
d.setVar('CCACHE', 'ccache ')
}
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index be94b78eb15..74976ac05c2 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -498,7 +498,7 @@ HOSTTOOLS += " \
HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}"
# Link to these if present
-HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo"
+HOSTTOOLS_NONFATAL += "aws gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo"
# Temporary add few more detected in bitbake world
HOSTTOOLS_NONFATAL += "join nl size yes zcat"
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index d0f64773002..e91f0bd18f6 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -33,10 +33,10 @@ class ImageOptionsTests(OESelftestTestCase):
self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
def test_ccache_tool(self):
- bb_vars = get_bb_vars(['HOSTTOOLS_DIR'], 'm4-native')
- p = bb_vars['HOSTTOOLS_DIR'] + "/" + "ccache"
- if not os.path.isfile(p):
- self.skipTest("No ccache binary found in %s" % bb_vars['HOSTTOOLS_DIR'])
+ bitbake("ccache-native")
+ bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native')
+ p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache"
+ self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p)
self.write_config('INHERIT += "ccache"')
self.add_command_to_tearDown('bitbake -c clean m4-native')
bitbake("m4-native -c clean")
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] ccache.bbclass: Use ccache-native and disable ccache for native recipes
2021-01-19 9:23 [PATCH 0/3] ccahe: ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
2021-01-19 9:23 ` [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution" Robert Yang
@ 2021-01-19 9:23 ` Robert Yang
2021-01-19 9:23 ` [PATCH 3/3] apt: Fix do_compile error when enable ccache Robert Yang
[not found] ` <165B97D5B4F4A03D.23889@lists.openembedded.org>
3 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2021-01-19 9:23 UTC (permalink / raw)
To: openembedded-core
Since host's ccache is not reliable, so disable ccache for native recipes and
use ccache-native for other types of recipes. We need disable ccache for native
recipes is because ccache-native now depends on cmake-native which causes
circular dependencies, and it's not easy to break the circular.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/ccache.bbclass | 2 +-
meta/lib/oeqa/selftest/cases/buildoptions.py | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index fc4745609ce..4532894c574 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -49,7 +49,7 @@ python() {
"""
pn = d.getVar('PN')
# quilt-native doesn't need ccache since no c files
- if not (pn in ('ccache-native', 'quilt-native') or
+ if not (bb.data.inherits_class("native", d) or
bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
d.appendVar('DEPENDS', ' ccache-native')
d.setVar('CCACHE', 'ccache ')
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index e91f0bd18f6..fb0a5ebfed4 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -38,13 +38,14 @@ class ImageOptionsTests(OESelftestTestCase):
p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache"
self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p)
self.write_config('INHERIT += "ccache"')
- self.add_command_to_tearDown('bitbake -c clean m4-native')
- bitbake("m4-native -c clean")
- bitbake("m4-native -f -c compile")
- log_compile = os.path.join(get_bb_var("WORKDIR","m4-native"), "temp/log.do_compile")
+ recipe = "binutils-cross-x86_64"
+ self.add_command_to_tearDown('bitbake -c clean %s' % recipe)
+ bitbake("%s -c clean" % recipe)
+ bitbake("%s -f -c compile" % recipe)
+ log_compile = os.path.join(get_bb_var("WORKDIR", recipe), "temp/log.do_compile")
with open(log_compile, "r") as f:
loglines = "".join(f.readlines())
- self.assertIn("ccache", loglines, msg="No match for ccache in m4-native log.do_compile. For further details: %s" % log_compile)
+ self.assertIn("ccache", loglines, msg="No match for ccache in %s log.do_compile. For further details: %s" % (recipe , log_compile))
def test_read_only_image(self):
distro_features = get_bb_var('DISTRO_FEATURES')
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] apt: Fix do_compile error when enable ccache
2021-01-19 9:23 [PATCH 0/3] ccahe: ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
2021-01-19 9:23 ` [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution" Robert Yang
2021-01-19 9:23 ` [PATCH 2/3] ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
@ 2021-01-19 9:23 ` Robert Yang
[not found] ` <165B97D5B4F4A03D.23889@lists.openembedded.org>
3 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2021-01-19 9:23 UTC (permalink / raw)
To: openembedded-core
Fixed:
apt-pkg/libapt-pkg.so.5.0.2: undefined reference to `ZSTD_endStream'
collect2: error: ld returned 1 exit status
This is because ccache-native depends on zstd-native which makes apt wronly
find it. Disable zstd for apt to fix the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/recipes-devtools/apt/apt_1.8.2.1.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/apt/apt_1.8.2.1.bb b/meta/recipes-devtools/apt/apt_1.8.2.1.bb
index 9fc6e54a292..0e10f9ba1d7 100644
--- a/meta/recipes-devtools/apt/apt_1.8.2.1.bb
+++ b/meta/recipes-devtools/apt/apt_1.8.2.1.bb
@@ -40,7 +40,11 @@ BBCLASSEXTEND = "native nativesdk"
DEPENDS += "virtual/libiconv virtual/libintl db gnutls lz4 zlib bzip2 xz"
-EXTRA_OECMAKE_append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False -DUSE_NLS=False -DDPKG_DATADIR=${datadir}/dpkg -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash"
+EXTRA_OECMAKE_append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \
+ -DUSE_NLS=False -DDPKG_DATADIR=${datadir}/dpkg \
+ -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \
+ -DCMAKE_DISABLE_FIND_PACKAGE_Zstd=True \
+"
do_configure_prepend () {
echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution"
[not found] ` <165B97D5B4F4A03D.23889@lists.openembedded.org>
@ 2021-01-19 10:05 ` Robert Yang
0 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2021-01-19 10:05 UTC (permalink / raw)
To: openembedded-core
On 1/19/21 5:23 PM, Robert Yang wrote:
> This reverts commit f5b29367af4d8e5daea5771264774aa49519f9a8.
>
> Will use ccache-native which is more reliable.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/classes/ccache.bbclass | 3 +--
> meta/conf/bitbake.conf | 2 +-
> meta/lib/oeqa/selftest/cases/buildoptions.py | 8 ++++----
> 3 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
> index f00fafc292a..fc4745609ce 100644
> --- a/meta/classes/ccache.bbclass
> +++ b/meta/classes/ccache.bbclass
> @@ -1,7 +1,5 @@
> #
> # Usage:
> -# - Install ccache package on the host distribution and set up a build directory
> -#
> # - Enable ccache
> # Add the following line to a conffile such as conf/local.conf:
> # INHERIT += "ccache"
> @@ -53,6 +51,7 @@ python() {
> # quilt-native doesn't need ccache since no c files
> if not (pn in ('ccache-native', 'quilt-native') or
> bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
> + d.appendVar('DEPENDS', ' ccache-native')
> d.setVar('CCACHE', 'ccache ')
> }
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index be94b78eb15..74976ac05c2 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -498,7 +498,7 @@ HOSTTOOLS += " \
> HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}"
>
> # Link to these if present
> -HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo"
> +HOSTTOOLS_NONFATAL += "aws gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh sudo"
The original patch has another side effect, once ccache is in hosttools, it
might be used when automatically, no matter set "INHERIT += ccache.bbclass" or
not, and cause build errros such as:
ccache: error: Failed to create temporary file
for~/.ccache/a/9/d6ei86jnu3q6gknptjb97vtr9hc329kR.tmp.kufXFz: Disk quota exceeded
So we can't add ccache to hosttools.
// Robert
>
> # Temporary add few more detected in bitbake world
> HOSTTOOLS_NONFATAL += "join nl size yes zcat"
> diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
> index d0f64773002..e91f0bd18f6 100644
> --- a/meta/lib/oeqa/selftest/cases/buildoptions.py
> +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
> @@ -33,10 +33,10 @@ class ImageOptionsTests(OESelftestTestCase):
> self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
>
> def test_ccache_tool(self):
> - bb_vars = get_bb_vars(['HOSTTOOLS_DIR'], 'm4-native')
> - p = bb_vars['HOSTTOOLS_DIR'] + "/" + "ccache"
> - if not os.path.isfile(p):
> - self.skipTest("No ccache binary found in %s" % bb_vars['HOSTTOOLS_DIR'])
> + bitbake("ccache-native")
> + bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native')
> + p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache"
> + self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p)
> self.write_config('INHERIT += "ccache"')
> self.add_command_to_tearDown('bitbake -c clean m4-native')
> bitbake("m4-native -c clean")
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-19 10:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-19 9:23 [PATCH 0/3] ccahe: ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
2021-01-19 9:23 ` [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution" Robert Yang
2021-01-19 9:23 ` [PATCH 2/3] ccache.bbclass: Use ccache-native and disable ccache for native recipes Robert Yang
2021-01-19 9:23 ` [PATCH 3/3] apt: Fix do_compile error when enable ccache Robert Yang
[not found] ` <165B97D5B4F4A03D.23889@lists.openembedded.org>
2021-01-19 10:05 ` [OE-core] [PATCH 1/3] Revert "ccache.bbclass: use ccache from host distribution" Robert Yang
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.