Closed Bug 820172 Opened 12 years ago Closed 12 years ago

Android build broken on NDK r8 due to missing std::nullptr_t in STLPort

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 20

People

(Reporter: jchen, Assigned: kats)

References

Details

Attachments

(2 files)

Bug 818941 fixed a typo in an ifdef check for std::nullptr_t. Unfortunately, we use STLport on Android and the NDK's version of STLport doesn't actually have std::nullptr_t
I think gcc needs to #include <cstddef> to get std::nullptr_t:

http://www.dune-project.org/flyspray/index.php?do=details&task_id=904
(In reply to comment #1)
> I think gcc needs to #include <cstddef> to get std::nullptr_t:
> 
> http://www.dune-project.org/flyspray/index.php?do=details&task_id=904

Yeah somebody pointed this out on irc today too.
I ran into this today as well and fixed it locally using this patch:
https://hg.mozilla.org/try/rev/bb883f4d1f1e

Try run shows that it doesn't break existing builds using the older NDK either, but I don't know if it's a "correct" fix.
https://tbpl.mozilla.org/?tree=Try&rev=7c9410ad7e57
No longer blocks: 769099
Attached patch PatchSplinter Review
Feel free to r- if there's a better fix for this.
Attachment #690709 - Flags: review?(ehsan)
Comment on attachment 690709 [details] [diff] [review]
Patch

Review of attachment 690709 [details] [diff] [review]:
-----------------------------------------------------------------

Sure, that works for me.
Attachment #690709 - Flags: review?(ehsan) → review+
Thanks for the quick review :)

https://hg.mozilla.org/integration/mozilla-inbound/rev/b3968901d047
Assignee: nobody → bugmail.mozilla
https://hg.mozilla.org/mozilla-central/rev/b3968901d047
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
We have the same problem with B2G builds using gcc-4.6 based toolchains.
When we are building B2G, no__ANDROID__symbol is defined, MOZ_B2G is, so I added it after the __ANDROID__ one.
Attachment #690709 - Attachment is obsolete: true
Please file a new bug with a patch based off the latest trunk code. This bug has already been resolved and it will get confusing if you reuse it for the new patch.
Attachment #690709 - Attachment is obsolete: false
Ok, at the time I added the attachment, there was no resolution yet :P
(In reply to Juan Gomez [:_AtilA_] from comment #8)
> Created attachment 690904 [details] [diff] [review]
> Patch for including B2G builds
> 
> We have the same problem with B2G builds using gcc-4.6 based toolchains.
> When we are building B2G, no__ANDROID__symbol is defined, MOZ_B2G is, so I
> added it after the __ANDROID__ one.

In that case it might be better to check for _STLPORT_VERSION, instead of checking for __ANDROID__ and MOZ_B2G, since STLPort is why we don't have std::nullptr_t
(In reply to comment #11)
> In that case it might be better to check for _STLPORT_VERSION, instead of
> checking for __ANDROID__ and MOZ_B2G, since STLPort is why we don't have
> std::nullptr_t

Agreed.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: