compile error in current nightly with error: invalid use of incomplete type 'class DataOffer'
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | unaffected |
firefox90 | --- | unaffected |
firefox91 | --- | unaffected |
firefox92 | --- | fixed |
People
(Reporter: herrtimson, Assigned: petr.sumbera)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(3 files, 1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
I downloaded the latest source code from nighlty branch and compiled it, on linux-amd64.
Actual results:
I got this error:
24:59.75 In file included from /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/nsISupportsUtils.h:17,
24:59.75 from /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/nsISupports.h:82,
24:59.75 from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/CompositorWidget.h:8,
24:59.75 from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.h:14,
24:59.76 from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.cpp:8:
24:59.76 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h: In instantiation of 'static void mozilla::RefPtrTraits<U>::AddRef(U*) [with U = DataOffer]':
24:59.76 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h:380:67: required from 'static void RefPtr<T>::ConstRemovingRefPtrTraits<U>::AddRef(U*) [with U = DataOffer; T = DataOffer]'
24:59.77 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h:97:43: required from 'RefPtr<T>::RefPtr(const RefPtr<T>&) [with T = DataOffer]'
24:59.77 /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.cpp:7916:67: required from here
24:59.77 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h:49:39: error: invalid use of incomplete type 'class DataOffer'
24:59.77 49 | static void AddRef(U* aPtr) { aPtr->AddRef(); }
24:59.77 | ^
24:59.77 In file included from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.cpp:66:
24:59.77 /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsDragService.h:17:7: note: forward declaration of 'class DataOffer'
24:59.77 17 | class DataOffer;
24:59.78 | ^~~~~~~~~
24:59.78 In file included from /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/nsISupportsUtils.h:17,
24:59.78 from /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/nsISupports.h:82,
24:59.78 from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/CompositorWidget.h:8,
24:59.78 from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.h:14,
24:59.78 from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.cpp:8:
24:59.79 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h: In instantiation of 'static void mozilla::RefPtrTraits<U>::Release(U*) [with U = DataOffer]':
24:59.79 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h:381:69: required from 'static void RefPtr<T>::ConstRemovingRefPtrTraits<U>::Release(U*) [with U = DataOffer; T = DataOffer]'
24:59.79 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h:81:44: required from 'RefPtr<T>::RefPtr() [with T = DataOffer]'
24:59.79 /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.cpp:7916:67: required from here
24:59.80 /var/tmp/portage/www-client/firefox-92.0/work/firefox_build/dist/include/mozilla/RefPtr.h:50:40: error: invalid use of incomplete type 'class DataOffer'
24:59.80 50 | static void Release(U* aPtr) { aPtr->Release(); }
24:59.80 | ^
24:59.80 In file included from /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsWindow.cpp:66:
24:59.80 /var/tmp/portage/www-client/firefox-92.0/work/firefox-92.0/widget/gtk/nsDragService.h:17:7: note: forward declaration of 'class DataOffer'
24:59.80 17 | class DataOffer;
24:59.80 | ^
Expected results:
I expect the compile to succed. The compressed build log is attached.
I'm uncertain where this may have been introduced, but widgets/gtk/ is activly developed at the moment! :)
tried again with clang-12.0.1, same error I believe. But maybe it has better error message?
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
same build failure on openbsd, cf http://buildbot.rhaalovely.net/nine/#/builders/3/builds/1152
Updated•3 years ago
|
Comment 4•3 years ago
|
||
I suppose these are X11 only builds (no Wayland)?
that is true for me at least, I'm using --enable-default-toolkit=cairo-gtk3
Comment 6•3 years ago
|
||
There is more X11-only bustage:
In file included from Unified_cpp_widget_gtk0.cpp:83:
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:234:16: error: use of undeclared identifier 'WL_OUTPUT_MODE_CURRENT'
if ((flags & WL_OUTPUT_MODE_CURRENT) == 0) return;
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:240:40: error: variable has incomplete type 'const struct wl_output_listener'
static const struct wl_output_listener output_listener = {
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:240:21: note: forward declaration of 'mozilla::widget::wl_output_listener'
static const struct wl_output_listener output_listener = {
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:247:49: error: unknown type name 'wl_registry'
static void screen_registry_handler(void* data, wl_registry* registry,
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:253:55: error: use of undeclared identifier 'wl_output_interface'
WaylandRegistryBind<wl_output>(registry, id, &wl_output_interface, 2);
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:268:42: error: variable has incomplete type 'const struct wl_registry_listener'
static const struct wl_registry_listener screen_registry_listener = {
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:268:21: note: forward declaration of 'mozilla::widget::wl_registry_listener'
static const struct wl_registry_listener screen_registry_listener = {
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:273:3: error: unknown type name 'wl_display'
wl_display* display = WaylandDisplayGetWLDisplay();
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:273:25: error: use of undeclared identifier 'WaylandDisplayGetWLDisplay'
wl_display* display = WaylandDisplayGetWLDisplay();
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:299:31: error: unknown type name 'wl_registry_destroy'; did you mean 'wl_registry_listener'?
g_clear_pointer(&mRegistry, wl_registry_destroy);
^~~~~~~~~~~~~~~~~~~
wl_registry_listener
/home/glandium/.mozbuild/sysroot-x86_64-linux-gnu/usr/include/glib-2.0/glib/gmem.h:118:49: note: expanded from macro 'g_clear_pointer'
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:268:21: note: 'wl_registry_listener' declared here
static const struct wl_registry_listener screen_registry_listener = {
^
/tmp/central/widget/gtk/ScreenHelperGTK.cpp:299:3: error: expected expression
g_clear_pointer(&mRegistry, wl_registry_destroy);
^
/home/glandium/.mozbuild/sysroot-x86_64-linux-gnu/usr/include/glib-2.0/glib/gmem.h:118:57: note: expanded from macro 'g_clear_pointer'
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
9 errors generated.
Updated•3 years ago
|
Comment 7•3 years ago
|
||
If you want to fool around with a X11-only gtk build on try, use the following patch:
https://hg.mozilla.org/try/rev/35650b3991fc07561946bfd6a79dac8f86c0597d
so does that mean --enable-default-toolkit=cairo-gtk3 is outlawed now?
Comment 9•3 years ago
|
||
(In reply to tt_1 from comment #8)
so does that mean --enable-default-toolkit=cairo-gtk3 is outlawed now?
dont think so, it's just that mozilla automation doesnt test anymore X11-only builds, and those failures are prone to reappear here and there during wayland work.
Comment 11•3 years ago
|
||
ScreenHelperGTK.cpp is trivially fixable, the DataOffer part not so much...
Comment 12•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #10)
Guys, do you mind to attach a patch for it?
Thanks.
what happened to 'you break it, you fix it' ? :D unless wayland-enabled builds are mandatory now ofc ...
Comment 13•3 years ago
|
||
(In reply to Landry Breuil (:gaston) from comment #12)
(In reply to Martin Stránský [:stransky] (ni? me) from comment #10)
Guys, do you mind to attach a patch for it?
Thanks.what happened to 'you break it, you fix it' ? :D unless wayland-enabled builds are mandatory now ofc ...
Sure, it's on my queue.
Assignee | ||
Comment 15•3 years ago
|
||
This is probably just temporary fix to allow X11 build again. Instead of
ifdeds some better abstraction might be needed. Hope that Martin can
find better way.
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
Thanks for the patch Petr, I tried a different approach.
Comment 18•3 years ago
|
||
Comment on attachment 9234120 [details]
Bug 1721707 [Wayland] Build fix for X11 only environment r?PetrSumbera
m-c built fine for me with this patch on OpenBSD, thanks !
Comment 19•3 years ago
|
||
Comment 20•3 years ago
|
||
Should we finally add a X11-only CI build? :) (and in the future a Wayland-only one, too?)
Updated•3 years ago
|
Comment 21•3 years ago
|
||
bugherder |
Reporter | ||
Comment 22•3 years ago
|
||
(In reply to Robert Mader [:rmader] from comment #20)
Should we finally add a X11-only CI build? :) (and in the future a Wayland-only one, too?)
if its possible and helps not to run into this kind of problem again, yes absolutly please.
Comment 23•3 years ago
|
||
(In reply to Robert Mader [:rmader] from comment #20)
Should we finally add a X11-only CI build? :) (and in the future a Wayland-only one, too?)
Filed bug 1723869.
Updated•3 years ago
|
Description
•