Unable to build Firefox for Android : arm-linux-androideabi/bin/ld: fatal error: libxul.so: mmap: failed to allocate 1047420952 bytes for output file: Cannot allocate memory

RESOLVED DUPLICATE of bug 854535

Status

()

defect
--
critical
RESOLVED DUPLICATE of bug 854535
6 years ago
3 years ago

People

(Reporter: AdrianT, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

6 years ago
Getting the following error when tring to build:
/home/adriantamas/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: fatal error: libxul.so: mmap: failed to allocate 1047420952 bytes for output file: Cannot allocate memory

Using Ubuntu Linux 12.04 LTS x64, ndk r8c and the latest android sdk.
Machine specs: AMD FX(tm)-8320, 8GB Ram, 8GB swap

I have no problem building the sources from mozilla-central from the 18th of March using the same configurations.

Mozconfig file:
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-android
mk_add_options MOZ_MAKE_FLAGS="-s -j8"
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --with-ccache
ac_add_options --disable-crashreporter
# Android SDK/NDK
ac_add_options --with-android-ndk="/home/adriantamas/android-ndk-r8c"
ac_add_options --with-android-sdk="/home/adriantamas/android-sdk-linux/platforms/android-16"
ac_add_options --with-android-version=9
ac_add_options --with-android-tools="/home/adriantamas/android-sdk-linux/tools"
# Android options
## Native UI:
ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --with-endian=little
This reported issue sounds similar, if not the same, to the recently raised B2G bug 854535.
(In reply to Aaron Train [:aaronmt] from comment #1)
> This reported issue sounds similar, if not the same, to the recently raised
> B2G bug 854535.

same root cause, but we might need to build seperate x86_64 sdks for each of b2g and android I'm not sure which version b2g uses at this point...
Reporter

Comment 3

6 years ago
Android NDK r8e has know a x86_64 version. Could that help?
(In reply to Adrian Tamas from comment #3)
> Android NDK r8e has know a x86_64 version. Could that help?

yes, that should fix the issue
Reporter

Comment 5

6 years ago
Build works with NDK r8e x86_64 and the mozconfig:

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-android
mk_add_options MOZ_MAKE_FLAGS="-s -j8"
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --with-ccache
ac_add_options --disable-crashreporter
# Android SDK/NDK
ac_add_options --with-android-ndk="/home/adriantamas/android-ndk-r8e"
ac_add_options --with-android-sdk="/home/adriantamas/android-sdk-linux/platforms/android-16"
ac_add_options --with-android-version=9
ac_add_options --with-android-tools="/home/adriantamas/android-sdk-linux/tools"
ac_add_options --with-android-toolchain="/home/adriantamas/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64"
# Android options
## Native UI:
ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --with-endian=little
Reporter

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → DUPLICATE
Duplicate of bug: 854535
You need to log in before you can comment on or make changes to this bug.