Closed Bug 1711816 Opened 3 years ago Closed 3 years ago

[gcc 11] Multiple errors building stdc++compat.cpp

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

[task 2021-05-19T00:00:24.355Z] 00:00:24     INFO -  In file included from /builds/worker/fetches/gcc/include/c++/11.1.0/thread:43,
[task 2021-05-19T00:00:24.355Z] 00:00:24     INFO -                   from /builds/worker/workspace/obj-build/dist/system_wrappers/thread:3,
[task 2021-05-19T00:00:24.355Z] 00:00:24     INFO -                   from /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:73:
[task 2021-05-19T00:00:24.355Z] 00:00:24    ERROR -  /builds/worker/fetches/gcc/include/c++/11.1.0/bits/std_thread.h:220:13: error: 'shared_ptr' does not name a type
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -    220 |     typedef shared_ptr<_Impl_base>      __shared_base_type;
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -        |             ^~~~~~~~~~
[task 2021-05-19T00:00:24.356Z] 00:00:24    ERROR -  /builds/worker/fetches/gcc/include/c++/11.1.0/bits/std_thread.h:223:7: error: '__shared_base_type' does not name a type
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -    223 |       __shared_base_type        _M_this_ptr;
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -        |       ^~~~~~~~~~~~~~~~~~
[task 2021-05-19T00:00:24.356Z] 00:00:24    ERROR -  /builds/worker/fetches/gcc/include/c++/11.1.0/bits/std_thread.h:230:21: error: '__shared_base_type' has not been declared
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -    230 |     _M_start_thread(__shared_base_type, void (*)());
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -        |                     ^~~~~~~~~~~~~~~~~~
[task 2021-05-19T00:00:24.356Z] 00:00:24    ERROR -  /builds/worker/fetches/gcc/include/c++/11.1.0/bits/std_thread.h:233:21: error: '__shared_base_type' has not been declared
[task 2021-05-19T00:00:24.356Z] 00:00:24     INFO -    233 |     _M_start_thread(__shared_base_type);
[task 2021-05-19T00:00:24.357Z] 00:00:24     INFO -        |                     ^~~~~~~~~~~~~~~~~~
[task 2021-05-19T00:00:24.357Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:85:28: error: variable or field '_M_start_thread' declared void
[task 2021-05-19T00:00:24.357Z] 00:00:24     INFO -     85 | __attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
[task 2021-05-19T00:00:24.357Z] 00:00:24     INFO -        |                            ^~~~~~
[task 2021-05-19T00:00:24.357Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:85:52: error: 'shared_ptr' was not declared in this scope
[task 2021-05-19T00:00:24.357Z] 00:00:24     INFO -     85 | __attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
[task 2021-05-19T00:00:24.357Z] 00:00:24     INFO -        |                                                    ^~~~~~~~~~
[task 2021-05-19T00:00:24.358Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:85:63: error: '_Impl_base' was not declared in this scope
[task 2021-05-19T00:00:24.358Z] 00:00:24     INFO -     85 | __attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
[task 2021-05-19T00:00:24.358Z] 00:00:24     INFO -        |                                                               ^~~~~~~~~~
[task 2021-05-19T00:00:24.358Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:85:75: error: 'impl' was not declared in this scope
[task 2021-05-19T00:00:24.358Z] 00:00:24     INFO -     85 | __attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
[task 2021-05-19T00:00:24.358Z] 00:00:24     INFO -        |                                                                           ^~~~
[task 2021-05-19T00:00:24.358Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:86:52: error: expected primary-expression before 'void'
[task 2021-05-19T00:00:24.358Z] 00:00:24     INFO -     86 |                                                    void (*)()) {
[task 2021-05-19T00:00:24.358Z] 00:00:24     INFO -        |                                                    ^~~~
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp: In member function 'void std::thread::_M_start_thread(std::unique_ptr<std::thread::_State>, void (*)())':
[task 2021-05-19T00:00:24.359Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:103:20: error: 'make_shared' is not a member of 'std'
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -    103 |   auto impl = std::make_shared<StateWrapper>(std::move(aState));
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -        |                    ^~~~~~~~~~~
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:74:1: note: 'std::make_shared' is defined in header '<memory>'; did you forget to '#include <memory>'?
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -     73 | #  include <thread>
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -    +++ |+#include <memory>
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -     74 |
[task 2021-05-19T00:00:24.359Z] 00:00:24    ERROR -  /builds/worker/checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:103:44: error: expected primary-expression before '>' token
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -    103 |   auto impl = std::make_shared<StateWrapper>(std::move(aState));
[task 2021-05-19T00:00:24.359Z] 00:00:24     INFO -        |                                            ^
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/de62b7dc09b8
Fix stdc++compat.cpp compilation errors with recent GCC. r=firefox-build-system-reviewers,nalexander
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Blocks: 1714004
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: