Closed Bug 1344889 Opened 3 years ago Closed 3 years ago

Error building Fennec with NDK r11b: can't open vpx_dsp/arm/idct_neon.asm.S for reading: No such file or directory

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

defect
Not set

Tracking

(firefox53 wontfix, firefox54 fixed, firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox53 --- wontfix
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: nalexander, Assigned: glandium)

References

Details

Attachments

(2 files)

I have a contributor reporting errors building Fennec with NDK r11b.  Build log attached.  Seems to be something to do with compiling Neon code:

87:44.85 idct16x16_add_neon.asm.o
87:44.85 /tmp/ccDt5F2g.s: Assembler messages:
87:44.86 /tmp/ccDt5F2g.s:21: Error: can't open vpx_dsp/arm/idct_neon.asm.S for reading: No such file or directory
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:20: Error: non-constant expression in ".if" statement
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:274: Error: non-constant expression in ".if" statement
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:799: Error: non-constant expression in ".if" statement
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:844: Error: bad instruction `load_tran_low_to_s16x2 d16,d17,d18,d19,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:845: Error: bad instruction `load_tran_low_to_s16x2 d18,d19,d20,d21,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:846: Error: bad instruction `load_tran_low_to_s16x2 d20,d21,d22,d23,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:847: Error: bad instruction `load_tran_low_to_s16x2 d22,d23,d24,d25,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:848: Error: bad instruction `load_tran_low_to_s16x2 d24,d25,d26,d27,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:849: Error: bad instruction `load_tran_low_to_s16x2 d26,d27,d28,d29,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:850: Error: bad instruction `load_tran_low_to_s16x2 d28,d29,d30,d31,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:851: Error: bad instruction `load_tran_low_to_s16x2 d2,d3,d4,d5,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:952: Error: bad instruction `load_tran_low_to_s16x2 d16,d17,d18,d19,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:953: Error: bad instruction `load_tran_low_to_s16x2 d18,d19,d20,d21,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:954: Error: bad instruction `load_tran_low_to_s16x2 d20,d21,d22,d23,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:955: Error: bad instruction `load_tran_low_to_s16x2 d22,d23,d24,d25,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:956: Error: bad instruction `load_tran_low_to_s16x2 d24,d25,d26,d27,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:957: Error: bad instruction `load_tran_low_to_s16x2 d26,d27,d28,d29,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:958: Error: bad instruction `load_tran_low_to_s16x2 d28,d29,d30,d31,r0'
87:44.86 libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S:959: Error: bad instruction `load_tran_low_to_s16x2 d0,d1,d2,d3,r0'
87:44.86 /home/suman/src/mozilla-central/config/rules.mk:995: recipe for target 'idct16x16_add_neon.asm.o' failed
87:44.86 make[5]: *** [idct16x16_add_neon.asm.o] Error 1
snorp: froydnj: are you aware of issues building with NDK r11b?  Maybe the version in https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build#Required_Android_SDK_and_NDK_versions (and the bootstrapper) is now stale?
Flags: needinfo?(snorp)
Flags: needinfo?(nfroyd)
I think we use r12, which should also be what 'mach bootstrap' installs.
Flags: needinfo?(snorp)
Related: bug 1337250. But that was for non-Android ARM.

A `mach build -v` output would be useful.
mach build -v is not working either
sorry for the previous comment.
This is the output for mach build -v: http://dpaste.com/3RRJ1X4
(In reply to Mike Hommey [:glandium] from comment #4)
> Related: bug 1337250. But that was for non-Android ARM.
> 
> A `mach build -v` output would be useful.

I think the command glandium is interested in is:

 0:09.91 /home/suman/.mozbuild/android-ndk-r11b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -std=gnu99 -o idct16x16_add_neon.asm.o -DNDEBUG=1 -DTRIMMED=1 -DHAVE_CONFIG_H=vpx_config.h -D__linux__ -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -idirafter /home/suman/.mozbuild/android-ndk-r11b/platforms/android-9/arch-arm/usr/include -DANDROID  -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=softfp -mno-unaligned-access -fPIC -Wa,--noexecstack -include /home/suman/src/mozilla-central/objdir-droid/mozilla-config.h -DMOZILLA_CLIENT  -g -I/home/suman/src/mozilla-central/media/libvpx/config/linux/arm/ -I/home/suman/src/mozilla-central/objdir-droid/media/libvpx/libvpx -march=armv7-a -mfpu=neon -I. -I/home/suman/src/mozilla-central/media/libvpx/libvpx -D__ANDROID__  -I/home/suman/.mozbuild/android-ndk-r11b/sources/android/cpufeatures -c libvpx/vpx_dsp/arm/idct16x16_add_neon.asm.S

glandium, does that mean anything to you?
Flags: needinfo?(mh+mozilla)
It means the include directories are properly there, but the files that are expected to be there aren't. Looking further, it just seems that it only ever worked by chance, because nothing actually ensures these generated assembly files are generated in the right order.

Specifically, nothing is saying that vpx_dsp/arm/idct_neon.asm.S needs to be generated before idct16x16_add_neon.o, idct4x4_add_neon.o and idct8x8_add_neon.o.
Flags: needinfo?(mh+mozilla)
An easy way to reproduce reliably (with an android mozconfig):

$ ./mach configure
$ ./mach build -v media/libvpx/idct4x4_add_neon.asm.o


... which reveals another problem:
 0:00.18 /usr/bin/perl /home/glandium/gecko-push/media/libvpx/libvpx/build/make/ads2gas.pl < /home/glandium/gecko-push/media/libvpx/libvpx/vpx_dsp/arm/idct4x4_add_neon.asm > libvpx/vpx_dsp/arm/idct4x4_add_neon.asm.S
 0:00.18 /bin/sh: 1: cannot create libvpx/vpx_dsp/arm/idct4x4_add_neon.asm.S: Directory nonexistent
Flags: needinfo?(nfroyd)
Assignee: nobody → mh+mozilla
(In reply to Mike Hommey [:glandium] from comment #9)
> An easy way to reproduce reliably (with an android mozconfig):
> 
> $ ./mach configure

needs an additional step here:
$ ./mach build mozilla-config.h

> $ ./mach build -v media/libvpx/idct4x4_add_neon.asm.o
Comment on attachment 8845200 [details]
Bug 1344889 - Add necessary dependendencies for generated libvpx assembly.

https://reviewboard.mozilla.org/r/118394/#review121056
Attachment #8845200 - Flags: review?(mshal) → review+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/3fe0bc866f14
Add necessary dependendencies for generated libvpx assembly. r=mshal
https://hg.mozilla.org/mozilla-central/rev/3fe0bc866f14
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Mike, is this worth uplifting to beta54?
Flags: needinfo?(mh+mozilla)
Comment on attachment 8845200 [details]
Bug 1344889 - Add necessary dependendencies for generated libvpx assembly.

Approval Request Comment
[Feature/Bug causing the regression]: Some update of libvpx a long time ago
[User impact if declined]: Intermittent failure to build, although it mostly depends on how many parallel processes are used to build, and probably doesn't happen much on automation.
[Is this code covered by automated tests?]: If it builds, it's fine.
[Has the fix been verified in Nightly?]: Yes.
[Needs manual test from QE? If yes, steps to reproduce]: N/A
[List of other uplifts needed for the feature/fix]: N/A
[Is the change risky?]: No
[Why is the change risky/not risky?]: It only adds manual dependencies to a Makefile
[String changes made/needed]: N/A
Flags: needinfo?(mh+mozilla)
Attachment #8845200 - Flags: approval-mozilla-beta?
Comment on attachment 8845200 [details]
Bug 1344889 - Add necessary dependendencies for generated libvpx assembly.

Fix a build issue. Beta54+. Should be in 54 beta 1.
Attachment #8845200 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 55 → mozilla55
You need to log in before you can comment on or make changes to this bug.