Closed Bug 1525999 Opened 4 years ago Closed 3 years ago

./mach bootstrap for android suggests not specifying target, which triggers compilation failure

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: bholley, Assigned: glandium)

References

Details

Attachments

(1 file)

./mach bootstrap suggests [1] for a .mozconfig, which includes the following language:

For regular phones, no --target is needed

On my machine, this triggers the following error during the configure phase of compilation:

0:01.77 ERROR: Android system directory not found in [u'/Users/bholley/.mozbuild/android-ndk-r17b/platforms/android-16/arch-arm/usr/include', u'/Users/bholley/.mozbuild/android-ndk-r17b/sysroot/usr/include/armv7a-linux-androideabi'].

Since ndk/sysroot/usr/include/armv-linux-androideabi is a directory, but sysroot/usr/include/armv7a-linux-androideabi is not. This path is computed at [2] based on the target.

Setting:

ac_add_options --target=arm-linux-androideabi

as is done in [3], fixes the issue.

[1] https://searchfox.org/mozilla-central/rev/490ab7f9b84570573a49d7fa018673ce0d5ddf22/python/mozboot/mozboot/android.py#54
[2] https://searchfox.org/mozilla-central/rev/490ab7f9b84570573a49d7fa018673ce0d5ddf22/build/moz.configure/android-ndk.configure#185
[3] https://github.com/bdekoz/mozilla-configuration/blob/master/mozconfig.android.arm

I've had this problem yesterday and was about to file a bug for it too. Essentially any valid arm-android target that is not arm-linux-androideabi fails.

Assignee: nobody → mh+mozilla
Blocks: 1523341

Making this work generically with --target=armv7a is kind of entangled with bug 1524429, so I'll just go with the easy fix for now.

That makes target.toolchain match what the NDK provides.

Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51697f8232c5
Default to arm instead of armv7a for android builds. r=nalexander
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/6914810e2aa0
Default to arm instead of armv7a for android builds. r=nalexander
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Clearing NI: Mike relanded this.

Flags: needinfo?(nalexander)
You need to log in before you can comment on or make changes to this bug.