Closed Bug 1638130 Opened 5 years ago Closed 5 years ago

[Wayland] Fails to build with libc++ due to missing #include <vector>

Categories

(Core :: Widget: Gtk, defect)

Unspecified
FreeBSD
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- unaffected
firefox76 --- unaffected
firefox77 --- unaffected
firefox78 --- fixed

People

(Reporter: jbeich, Assigned: jbeich)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

libc++ unlike libstdc++ doesn't bootleg <vector> via <algorithm> but bug 1635362 moved the include to widget/gtk/MozContainer.h which doesn't seem to use std::vector.

$ c++ --version
FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ ./mach build
[...]
In file included from widget/gtk/WaylandVsyncSource.cpp:9:
In file included from widget/gtk/WaylandVsyncSource.h:12:
In file included from widget/gtk/MozContainer.h:12:
widget/gtk/MozContainerWayland.h:45:42: error: implicit instantiation of undefined template
      'std::__1::vector<std::__1::function<void ()>, std::__1::allocator<std::__1::function<void ()> > >'
  std::vector<std::function<void(void)>> initial_draw_cbs;
                                         ^
/usr/include/c++/v1/iosfwd:216:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
                           ^
1 error generated.

# Let's add #error to figure out why GCC/libstdc++ is not affected
In file included from objdir/dist/system_wrappers/vector:3,
                 from objdir/dist/stl_wrappers/vector:52,
                 from /usr/local/lib/gcc9/include/c++/functional:62,
                 from objdir/dist/system_wrappers/functional:3,
                 from objdir/dist/stl_wrappers/functional:52,
                 from /usr/local/lib/gcc9/include/c++/pstl/glue_algorithm_defs.h:13,
                 from /usr/local/lib/gcc9/include/c++/algorithm:71,
                 from objdir/dist/system_wrappers/algorithm:3,
                 from objdir/dist/stl_wrappers/algorithm:52,
                 from objdir/dist/include/mozilla/Span.h:25,
                 from objdir/dist/include/mozilla/DbgMacro.h:13,
                 from objdir/dist/include/mozilla/RefPtr.h:13,
                 from widget/gtk/WaylandVsyncSource.h:9,
                 from widget/gtk/WaylandVsyncSource.cpp:9:
/usr/local/lib/gcc9/include/c++/vector:59:2: error: #error bootlegging test
   59 | #error bootlegging test
      |  ^~~~~
OS: Linux → FreeBSD
Assignee: nobody → jcristau
Status: NEW → ASSIGNED
Assignee: jcristau → jbeich
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3a2daf926176 Move <vector> where std::vector moved after bug 1635362. r=stransky
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: