mozjs-78: fix do_configure failure
PATCH 1/2 mozjs-78: fix do_configure failure
From: Changqing Li <[email protected]>
do_configure fails occasionally with following error:
| File "/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler | os.remove(path) | FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp'
change the temp file's prefix to avoid it is deleted by others
Signed-off-by Changqing Li <[email protected]>
--- ...ix-one-occasionally-reproduced-confi.patch | 50 +++++++++++++++++++ .../mozjs/mozjs-78_78.15.0.bb | 1 + 2 files changed, 51 insertions(+) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78/0001-util.configure-fix-one-occasionally-reproduced-confi.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 430fd956b91c6208f166753578234c2f5db6352f Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 11 Nov 2021 21:17:38 +0800 +Subject: [PATCH] util.configure: fix one occasionally reproduced configure + failure + +error: +| checking whether the C++ compiler supports -Wno-range-loop-analysis... +| DEBUG: Creating /tmp/conftest.jr1qrcw3.cpp with content: +| DEBUG: | int +| DEBUG: | main(void) +| DEBUG: | { +| DEBUG: | +| DEBUG: | ; +| DEBUG: | return 0; +| DEBUG: | } +| DEBUG: Executing: aarch64-wrs-linux-g++ -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mozjs/91.1.0-r0/recipe-sysroot /tmp/conftest.jr1qrcw3.cpp -Werror -Wrange-loop-analysis -c +| DEBUG: The command returned non-zero exit status 1. +| DEBUG: Its error output was: +... +| File "/mozjs/91.1.0-r0/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler +| os.remove(path) +| FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp' + +It should be another process that deleted this file by using +"rm -rf conftest*" inappropriately + +Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1740667] + +Signed-off-by: Changqing Li <[email protected]> +--- + build/moz.configure/util.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure +index 7ee1a498ad..511e257ad9 100644 +--- a/build/moz.configure/util.configure ++++ b/build/moz.configure/util.configure +@@ -217,7 +217,7 @@ def try_invoke_compiler(compiler, language, source, flags=None, onerror=None): + 'C++': '.cpp', + }[language] + +- fd, path = mkstemp(prefix='conftest.', suffix=suffix, text=True) ++ fd, path = mkstemp(prefix='try_invoke_compiler_conftest.', suffix=suffix, text=True) + try: + source = source.encode('ascii', 'replace') + +-- +2.17.1 +
meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = " \ file://0010-riscv-Set-march-correctly.patch \ file://0011-replace-include-by-code-to-fix-arm-build.patch \ file://0012-Add-SharedArrayRawBufferRefs-to-public-API.patch \ + file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ " SRC_URI[sha256sum] = "a4438d84d95171a6d4fea9c9f02c2edbf0475a9c614d968ebe2eedc25a672151"
Signature · 1 line
2.17.1
PATCH 2/2 mozjs-91: fix do_configure failure
From: Changqing Li <[email protected]>
do_configure fails occasionally with following error:
| File "/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler | os.remove(path) | FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp'
change the temp file's prefix to avoid it is deleted by others
Signed-off-by Changqing Li <[email protected]>
--- ...ix-one-occasionally-reproduced-confi.patch | 50 +++++++++++++++++++ .../recipes-extended/mozjs/mozjs-91_91.2.0.bb | 1 + 2 files changed, 51 insertions(+) create mode 100644 meta-oe/recipes-extended/mozjs/mozjs-91/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
meta-oe/recipes-extended/mozjs/mozjs-91/0001-util.configure-fix-one-occasionally-reproduced-confi.patch new file +50 -0
@@ -0,0 +1,50 @@ +From b13cad4abc53f816f64c8b0af70cb46820746c72 Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 11 Nov 2021 16:05:54 +0800 +Subject: [PATCH] util.configure: fix one occasionally reproduced configure + failure + +error: +| checking whether the C++ compiler supports -Wno-range-loop-analysis... +| DEBUG: Creating /tmp/conftest.jr1qrcw3.cpp with content: +| DEBUG: | int +| DEBUG: | main(void) +| DEBUG: | { +| DEBUG: | +| DEBUG: | ; +| DEBUG: | return 0; +| DEBUG: | } +| DEBUG: Executing: aarch64-wrs-linux-g++ -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mozjs/91.1.0-r0/recipe-sysroot /tmp/conftest.jr1qrcw3.cpp -Werror -Wrange-loop-analysis -c +| DEBUG: The command returned non-zero exit status 1. +| DEBUG: Its error output was: +... +| File "/mozjs/91.1.0-r0/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler +| os.remove(path) +| FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp' + +It should be another process that deleted this file by using +"rm -rf conftest*" inappropriately + +Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1740667] + +Signed-off-by: Changqing Li <[email protected]> +--- + build/moz.configure/util.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure +index 8f35e89c73..84e256647d 100644 +--- a/build/moz.configure/util.configure ++++ b/build/moz.configure/util.configure +@@ -222,7 +222,7 @@ def try_invoke_compiler(compiler, language, source, flags=None, onerror=None): + "C++": ".cpp", + }[language] + +- fd, path = mkstemp(prefix="conftest.", suffix=suffix, text=True) ++ fd, path = mkstemp(prefix="try_invoke_compiler_conftest.", suffix=suffix, text=True) + try: + source = source.encode("ascii", "replace") + +-- +2.17.1 +
meta-oe/recipes-extended/mozjs/mozjs-91_91.2.0.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire file://riscv32.patch \ file://0005-nojit-32bit-arch-fix.patch \ file://0006-Fix-build-on-powerpc.patch \ + file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \ " SRC_URI[sha256sum] = "3ef3cfd321d0c2c80ee1b41b8baf7a1ea4daf93c29e1377274933440ff5e42c3"
Signature · 1 line
2.17.1