Closed Bug 1431801 Opened 6 years ago Closed 6 years ago

Sandbox MinGW Compilation errors: Don't declare duplicate instantiations

Categories

(Core :: Security: Process Sandboxing, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

Details

(Whiteboard: [tor][mingw-upstream-pending])

Attachments

(1 file)

      No description provided.
> 0:14.80 /home/tom/Documents/moz/mingw-work/sandbox/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc:125:71: error: duplicate explicit instantiation of ‘void base::PrepareForUTF8Output(const CHAR*, size_t, std::__cxx11::string*) [with CHAR = wchar_t; size_t = unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ [-fpermissive]
> 0:14.80  template void PrepareForUTF8Output(const char16*, size_t, std::string*);
> 0:14.80                                                                        ^
> 0:14.80 /home/tom/Documents/moz/mingw-work/sandbox/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc:146:71: error: duplicate explicit instantiation of ‘void base::PrepareForUTF16Or32Output(const char*, size_t, STRING*) [with STRING = std::__cxx11::basic_string<wchar_t>; size_t = unsigned int]’ [-fpermissive]
> 0:14.80  template void PrepareForUTF16Or32Output(const char*, size_t, string16*);
> 0:14.81                                                                        ^
Comment on attachment 8944035 [details]
Bug 1431801 Don't declare duplicate instantiations.

https://reviewboard.mozilla.org/r/214360/#review220070

r+ - I suppose, but is this also a MinGW bug?
Attachment #8944035 - Flags: review?(bobowencode) → review+
(In reply to Bob Owen (:bobowen) from comment #4)
> r+ - I suppose, but is this also a MinGW bug?

I think it's a compiler oddity, and not really a bug.  The types are the exact same:
https://chromium.googlesource.com/chromium/chromium/+/master/base/string16.h#37

gcc complains, but would allow it if we switch on -fpermissive. msvc (and therefore clang-cl) apparently don't complain.
Ah yeah sorry I misread the first one.
Patch land order: 1431621, 1431801 (this bug), 1431807, 1431825
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a132c57bc190
Don't declare duplicate instantiations. r=bobowen
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a132c57bc190
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: