All users were logged out of Bugzilla on October 13th, 2018

nss fails to build with recent android NDK



5 years ago
4 years ago


(Reporter: jack, Unassigned)


Mac OS X

Firefox Tracking Flags

(Not tracked)



(1 attachment)



5 years ago
Created attachment 797908 [details] [diff] [review]
nss-ndk-and-darwin.patch explicitly uses a toolchains path pointing directly to the gcc 4.4.3 toolchain, but this toolchain has been deprecated and removed in the most recent NDK.

I think a better solution is add an NDK_TOOLCHAIN which points to a toolchain directory set up via (a helper script bundled with the NDK). Then the specific toolchain won't be hardcoded.

Another issue is that it assumes ar and ranlib are compatible with the system ar and ranlib instead of using the toolchain provided ones. This causes the build to fail on Mac OS X.

Finally, STANDARDS_CFLAGS sets up defines that on Darwin result in not having access to readlink and some functions. Adding -D_POSIX_C_SOURCE=200112 is needed to get these, but this causes Sqlite3 to fail to build as it thinks posix_fallocate is available. Adding -DHAVE_POSIX_FALLOCATE=0 fixes that issue.

Patch attached; we're using this config for now in Servo, but I'd like to get the necessary changes upstream. I'm sure this isn't appropriate as is, but I'll need some guidance on how to get this patch into shape for upstream.


5 years ago
Attachment #797908 - Flags: review?(brian)
Comment on attachment 797908 [details] [diff] [review]

Sorry for the delay here. I am not a good reviewer for this code, especially because i don't use Mac OS X. I suggest asking :cviecco and/or :keeler for feedback on the patch after making sure it builds, and then ask for a review from or
Attachment #797908 - Flags: review?(brian)
You need to log in before you can comment on or make changes to this bug.