Closed
Bug 1350261
Opened 8 years ago
Closed 8 years ago
Windows build errors if <xutility> has not been included before some other STL headers
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: brsun, Assigned: ywu)
References
Details
There are some dependencies between STL headers. For example, <xutility> is needed to be included before some STL headers:
- <iosfwd>
- <utility>
- <unordered_map>
- <unordered_set>
If we don't include <xutility> before these STL headers, we will encounter compilation failures on Windows platforms[1].
[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=d88777dd85a64c81f79b9874b443105192c42552
Reporter | ||
Comment 1•8 years ago
|
||
:glandium suggest that we could use a similar trick as bug 1245076 to add corresponding changes in msvc-stl-wrapper.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ywu
Assignee | ||
Comment 2•8 years ago
|
||
Errors note:
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2880): error C2065: 'char_traits': undeclared identifier
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2880): error C2974: 'std::_Char_traits_eq': invalid template argument for '_Traits', type expected
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2275): note: see declaration of 'std::_Char_traits_eq'
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2880): error C3203: '_Char_traits_eq': unspecialized class template can't be used as a template argument for template parameter '_Pr', expected a real type
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2880): error C2988: unrecognizable template declaration/definition
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2880): error C2059: syntax error: '>'
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2886): error C2065: '_Elem': undeclared identifier
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2886): error C2923: 'std::equal_to': '_Elem' is not a valid template type argument for parameter '_Ty'
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2887): error C2923: 'std::_Equal_memcmp_is_safe_helper': '_Elem' is not a valid template type argument for parameter '_Elem1'
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2887): error C2923: 'std::_Equal_memcmp_is_safe_helper': '_Elem' is not a valid template type argument for parameter '_Elem2'
0:22.78 C:/PROGRA~2/MICROS~4/Shared/14.0/VC\include\xutility(2887): error C3203: 'equal_to': unspecialized class template can't be used as a template argument for template parameter '_Pr', expected a real type
Comment 3•8 years ago
|
||
I think the issue will go away after bug 1349064.
Assignee | ||
Comment 4•8 years ago
|
||
Thanks Mike, I will take a look at bug 1349064.
I think I am not fully understanding the root cause of the issue but I followed the hint of errors on Comment 2 and I think we can #include <string> to pass the complains of the errors[1].
[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=fcdc7edbd6491c35a9f45c994ee72b557bd2c628
Assignee | ||
Comment 5•8 years ago
|
||
It seems that bug 1349064 is going to remove <xutility> from memory/mozalloc/msvc_raise_wrappers.h which indeed could solve our issues. I suggest that we can either include <cmath> or <string> to handle the errors for now before bug 1349064 is going to be fixed.
Assignee | ||
Comment 6•8 years ago
|
||
As our small discussion in the office, we won't have those errors anymore. If nobody has concerns on this bug, I am going to close this bug next Wednesday. If anyone has concerns, please leave comments. thx.
Assignee | ||
Comment 7•8 years ago
|
||
close this bug as we won't have the errors anymore.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•