summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-08 22:34:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-09 08:48:04 +0100
commit0a9668e192e04ddccb29d6ba271213c708d01066 (patch)
tree382f8f098b25e4ab65b8f1d79709a1c6acc1ee2b
parent1b27784bf7546c2f81a4c40627e37df04f7fe690 (diff)
downloadpoky-0a9668e192e04ddccb29d6ba271213c708d01066.tar.gz
sanity: Add sanity test for 'bad' gcc installs on ubuntu 24.04
Installing emacs on Ubuntu 24.04 pulls in emacs-gtk which leads to libgcc-14-dev despite gcc being 13. This breaks libcxx-native and compiler-rt-native builds. We've tried various ways of addressing this buit they don't work. Instead, detect this situation and tell the user to either install or remove a package. (From OE-Core rev: 087b2730bb2446ad5ea98c233e349d2787c17ff1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-global/sanity.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
index 1044ed9cc6..d875a022db 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -672,6 +672,8 @@ def check_sanity_sstate_dir_change(sstate_dir, data):
672 return testmsg 672 return testmsg
673 673
674def check_sanity_version_change(status, d): 674def check_sanity_version_change(status, d):
675 import glob
676
675 # Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes 677 # Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes
676 # In other words, these tests run once in a given build directory and then 678 # In other words, these tests run once in a given build directory and then
677 # never again until the sanity version or host distribution id/version changes. 679 # never again until the sanity version or host distribution id/version changes.
@@ -703,6 +705,11 @@ def check_sanity_version_change(status, d):
703 if not check_app_exists('g++', d): 705 if not check_app_exists('g++', d):
704 missing = missing + "C++ Compiler (g++)," 706 missing = missing + "C++ Compiler (g++),"
705 707
708 # installing emacs on Ubuntu 24.04 pulls in emacs-gtk -> libgcc-14-dev despite gcc being 13
709 # this breaks libcxx-native and compiler-rt-native builds so tell the user to fix things
710 if glob.glob("/usr/lib/gcc/*/14/libgcc_s.so") and not glob.glob("/usr/lib/gcc/*/14/libstdc++.so"):
711 status.addresult('libgcc-14-dev is installed and not libstdc++-14-dev which will break clang native compiles. Please remove one or install the other.')
712
706 required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES') 713 required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES')
707 714
708 for util in required_utilities.split(): 715 for util in required_utilities.split():