Closed Bug 1087096 Opened 6 years ago Closed 6 years ago

[Flatfish] Build break by media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1105858

People

(Reporter: dliang, Unassigned)

References

Details

(Whiteboard: [Flatfish][TCP])

Attachments

(3 files)

Attached file build.log
This a build break by media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c

vp8_shortwalsh4x4_neon.o
../../../gecko/media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c: In function 'vp8_short_walsh4x4_neon':
../../../gecko/media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c:118:1: internal compiler error: in trunc_int_for_mode, at explow.c:56
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

In the directory  /home/dannyliang/work/codes/b2g_flatfish_github/objdir-gecko/media/libvpx
The following command failed to execute properly:

...

make[6]: *** [vp8_shortwalsh4x4_neon.o] Error 1
make[5]: *** [media/libvpx/target] Error 2
make[4]: *** [compile] Error 2
make[3]: *** [default] Error 2
make[2]: *** [realbuild] Error 2
make[1]: *** [build] Error 2
make: *** [out/target/product/flatfish/obj/DATA/gecko_intermediates/gecko] Error 2

SW version:
Gecko: 719072f90f5481426bad6b640e3b93b4237843d6
Gaia: 4d7f051cede6544f4c83580253c743c22b0cb279
Component: Gaia::Build → General
Duplicate of this bug: 1087291
Related, certainly. If we can't update the toolchain the patches chris proposed in bug 1085599 may help.
Depends on: 1085599
(In reply to Ralph Giles (:rillian) from comment #3)
> Related, certainly. If we can't update the toolchain the patches chris
> proposed in bug 1085599 may help.

I'd tried to do git checkout to back the commit id to skip the patch in bug 1063356, and it turns out that the build break never happens. Does the suggestion in Comment 3 help to fix the build break issue? Which Comment in bug 1085599 Chris proposed would help?
Flags: needinfo?(giles)
(In reply to Vincent Liu[:vliu] from comment #4)

> Does the
> suggestion in Comment 3 help to fix the build break issue? Which Comment in
> bug 1085599 Chris proposed would help?

Comment 37 from bug 1085599 is the patch, but you need the fix-ups from comment 38 and 43. I haven't tried this myself, but it is worth trying to fix the build problem. Try something like:


diff --git a/media/libvpx/moz.build b/media/libvpx/moz.build
index d278748..794992c 100644
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -53,28 +53,31 @@ if CONFIG['VPX_X86_ASM']:
         CFLAGS += ['-msse4.1']
 
     #postproc is only enabled on x86 with asm
     SOURCES += files['VP8_POSTPROC']
 
 arm_asm_files = []
 if CONFIG['VPX_ARM_ASM']:
     arm_asm_files += files['ARM_ASM']
-    CFLAGS += ['-mfpu=neon']
-
     if CONFIG['VPX_AS_CONVERSION']:
         GENERATED_SOURCES += [ "%s.%s" % (f, CONFIG['VPX_ASM_SUFFIX'])
             for f in sorted(arm_asm_files) if f.endswith('.asm')
         ]
         SOURCES += [
             f for f in sorted(arm_asm_files) if not f.endswith('.asm')
         ]
     else:
         SOURCES += sorted(arm_asm_files)
 
+    # /** */
+    for f in arm_asm_files:
+        if 'neon' in f and f.endswith('.c'):
+            SOURCES[f].flags += ['-march=armv7-a', '-mthumb', '-mfloat-abi=softfp', '-mfpu=neon']
+
 # boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of
 # using RTCD, so we have to make sure we only add one of the two.
 if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files:
     SOURCES += [
         'vp8/encoder/boolhuff.c',
     ]
 
 MSVC_ENABLE_PGO = True
Flags: needinfo?(giles)
Thanks. I will try it.
(In reply to Ralph Giles (:rillian) from comment #5)
> (In reply to Vincent Liu[:vliu] from comment #4)
> 
> > Does the
> > suggestion in Comment 3 help to fix the build break issue? Which Comment in
> > bug 1085599 Chris proposed would help?
> 
> Comment 37 from bug 1085599 is the patch, but you need the fix-ups from
> comment 38 and 43. I haven't tried this myself, but it is worth trying to
> fix the build problem. Try something like:
> 
> 
> diff --git a/media/libvpx/moz.build b/media/libvpx/moz.build
> index d278748..794992c 100644
> --- a/media/libvpx/moz.build
> +++ b/media/libvpx/moz.build
> @@ -53,28 +53,31 @@ if CONFIG['VPX_X86_ASM']:
>          CFLAGS += ['-msse4.1']
>  
>      #postproc is only enabled on x86 with asm
>      SOURCES += files['VP8_POSTPROC']
>  
>  arm_asm_files = []
>  if CONFIG['VPX_ARM_ASM']:
>      arm_asm_files += files['ARM_ASM']
> -    CFLAGS += ['-mfpu=neon']
> -
>      if CONFIG['VPX_AS_CONVERSION']:
>          GENERATED_SOURCES += [ "%s.%s" % (f, CONFIG['VPX_ASM_SUFFIX'])
>              for f in sorted(arm_asm_files) if f.endswith('.asm')
>          ]
>          SOURCES += [
>              f for f in sorted(arm_asm_files) if not f.endswith('.asm')
>          ]
>      else:
>          SOURCES += sorted(arm_asm_files)
>  
> +    # /** */
> +    for f in arm_asm_files:
> +        if 'neon' in f and f.endswith('.c'):
> +            SOURCES[f].flags += ['-march=armv7-a', '-mthumb',
> '-mfloat-abi=softfp', '-mfpu=neon']
> +
>  # boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of
>  # using RTCD, so we have to make sure we only add one of the two.
>  if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files:
>      SOURCES += [
>          'vp8/encoder/boolhuff.c',
>      ]
>  
>  MSVC_ENABLE_PGO = True

This patch can't fix the build break.
Unfortunate. Thank you for trying. Does it work without '-mthumb' ?
Flags: needinfo?(vliu)
(In reply to Ralph Giles (:rillian) from comment #8)
> Unfortunate. Thank you for trying. Does it work without '-mthumb' ?

Still not working.
Flags: needinfo?(vliu)
Here to offer a temporary workaround to anyone who blocks by this build break. Once bug 1085599 is fixed, we don't need this one.

$cd gecko
$git revert 1d50c84dd8fec00f09f6acba1a3ae6bfa6edee4c..a4de3137144f6d53ef451f81201b1c65e140c3d0
$cd ..
$./build.sh
Even if i revert the ranges from comment 10, I still get this bug :/
Hi Mason, do you see any error message by revert command of comment 10?
If I just have a clean gecko, I see no errors and have to revert 3 commits. If I revert the commits from bug 1094058, then do comment 10, I get an error that a cherry pick is already underway.
Hi Mason, please try "git cherry-pick --abort" and then do comment 10, it should work.
With you patch on bug 1094058 and do revert command of comment 10, flatfish can be built successfully.
In case I run the "git revert 1d50c84dd8fec00f09f6acba1a3ae6bfa6edee4c..a4de3137144f6d53ef451f81201b1c65e140c3d0" command, how do I undo it ?
Comment on attachment 8518594 [details] [diff] [review]
libvpx patch for gcc 4.6

Please also include a copy of any changes to libvpx code in a .patch file and add it to the apply list in media/libvpx/update.py so we don't lose the change the next time we pull from upstream.
I can confirm with the above patch flatfish can be built successfully.
Not sure what is faster, C function or non optimized neon version
Blocks: vixen, flatfish
Summary: [Flatfish] Build break by media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c → [Flatfish][Vixen] Build break by media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c
removing [Vixen], as Vixens haven't been full distributed to Mozillians for testing.
Summary: [Flatfish][Vixen] Build break by media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c → [Flatfish] Build break by media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c
Whiteboard: [Flatfish][TCP]
Did somene filled a bug on https://code.google.com/p/android/ with the ICE detected in the toolchain?
If not, I can do it and hope it to be fixed "soon".
Anyway, I was planning to migrate the toolchain to gcc-4.8, so this shouldn't be a problem anymore.

I'll open a bug about it in the coming days.
There is an existing bug filled there : https://code.google.com/p/webm/issues/detail?id=860 and it is patched.
Depends on: 1105858
(In reply to sousmangoosta from comment #23)

> https://code.google.com/p/webm/issues/detail?id=860

Thanks for digging that up. I've filed 1105858 to bump our in-tree version of libvpx to pick up the fix. Then it's just a matter of defining VPX_INCOMPATIBLE_GCC correctly in media/libvpx/moz.build.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1105858
You need to log in before you can comment on or make changes to this bug.