Bug 7717

Summary: build issues with Thumb-1, when building for qemuarm (armv5te)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Martin Jansa <Martin.Jansa>
Component: coreAssignee: Alexander Kanavin <alex.kanavin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dbaryshkov, meta.mr.watcher, meta.watcher, raj.khem, richard.purdie, ross.burton, sgw
Version: unspecified   
Target Milestone: 2.1   
Hardware: x86   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9213
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Martin Jansa 2015-05-05 11:59:14 UTC
Like in [YOCTO #1709], there are new issues when building for Thumb-1 MACHINE.

e.g.
meta/recipes-devtools/guile/guile_2.0.11.bb
meta/recipes-devtools/gdb/gdb_7.9.b
meta/recipes-support/icu/icu_55.1.bb

and more (will be included in next world build report)

Some changes were sent, but never merged:
http://patchwork.openembedded.org/patch/75817/
http://patchwork.openembedded.org/patch/75703/

This is still broken in oe-core, would it make sense to enable thumb on
one of autobuilder jobs (for qemuarm)?
Comment 1 Martin Jansa 2015-05-05 13:48:54 UTC
Number of failing recipes (some failing with ICE or getting stuck until OOM killer kills them) suggest that current gcc-cross is a bit broken in oe-core

openembedded-core/meta/recipes-devtools/gcc/gcc_4.9.bb, do_compile
openembedded-core/meta/recipes-support/libunwind/libunwind_1.1.bb, do_compile
openembedded-core/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb, do_compile
openembedded-core/meta/recipes-devtools/opensp/opensp_1.5.2.bb, do_compile
meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb, do_compile
meta-openembedded/meta-oe/recipes-multimedia/libopus/libopus_1.1.bb, do_compile
meta-openembedded/meta-multimedia/recipes-multimedia/mpg123/mpg123_1.21.0.bb, do_compile
meta-openembedded/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb, do_compile
meta-openembedded/meta-oe/recipes-devtools/php/php_5.5.24.bb, do_compile
meta-openembedded/meta-gnome/recipes-gnome/libsecret/libsecret_0.18.bb, do_compile
meta-openembedded/meta-oe/recipes-connectivity/gammu/gammu_1.32.0.bb, do_compile
meta-openembedded/meta-oe/recipes-devtools/breakpad/breakpad_svn.bb, do_compile
meta-openembedded/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb, do_compile
meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb, do_compile

It's possible that there is even more issues (some hidden by dependencies failing already).
Comment 2 Khem Raj 2015-05-07 06:53:31 UTC
(In reply to comment #0)
> Like in [YOCTO #1709], there are new issues when building for Thumb-1
> MACHINE.
> 
> e.g.
> meta/recipes-devtools/guile/guile_2.0.11.bb
> meta/recipes-devtools/gdb/gdb_7.9.b
> meta/recipes-support/icu/icu_55.1.bb
> 
> and more (will be included in next world build report)
> 
> Some changes were sent, but never merged:
> http://patchwork.openembedded.org/patch/75817/
> http://patchwork.openembedded.org/patch/75703/
> 

the patches in essence are fine but please make them thumb1 specific
it should not disable thumb2

> This is still broken in oe-core, would it make sense to enable thumb on
> one of autobuilder jobs (for qemuarm)?

probably, although, practically there are less and less usecases of thumb1
and thumb2 probably would cover a wider set.
Comment 3 Martin Jansa 2015-05-13 12:50:34 UTC
Patches disabling thumb in other recipes sent to MLs:

guile, mailx, gcc, opensp, gstreamer1.0-libav,	libunwind:
http://lists.openembedded.org/pipermail/openembedded-core/2015-May/104856.html

gegl, crash, libsecret, mpg123, tinymembench,	gammu, mosh, llvm3.3, breakpad, php, mozjs,	libopus:
http://lists.openembedded.org/pipermail/openembedded-devel/2015-May/101502.html
Comment 4 Richard Purdie 2015-05-14 07:05:41 UTC
I think that rather than filling recipes with large compile failure logs, it may make more sense to put these into an include file like we do with security flags?
Comment 5 Dmitry Baryshkov 2015-05-15 07:20:45 UTC
This looks like a compiler regression. Does thumb1 work with gcc 4.8 compiler?
Dropping thumb1 will look like a problem to a hobbyist part of myself.
Comment 6 Martin Jansa 2015-05-15 07:41:12 UTC
(In reply to comment #4)
> I think that rather than filling recipes with large compile failure logs, it
> may make more sense to put these into an include file like we do with
> security flags?

Is it OK, to put overrides for recipes in other layers to .inc file in
oe-core? If yes then I agree and will convert this into .inc file in
conf/machine/include/ (included by default for thumb1 machine tunes)

> This looks like a compiler regression. Does thumb1 work with gcc 4.8 compiler?

I agree, sane compiler shouldn't be failing with ICE (for whatever combination of tune parameters).
Comment 7 Dmitry Baryshkov 2015-05-15 12:14:40 UTC
I have checked GCC 4.8. At least ICU and gdb got built w/o any errors. Mosh OTOH fails due to upstream error. It looks (on the first glance) like the rest of 'assembler' errors are upstream bugs -- somebody assuming that assembler instructions are available on all ARM versions.
Comment 8 Dmitry Baryshkov 2015-05-15 12:56:11 UTC
5.1 is also buggy wrt ICU compilation
Comment 9 Martin Jansa 2015-10-09 15:14:01 UTC
There are few more failures with gcc-5.2

I haven't seen any answer about other layers in .inc files, so I've just sent
http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111424.html
Comment 10 Dmitry Baryshkov 2015-10-13 13:32:45 UTC
Filed the upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67954

Bisection points to pretty strange commit: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=210824
Comment 11 Martin Jansa 2015-10-14 11:33:28 UTC
Ross asked me to replace the actual error logs with links to errors.yp, I've sent updated patches:

http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111538.html
http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111539.html

gdb 7.9.1 doesn't need this anymore like 7.9 did
Comment 12 Martin Jansa 2016-02-24 02:05:45 UTC
Another case in oe-core is now ffmpeg when libav was replaced with it and ARM_INSTRUCTION_SET was removed in:

http://git.openembedded.org/openembedded-core/commit/?id=77dbf07293df15cd5473422abd678930d6277bb0
Comment 13 Dmitry Baryshkov 2016-02-24 02:07:58 UTC
Martin,

could you please check if the bug persists with the patches from the upstream bug? Also where can I find the ffmpeg build failure log?
Comment 15 Alexander Kanavin 2016-03-03 17:18:06 UTC
Fixed in 8c2e420398c38794db7ef1922000820bd897f5a7
Comment 16 Martin Jansa 2016-03-03 18:04:51 UTC
Please keep it open until one qemuarm build on autobuilder is configured to enable thumb so that we can prevent such issues in future.
Comment 17 Alexander Kanavin 2016-03-04 11:10:26 UTC
Uhm, no. This bug is about fixing build issues in recipes. If you want changes in autobuilder, please open a different bug.
Comment 18 Martin Jansa 2016-03-04 11:39:25 UTC
#9213