[DMD] building with --enable-dmd fails for android when using NDK r8c (gcc-4.6)

RESOLVED FIXED in Firefox 19

Status

()

Core
DMD
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

Trunk
mozilla20
All
Android
Points:
---

Firefox Tracking Flags

(firefox19 fixed, firefox20 fixed, b2g18 fixed)

Details

Attachments

(1 attachment)

2.07 KB, patch
njn
: review+
Justin Lebar (not reading bugmail)
: approval-mozilla-aurora+
Justin Lebar (not reading bugmail)
: approval-mozilla-b2g18+
Details | Diff | Splinter Review
Created attachment 693460 [details] [diff] [review]
Patch

When I build fennec with --enable-dmd using NDK r8c (soon to be the default on the buildbots), it fails compilation with the errors below. I was able to work around this using the attached patch.


    DMD.cpp
    make[5]: Entering directory `/home/kats/zspace/mozilla-git/obj-android-debug/memory/replace/dmd'
    /usr/bin/ccache /home/kats/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -o DMD.o -c  -fvisibility=hidden -DMOZ_NO_MOZALLOC -DNO_NSPR_10_SUPPORT  -I/home/kats/zspace/mozilla-git/memory/replace/dmd -I. -I../../../dist/include  -I/home/kats/zspace/mozilla-git/obj-android/dist/include/nspr -I/home/kats/zspace/mozilla-git/obj-android/dist/include/nss      -fPIC -isystem /home/kats/android/ndk/platforms/android-5/arch-arm/usr/include  -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -mandroid -fno-short-enums -fno-exceptions -Wno-psabi -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=softfp -I/home/kats/zspace/mozilla-git/obj-android/build/stlport -I/home/kats/android/ndk/sources/cxx-stl/stlport/stlport -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -funwind-tables -pipe  -DDEBUG -D_DEBUG -DTRACING -g -fno-omit-frame-pointer -funwind-tables  -isystem /home/kats/android/ndk/platforms/android-5/arch-arm/usr/include  -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MF .deps/DMD.o.pp  /home/kats/zspace/mozilla-git/memory/replace/dmd/DMD.cpp
    /home/kats/zspace/mozilla-git/memory/replace/dmd/DMD.cpp:1313:59: error: declaration of 'const mozilla::dmd::GroupSize& mozilla::dmd::BlockGroup::GroupSize() const' [-fpermissive]
    /home/kats/zspace/mozilla-git/memory/replace/dmd/DMD.cpp:1249:7: error: changes meaning of 'GroupSize' from 'class mozilla::dmd::GroupSize' [-fpermissive]
    /home/kats/zspace/mozilla-git/memory/replace/dmd/DMD.cpp:1483:59: error: declaration of 'const mozilla::dmd::GroupSize& mozilla::dmd::FrameGroup::GroupSize() const' [-fpermissive]
    /home/kats/zspace/mozilla-git/memory/replace/dmd/DMD.cpp:1249:7: error: changes meaning of 'GroupSize' from 'class mozilla::dmd::GroupSize' [-fpermissive]
    make[5]: *** [DMD.o] Error 1
Comment on attachment 693460 [details] [diff] [review]
Patch

Hooray for C++.

njn, I'm fine having a method called "Get" that never returns null, since, as you point out, this isn't Gecko.  :)  But perhaps you'd prefer something else.
Attachment #693460 - Flags: review?(n.nethercote)
Comment on attachment 693460 [details] [diff] [review]
Patch

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

Maybe moving to GetFoo for all getters is a good idea.  But I'm fine with just this change for now.
Attachment #693460 - Flags: review?(n.nethercote) → review+

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/d8e39fb4851d
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment on attachment 693460 [details] [diff] [review]
Patch

Justin, can you please approve this for uplift? Bug 822148 is a tedious pain in the rear to uplift without it.
Attachment #693460 - Flags: approval-mozilla-b2g18?
Comment on attachment 693460 [details] [diff] [review]
Patch

[Triage Comment]
Yes, of course.  a=me if you want it on Aurora, too.
Attachment #693460 - Flags: approval-mozilla-b2g18?
Attachment #693460 - Flags: approval-mozilla-b2g18+
Attachment #693460 - Flags: approval-mozilla-aurora+
(FWIW this doesn't build with compilers other than the NDK's -- jst ran into it building for his Linux box too.  So I think we should fix this on branches.)
https://hg.mozilla.org/releases/mozilla-aurora/rev/3b42b9434693
https://hg.mozilla.org/releases/mozilla-b2g18/rev/78dec8e93870
status-b2g18: --- → fixed
status-firefox19: --- → fixed
status-firefox20: --- → fixed
Component: General → DMD
You need to log in before you can comment on or make changes to this bug.