* [PATCH 0/1] fix python md5/sha checksum incorrect on qemu86-64 with corei7-64 as DEFAULTTUNE @ 2015-12-02 5:06 Hongxu Jia 2015-12-02 5:06 ` [PATCH 1/1] python: gcc optimization level 2 Hongxu Jia 0 siblings, 1 reply; 8+ messages in thread From: Hongxu Jia @ 2015-12-02 5:06 UTC (permalink / raw) To: openembedded-core, ross.burton The following changes since commit 698c74c373110ed081a7586e21d4a27b8b44c89b: libsdl: remove redundant configure_tweak patch (2015-12-01 21:32:15 +0000) are available in the git repository at: git://git.pokylinux.org/poky-contrib hongxu/fix-python http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-python Hongxu Jia (1): python: gcc optimization level 2 ...001-configure.ac-gcc-optimization-level-2.patch | 40 ++++++++++++++++++++++ meta/recipes-devtools/python/python_2.7.9.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/python/python/0001-configure.ac-gcc-optimization-level-2.patch -- 1.9.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/1] python: gcc optimization level 2 2015-12-02 5:06 [PATCH 0/1] fix python md5/sha checksum incorrect on qemu86-64 with corei7-64 as DEFAULTTUNE Hongxu Jia @ 2015-12-02 5:06 ` Hongxu Jia 2015-12-02 9:19 ` Burton, Ross 0 siblings, 1 reply; 8+ messages in thread From: Hongxu Jia @ 2015-12-02 5:06 UTC (permalink / raw) To: openembedded-core, ross.burton The qemu didn't support '-march=corei7 -mtune=corei7' and gcc optimization level 3 '-O3' very well, in which the /usr/lib64/python2.7/test/test_md5.py and /usr/lib64/python2.7/test/test_sha.py failed. So we use gcc optimization level 2 to instead. YOCTO [# 8747] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- ...001-configure.ac-gcc-optimization-level-2.patch | 40 ++++++++++++++++++++++ meta/recipes-devtools/python/python_2.7.9.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/python/python/0001-configure.ac-gcc-optimization-level-2.patch diff --git a/meta/recipes-devtools/python/python/0001-configure.ac-gcc-optimization-level-2.patch b/meta/recipes-devtools/python/python/0001-configure.ac-gcc-optimization-level-2.patch new file mode 100644 index 0000000..f760403 --- /dev/null +++ b/meta/recipes-devtools/python/python/0001-configure.ac-gcc-optimization-level-2.patch @@ -0,0 +1,40 @@ +From 55520995fa6c72f6a93a7ccc8503167f359bc63d Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 30 Nov 2015 06:25:08 -0500 +Subject: [PATCH] configure.ac: gcc optimization level 2 + +The qemu didn't support '-march=corei7 -mtune=corei7' and +gcc optimization level 3 '-O3' very well, in which the +/usr/lib64/python2.7/test/test_md5.py and +/usr/lib64/python2.7/test/test_sha.py failed. + +So we use gcc optimization level 2 to instead. + +Upstream-Status: Inappropriate [qemu corei7 specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 87a4f02..d3ad673 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1076,11 +1076,11 @@ then + # debug builds. + OPT="-g -O0 -Wall $STRICT_PROTO" + else +- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" ++ OPT="-g $WRAP -O2 -Wall $STRICT_PROTO" + fi + ;; + *) +- OPT="-O3 -Wall $STRICT_PROTO" ++ OPT="-O2 -Wall $STRICT_PROTO" + ;; + esac + case $ac_sys_system in +-- +1.9.1 + diff --git a/meta/recipes-devtools/python/python_2.7.9.bb b/meta/recipes-devtools/python/python_2.7.9.bb index bc20417..12dd7fa 100644 --- a/meta/recipes-devtools/python/python_2.7.9.bb +++ b/meta/recipes-devtools/python/python_2.7.9.bb @@ -26,6 +26,7 @@ SRC_URI += "\ file://parallel-makeinst-create-bindir.patch \ file://use_sysroot_ncurses_instead_of_host.patch \ file://avoid_parallel_make_races_on_pgen.patch \ + file://0001-configure.ac-gcc-optimization-level-2.patch \ " S = "${WORKDIR}/Python-${PV}" -- 1.9.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] python: gcc optimization level 2 2015-12-02 5:06 ` [PATCH 1/1] python: gcc optimization level 2 Hongxu Jia @ 2015-12-02 9:19 ` Burton, Ross 2015-12-02 9:51 ` Hongxu Jia 0 siblings, 1 reply; 8+ messages in thread From: Burton, Ross @ 2015-12-02 9:19 UTC (permalink / raw) To: Hongxu Jia; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 494 bytes --] On 2 December 2015 at 05:06, Hongxu Jia <hongxu.jia@windriver.com> wrote: > The qemu didn't support '-march=corei7 -mtune=corei7' and > gcc optimization level 3 '-O3' very well, in which the > /usr/lib64/python2.7/test/test_md5.py and > /usr/lib64/python2.7/test/test_sha.py failed. > > So we use gcc optimization level 2 to instead. > > YOCTO [# 8747] > Has anyone decided if this is a bug in the compiler, or the Python code making assumptions that don't hold at -O3? Ross [-- Attachment #2: Type: text/html, Size: 940 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] python: gcc optimization level 2 2015-12-02 9:19 ` Burton, Ross @ 2015-12-02 9:51 ` Hongxu Jia 2015-12-02 9:57 ` Burton, Ross 0 siblings, 1 reply; 8+ messages in thread From: Hongxu Jia @ 2015-12-02 9:51 UTC (permalink / raw) To: Burton, Ross; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 851 bytes --] On 12/02/2015 05:19 PM, Burton, Ross wrote: > > On 2 December 2015 at 05:06, Hongxu Jia <hongxu.jia@windriver.com > <mailto:hongxu.jia@windriver.com>> wrote: > > The qemu didn't support '-march=corei7 -mtune=corei7' and > gcc optimization level 3 '-O3' very well, in which the > /usr/lib64/python2.7/test/test_md5.py and > /usr/lib64/python2.7/test/test_sha.py failed. > > So we use gcc optimization level 2 to instead. > > YOCTO [# 8747] > > > Has anyone decided if this is a bug in the compiler, or the Python > code making assumptions that don't hold at -O3? > The root cause is the qemu didn't support gcc optimization level 3 very well. This fix is a workaround, and I file another defect to trace the root cause. https://bugzilla.yoctoproject.org/show_bug.cgi?id=8748 //Hongxu > Ross [-- Attachment #2: Type: text/html, Size: 2418 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] python: gcc optimization level 2 2015-12-02 9:51 ` Hongxu Jia @ 2015-12-02 9:57 ` Burton, Ross 2015-12-02 10:28 ` Hongxu Jia 0 siblings, 1 reply; 8+ messages in thread From: Burton, Ross @ 2015-12-02 9:57 UTC (permalink / raw) To: Hongxu Jia; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 442 bytes --] On 2 December 2015 at 09:51, Hongxu Jia <hongxu.jia@windriver.com> wrote: > The root cause is the qemu didn't support gcc optimization level 3 very > well. > Oh, so the problem only appears in qemu if you enable tuning that is known to be broken in qemu? I don't think we should apply the Python workaround to oe-core as everyone will suffer for a configuration that is known to be broken (and isn't enabled in oe-core). Ross [-- Attachment #2: Type: text/html, Size: 858 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] python: gcc optimization level 2 2015-12-02 9:57 ` Burton, Ross @ 2015-12-02 10:28 ` Hongxu Jia 2015-12-02 10:33 ` Burton, Ross 2015-12-08 7:12 ` Khem Raj 0 siblings, 2 replies; 8+ messages in thread From: Hongxu Jia @ 2015-12-02 10:28 UTC (permalink / raw) To: Burton, Ross; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 998 bytes --] On 12/02/2015 05:57 PM, Burton, Ross wrote: > > On 2 December 2015 at 09:51, Hongxu Jia <hongxu.jia@windriver.com > <mailto:hongxu.jia@windriver.com>> wrote: > > The root cause is the qemu didn't support gcc optimization level 3 > very well. > > > Oh, so the problem only appears in qemu if you enable tuning that is > known to be broken in qemu? Yes, since I tested qemux86/qemux86-64 with default tune, and everything is ok. > I don't think we should apply the Python workaround to oe-core as > everyone will suffer for a configuration that is known to be broken > (and isn't enabled in oe-core). Trace the issue costs a lot of time, the original failure was invoking 'smart update' in qemu, and found out the python md5/sha checksum output incorrect, and then found out qemu86-64 with corei7-64 did not support gcc optimization level 3 '-O3' very well [YOCTO #8748] BTW, boot the same image with virtualbox, everything is ok //Hongxu > > Ross [-- Attachment #2: Type: text/html, Size: 2658 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] python: gcc optimization level 2 2015-12-02 10:28 ` Hongxu Jia @ 2015-12-02 10:33 ` Burton, Ross 2015-12-08 7:12 ` Khem Raj 1 sibling, 0 replies; 8+ messages in thread From: Burton, Ross @ 2015-12-02 10:33 UTC (permalink / raw) To: Hongxu Jia; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 460 bytes --] On 2 December 2015 at 10:28, Hongxu Jia <hongxu.jia@windriver.com> wrote: > Trace the issue costs a lot of time, the original failure was invoking > 'smart update' in qemu, and found out the python md5/sha checksum > output incorrect, and then found out qemu86-64 with corei7-64 did > not support gcc optimization level 3 '-O3' very well [YOCTO #8748] > Sure. So you've found out that Python is broken, but who knows what else is broken? Ross [-- Attachment #2: Type: text/html, Size: 909 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] python: gcc optimization level 2 2015-12-02 10:28 ` Hongxu Jia 2015-12-02 10:33 ` Burton, Ross @ 2015-12-08 7:12 ` Khem Raj 1 sibling, 0 replies; 8+ messages in thread From: Khem Raj @ 2015-12-08 7:12 UTC (permalink / raw) To: Hongxu Jia; +Cc: OE-core [-- Attachment #1.1: Type: text/plain, Size: 1447 bytes --] > On Dec 2, 2015, at 2:28 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote: > > On 12/02/2015 05:57 PM, Burton, Ross wrote: >> >> On 2 December 2015 at 09:51, Hongxu Jia <hongxu.jia@windriver.com <mailto:hongxu.jia@windriver.com>> wrote: >> The root cause is the qemu didn't support gcc optimization level 3 very well. >> >> Oh, so the problem only appears in qemu if you enable tuning that is known to be broken in qemu? > > Yes, since I tested qemux86/qemux86-64 with default tune, and everything is ok. > >> I don't think we should apply the Python workaround to oe-core as everyone will suffer for a configuration that is known to be broken (and isn't enabled in oe-core). > > Trace the issue costs a lot of time, the original failure was invoking > 'smart update' in qemu, and found out the python md5/sha checksum > output incorrect, and then found out qemu86-64 with corei7-64 did > not support gcc optimization level 3 '-O3' very well [YOCTO #8748] > > BTW, boot the same image with virtualbox, everything is ok > This is a Qemu bug, So it should be persued in that direction. Secondly, this patch should be applied only for emulator BSPs and not across the board > //Hongxu > >> >> Ross > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #1.2: Type: text/html, Size: 4049 bytes --] [-- Attachment #2: Message signed with OpenPGP using GPGMail --] [-- Type: application/pgp-signature, Size: 211 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-08 7:12 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-02 5:06 [PATCH 0/1] fix python md5/sha checksum incorrect on qemu86-64 with corei7-64 as DEFAULTTUNE Hongxu Jia 2015-12-02 5:06 ` [PATCH 1/1] python: gcc optimization level 2 Hongxu Jia 2015-12-02 9:19 ` Burton, Ross 2015-12-02 9:51 ` Hongxu Jia 2015-12-02 9:57 ` Burton, Ross 2015-12-02 10:28 ` Hongxu Jia 2015-12-02 10:33 ` Burton, Ross 2015-12-08 7:12 ` Khem Raj
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox