Closed Bug 1360903 Opened 7 years ago Closed 7 years ago

--disable-webrtc compile fail FileSystemDirectoryReader dom bindings

Categories

(Firefox Build System :: General, defect)

52 Branch
defect
Not set
normal

Tracking

(firefox-esr52 fixed, firefox54 fixed, firefox55 fixed)

RESOLVED DUPLICATE of bug 1353765
mozilla55
Tracking Status
firefox-esr52 --- fixed
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: altblitz, Assigned: glandium)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170430092224

Steps to reproduce:

Pulled firefox-52.1.0esr.source.tar.xz, compiled with clang/gcc with option --enable-webrtc=no.


Actual results:

 1:59.48 In file included from /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/UnifiedBindings5.cpp:2:
 1:59.48 In file included from /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/FileSystemDirectoryReaderBinding.cpp:10:
 1:59.48 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/FileSystemDirectoryReader.h:31:38: error: unknown type name 'File
SystemDirectoryEntry'; did you mean 'FileSystemDirectoryReader'?
 1:59.48   explicit FileSystemDirectoryReader(FileSystemDirectoryEntry* aDirectoryEntry,
 1:59.48                                      ^~~~~~~~~~~~~~~~~~~~~~~~
 1:59.48                                      FileSystemDirectoryReader
 1:59.48 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/FileSystemDirectoryReader.h:23:7: note: 'FileSystemDirectoryReade
r' declared here
 1:59.48 class FileSystemDirectoryReader
 1:59.48       ^
 1:59.48 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/FileSystemDirectoryReader.h:53:10: error: use of undeclared ident
ifier 'FileSystemDirectoryEntry'
 1:59.49   RefPtr<FileSystemDirectoryEntry> mParentEntry;
 1:59.49          ^
 1:59.49 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/FileSystemDirectoryReader.h:29:3: error: static_cast from 'mozill
a::dom::FileSystemDirectoryReader *' to 'nsISupports *', which are not related by inheritance, is not allowed
 1:59.49   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(FileSystemDirectoryReader)
 1:59.49   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1:59.49 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsCycleCollectionParticipant.h:646:3: note: expanded from macro 'NS_DECL_CYCL
E_COLLECTION_SCRIPT_HOLDER_CLASS'
 1:59.49   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(_class, _class)
 1:59.49   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1:59.49 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsCycleCollectionParticipant.h:600:3: note: expanded from macro 'NS_DECL_CYCL
E_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS'
 1:59.49   NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base)                                   \
 1:59.49   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1:59.49 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsCycleCollectionParticipant.h:536:3: note: expanded from macro 'NS_DECL_CYCL
E_COLLECTION_CLASS_BODY'
 1:59.49   NS_DECL_CYCLE_COLLECTION_CLASS_BODY_NO_UNLINK(_class, _base)                 \
 1:59.50   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1:59.50 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsCycleCollectionParticipant.h:529:12: note: expanded from macro 'NS_DECL_CYC
LE_COLLECTION_CLASS_BODY_NO_UNLINK'
 1:59.50     return NS_ISUPPORTS_CAST(_base*, p);                                       \
 1:59.50            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1:59.50 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsISupportsUtils.h:118:3: note: expanded from macro 'NS_ISUPPORTS_CAST'
 1:59.50   static_cast<nsISupports*>(static_cast<__unambiguousBase>(__expr))
 1:59.50   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1:59.50 In file included from /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/UnifiedBindings5.cpp:2:
 1:59.50 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/FileSystemDirectoryReaderBinding.cpp:83:15: error: cannot initialize object p
arameter of type 'const nsWrapperCache' with an expression of type 'mozilla::dom::FileSystemDirectoryReader'
 1:59.50   if (self && self->GetWrapperPreserveColor()) {
 1:59.50               ^~~~
 1:59.50 In file included from /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/UnifiedBindings5.cpp:2:
 1:59.51 In file included from /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/FileSystemDirectoryReaderBinding.cpp:3:
 1:59.51 In file included from /src/firefox-52.1.0esr/dom/bindings/AtomList.h:11:
 1:59.51 In file included from /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/GeneratedAtomList.h:6:
 1:59.51 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h:2631:14: error: no matching member function for ca
ll to 'PreserveWrapper'
 1:59.51     aObject->PreserveWrapper(reinterpret_cast<nsISupports*>(aObject));
 1:59.51     ~~~~~~~~~^~~~~~~~~~~~~~~
 1:59.51 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h:2638:29: note: in instantiation of member function
 'mozilla::dom::PreserveWrapperHelper<mozilla::dom::FileSystemDirectoryReader, true>::PreserveWrapper' requested here
 1:59.51   PreserveWrapperHelper<T>::PreserveWrapper(aObject);
 1:59.51                             ^
 1:59.52 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/FileSystemDirectoryReaderBinding.cpp:84:5: note: in instantiation of function
 template specialization 'mozilla::dom::PreserveWrapper<mozilla::dom::FileSystemDirectoryReader>' requested here
 1:59.52     PreserveWrapper(self);
 1:59.52     ^
 1:59.52 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsWrapperCache.h:225:8: note: candidate function not viable: no known convers
ion from 'mozilla::dom::FileSystemDirectoryReader' to 'nsWrapperCache' for object argument
 1:59.52   void PreserveWrapper(nsISupports* aScriptObjectHolder)
 1:59.52        ^
 1:59.52 /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/nsWrapperCache.h:241:8: note: candidate function not viable: requires 2 argum
ents, but 1 was provided
 1:59.52   void PreserveWrapper(void* aScriptObjectHolder, nsScriptObjectTracer* aTracer)
 1:59.52        ^
 1:59.52 5 errors generated.
 1:59.53
 1:59.53 In the directory  /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings
 1:59.53 The following command failed to execute properly:
 1:59.53 /usr/bin/ccache /usr/bin/clang++ -std=gnu++11 -o UnifiedBindings5.o -c -I/src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/stl_wrappers
 -I/src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /src/firefox-52.1.0esr/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1
-DOS_POSIX=1 -DOS_LINUX=1 -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/src/firefox-52.1.0es
r/dom/bindings -I/src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings -I/src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dist/include/mozilla
/dom -I/src/firefox-52.1.0esr/dom/base -I/src/firefox-52.1.0esr/dom/battery -I/src/firefox-52.1.0esr/dom/canvas -I/src/firefox-52.1.0esr/dom/geolo
cation -I/src/firefox-52.1.0esr/dom/html -I/src/firefox-52.1.0esr/dom/indexedDB -I/src/firefox-52.1.0esr/dom/media/webaudio -I/src/firefox-52.1.0e
sr/dom/media/webspeech/recognition -I/src/firefox-52.1.0esr/dom/svg -I/src/firefox-52.1.0esr/dom/workers -I/src/firefox-52.1.0esr/dom/xbl -I/src/f
irefox-52.1.0esr/dom/xml -I/src/firefox-52.1.0esr/dom/xslt/base -I/src/firefox-52.1.0esr/dom/xslt/xpath -I/src/firefox-52.1.0esr/dom/xul -I/src/fi
refox-52.1.0esr/js/xpconnect/src -I/src/firefox-52.1.0esr/js/xpconnect/wrappers -I/src/firefox-52.1.0esr/layout/generic -I/src/firefox-52.1.0esr/l
ayout/style -I/src/firefox-52.1.0esr/layout/xul/tree -I/src/firefox-52.1.0esr/media/mtransport -I/src/firefox-52.1.0esr/media/webrtc -I/src/firefo
x-52.1.0esr/media/webrtc/signaling/src/common/time_profiling -I/src/firefox-52.1.0esr/media/webrtc/signaling/src/peerconnection -I/src/firefox-52.
1.0esr/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I/src/firefox-52.1.0esr/ipc/chromium/src -I/src/firefox-52.1.0esr/ipc/glue -I/src/firefox-52
.1.0esr/obj-x86_64-pc-linux-gnu/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include /src/f
irefox-52.1.0esr/obj-x86_64-pc-linux-gnu/mozilla-config.h -MD -MP -MF .deps/UnifiedBindings5.o.pp -Qunused-arguments -D_FORTIFY_SOURCE=2 -Qunused-
arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-c
ode -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-c
ompat -Wimplicit-fallthrough -Wstring-conversion -Wthread-safety -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds
 -Wno-unknown-warning-option -Wno-return-type-c-linkage -march=native -fstack-protector-strong -pipe -fdiagnostics-color -fno-exceptions -fno-stri
ct-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -O3 -fomit-frame-pointer -Wno-error=shado
w /src/firefox-52.1.0esr/obj-x86_64-pc-linux-gnu/dom/bindings/UnifiedBindings5.cpp
 1:59.53 make[5]: *** [/src/firefox-52.1.0esr/config/rules.mk:953: UnifiedBindings5.o] Error 1
 1:59.53 make[4]: *** [/src/firefox-52.1.0esr/config/recurse.mk:71: dom/bindings/target] Error 2
 1:59.53 make[4]: *** Waiting for unfinished jobs....



Expected results:

PASS.

Firefox 52.0.2esr with the same mozconfig with --enable-webrtc=no compiles.
Firefox 52.1.0esr compiles only with --enable-webrtc.
Attached file mozconfig
Component: Untriaged → Build Config
Bug 1299500 removed DeviceStorage from dom/bindings, which moved FileSystemDirectoryEntryBinding.cpp at the top of UnifiedBindings5.cpp.

When webrtc is disabled, that removes some binding, and FileSystemDirectoryEntryBinding.cpp ends up in UnifiedBindings4.cpp. UnifiedBindings5.cpp then starts with FileSystemDirectoryReaderBinding.cpp, which now doesn't find the definition for FileSystemDirectoryEntry because there is none.

IOW, this all worked by chance, and removing an unrelated binding triggered a breakage.
Blocks: 1299500
Comment on attachment 8865061 [details]
Bug 1360903 - Add missing include for FileSystemDirectoryEntry.

https://reviewboard.mozilla.org/r/136738/#review139800
Attachment #8865061 - Flags: review?(bugs) → review+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/80d2096d6756
Add missing include for FileSystemDirectoryEntry. r=smaug
Comment on attachment 8865061 [details]
Bug 1360903 - Add missing include for FileSystemDirectoryEntry.

Approval Request Comment
[Feature/Bug causing the regression]: Regression as a side effect of bug 1299500. See comment 2.
[User impact if declined]: Can't build with --disable-webrtc (which is the default on big endian platforms).
[Is this code covered by automated tests?]: N/A
[Has the fix been verified in Nightly?]: N/A
[Needs manual test from QE? If yes, steps to reproduce]: N/A
[List of other uplifts needed for the feature/fix]: N/A
[Is the change risky?]: No
[Why is the change risky/not risky?]: Trivial C++ change (adding a missing #include)
[String changes made/needed]: N/A
Attachment #8865061 - Flags: approval-mozilla-esr52?
Attachment #8865061 - Flags: approval-mozilla-beta?
Attachment #8865061 - Flags: approval-mozilla-aurora?
Assignee: nobody → mh+mozilla
https://hg.mozilla.org/mozilla-central/rev/80d2096d6756
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Comment on attachment 8865061 [details]
Bug 1360903 - Add missing include for FileSystemDirectoryEntry.

Fix a build issue with --disable-webrtc. Beta54+. Should be in 54 beta 7.
Attachment #8865061 - Flags: approval-mozilla-beta?
Attachment #8865061 - Flags: approval-mozilla-beta+
Attachment #8865061 - Flags: approval-mozilla-aurora?
Attachment #8865061 - Flags: approval-mozilla-aurora-
This was already filed under bug 1353765 (we didn't notice earlier because this patch landed on autoland and the other on inbound). Since that bug already has approvals for all affected branches, I'm duping this bug over to that one.
No longer blocks: 1299500
Resolution: FIXED → DUPLICATE
Attachment #8865061 - Flags: approval-mozilla-esr52?
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170514232510

Firefox 52.1.1esr with FileSystemDirectoryEntry.patch (https://bugzilla.mozilla.org/show_bug.cgi?id=1353765) and --enable-webrtc=no option builds.
Comment on attachment 8865061 [details]
Bug 1360903 - Add missing include for FileSystemDirectoryEntry.

Resolved the issue with --enablewebrtc=no.
Though --enablewebrtc=yes doesn't required patch here.
Component: Build Config → General
Product: Firefox → Firefox Build System
Target Milestone: Firefox 55 → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: