Compiling with --with-version-android=21 does not work

NEW
Unassigned

Status

()

Firefox for Android
Build Config & IDE Support
3 years ago
2 years ago

People

(Reporter: dragana, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Android version 21 has changed some dns functions and if 

ac_add_options --with-android-version=21

is set in .mozconfig it will not compile.

..../mozilla-central/other-licenses/android/res_state.c:63:36: fatal error: sys/_system_properties.h: No such file or directory
 0:07.13  #include <sys/_system_properties.h>

Updated

3 years ago
Component: General → Build Config & IDE Support
OS: Linux → Android
Hardware: x86_64 → ARM
Hmm, I'm not sure we really support this option.  glandium or snorp might know more about the history of the flag and whether we've ever moved from minimum version 9.
Flags: needinfo?(snorp)
Flags: needinfo?(mh+mozilla)
(Reporter)

Comment 2

3 years ago
I came across this bug, because i did not know what is the max android version that we support.

I was doing testing for bug 1108957 which adds possibility to do dns queries per network interface. This function is present in android version >= 19. 
For now we do not make use of it in firefox for android, only in b2g. I do not know if we are going to use it any time soon. If we decide to use it we will need to make this work (not the oprtion with-android-version, but to be able to compile it for android version >= 19)
(In reply to Dragana Damjanovic [:dragana] from comment #2)
> I came across this bug, because i did not know what is the max android
> version that we support.
> 
> I was doing testing for bug 1108957 which adds possibility to do dns queries
> per network interface. This function is present in android version >= 19. 
> For now we do not make use of it in firefox for android, only in b2g. I do
> not know if we are going to use it any time soon. If we decide to use it we
> will need to make this work (not the oprtion with-android-version, but to be
> able to compile it for android version >= 19)

I see.  The flag you're talking about is only used for compiling NDK code.  mobile/android (Fennec) uses very little android-version-specific NDK code, AFAIK; in general we expose android-version-specific features using Java, which is more flexible.  Again, snorp or glandium can correct me.
We do not support this right now. There have been a ton of changes between 9 (what we use now) and 21. We will probably need to support this at some point, though, in order to do aarch64 builds.
Flags: needinfo?(snorp)
There are open bugs for individual issues:
- bug 1091975
- bug 1091987
- bug 1091991
- bug 1092003
- bug 1092004
- bug 1092023
- bug 1092026
Flags: needinfo?(mh+mozilla)
It builds here with some hacks:

* Patch in bug 1091975 for ELFSIZE. 

* Hack getdtablesize() to 65535 in security/nss/lib/freebl/unix_rand.c

* Bug 1103816: Add -DANDROID_VERSION=21 to DEFAULT_GMAKE_FLAGS in config/external/nss/Makefile.in

It might have also been necessary to copy an include file, or a definition, from an older NDK!

mozconfig includes:
ac_add_options --with-android-ndk="/.../android-ndk-r10d/"
ac_add_options --with-android-sdk="/.../android-sdk-linux/platforms/android-21"
ac_add_options --with-android-gnu-compiler-version=4.9
ac_add_options --with-android-version=21

Have also had success building --with-android-version=19 for ARMv6 using the above.
You need to log in before you can comment on or make changes to this bug.