Closed
Bug 831279
Opened 11 years ago
Closed 11 years ago
b2g18 branch fails to build with clang: "ipc_channel_posix.cc:136:55: error: invalid use of non-static data member 'sun_path'" and other errors
Categories
(Firefox OS Graveyard :: GonkIntegration, defect)
Tracking
(firefox19 unaffected, firefox20 unaffected, firefox21 unaffected, b2g18+ fixed, b2g18-v1.0.0 fixed)
RESOLVED
FIXED
B2G C4 (2jan on)
Tracking | Status | |
---|---|---|
firefox19 | --- | unaffected |
firefox20 | --- | unaffected |
firefox21 | --- | unaffected |
b2g18 | + | fixed |
b2g18-v1.0.0 | --- | fixed |
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
References
Details
Attachments
(2 files)
1.32 KB,
patch
|
overholt
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
5.66 KB,
patch
|
overholt
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
This is the b2g version of bug 806609. When building debug desktop Firefox on Linux with clang from a clean version of the b2g18 tree, I get ../../../src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc:136:55: error: invalid use of non-static data member 'sun_path'
Assignee | ||
Comment 1•11 years ago
|
||
From bug 806609, I understand that the key configure tests are > checking for gcc c++0x headers bug without rtti... > checking for usable char16_t (2 bytes, unsigned)... I'm getting yes/no here, while I need to get no/yes. Here are the relevant bits from my config.log: >configure:10346: checking for gcc c++0x headers bug without rtti >configure:10358: clang++ -Qunused-arguments -c -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -Qunused-arguments conftest.C 1>&5 >In file included from configure:10352: >In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/memory:63: >In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/stl_algobase.h:65: >In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/stl_pair.h:61: >In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/move.h:57: >/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/type_traits:256:39: error: use of undeclared identifier '__float128' > struct __is_floating_point_helper<__float128> > ^ >1 error generated. >configure: failed program was: >#line 10351 "configure" >#include "confdefs.h" >#include <memory> >int main() { > >; return 0; } >configure:10378: checking for usable char16_t (2 bytes, unsigned) >configure:10394: clang++ -Qunused-arguments -c -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -Qunused-arguments conftest.C 1>&5 >configure:10390:32: error: use of undeclared identifier 'char16_t' >CONFIGURE_STATIC_ASSERT(sizeof(char16_t) == 2);
I think this is llvm.org/pr13530.
Assignee | ||
Comment 3•11 years ago
|
||
Pulling the fix to ipc_channel_posix [1] doesn't fix this entirely. When I do that, I then get compile errors in the HTML5 parser on nullptr: In file included from ../../../src/parser/html/nsHtml5NamedCharactersAccel.cpp:10: In file included from ../../../src/parser/html/nsHtml5NamedCharactersAccel.h:13: ../../../src/parser/html/jArray.h:105:22: error: expected parameter declarator typedef decltype(nullptr) jArray_nullptr_t; ^ ../../dist/include/mozilla/NullPtr.h:38:21: note: expanded from macro 'nullptr' # define nullptr __null [1] http://src.chromium.org/viewvc/chrome/trunk/src/ipc/ipc_channel_posix.cc?view=diff&r1=60130&r2=60131
Comment 4•11 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #1) > From bug 806609, I understand that the key configure tests are > > > checking for gcc c++0x headers bug without rtti... > > checking for usable char16_t (2 bytes, unsigned)... > > I'm getting yes/no here, while I need to get no/yes. You don't /need/ to. clang in c++98 mode is still a valid mode. And Rafael is right, it's a clang/libstdc++ 4.7 combination bug.
Assignee | ||
Comment 5•11 years ago
|
||
> You don't /need/ to. clang in c++98 mode is still a valid mode. Understood. :) > And Rafael is right, it's a clang/libstdc++ 4.7 combination bug. Okay. So how should we fix this?
Comment 6•11 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #3) > Pulling the fix to ipc_channel_posix [1] doesn't fix this entirely. When I > do that, I then get compile errors in the HTML5 parser on nullptr: > > In file included from > ../../../src/parser/html/nsHtml5NamedCharactersAccel.cpp:10: > In file included from > ../../../src/parser/html/nsHtml5NamedCharactersAccel.h:13: > ../../../src/parser/html/jArray.h:105:22: error: expected parameter > declarator > typedef decltype(nullptr) jArray_nullptr_t; > ^ That would be a separate bug in jArray.h.
Assignee | ||
Comment 7•11 years ago
|
||
I'm a bit confused about what is and isn't a bug here. * Is it a bug if our source doesn't compile with clang in c++98 mode? If so, it sounds like jArray.h and ipc_channel_posix.cc both have bugs. Perhaps other modules as well. * I guess it's /also/ a bug that we're not turning on c++11 mode for clang?
Comment 8•11 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #7) > I'm a bit confused about what is and isn't a bug here. > > * Is it a bug if our source doesn't compile with clang in c++98 mode? If > so, it sounds like jArray.h and ipc_channel_posix.cc both have bugs. > Perhaps other modules as well. Yes > * I guess it's /also/ a bug that we're not turning on c++11 mode for clang? Yes, and short of awful hacks, there's nothing we can do about it. You can try using libc++ instead of libstdc++.
Comment 9•11 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #8) > (In reply to Justin Lebar [:jlebar] from comment #7) > > I'm a bit confused about what is and isn't a bug here. > > > > * Is it a bug if our source doesn't compile with clang in c++98 mode? If > > so, it sounds like jArray.h and ipc_channel_posix.cc both have bugs. > > Perhaps other modules as well. > > Yes Although both compile for me on m-c with clang in c++98 mode.
Assignee | ||
Comment 10•11 years ago
|
||
The ipc_channel_posix.cc issue was introduced in bug 798354 and backed out soon thereafter. But the landing and backout spanned the Oct 8 merge. It sounds like we should port the backout to b2g18.
Assignee | ||
Comment 11•11 years ago
|
||
>> * Is it a bug if our source doesn't compile with clang in c++98 mode? > > Yes. Okay; let's make this bug about getting our source to compile in that mode, and we can worry about clang c++11 (or not) separately. > Although both compile for me on m-c with clang in c++98 mode. On the b2g18 branch?
Assignee | ||
Comment 12•11 years ago
|
||
And the jArray fix is probably bug 796925.
Comment 13•11 years ago
|
||
The jArray.h error is probably bug 796925.
Assignee | ||
Comment 14•11 years ago
|
||
Already backed out on m-c, so I don't need approval; only a review.
Assignee | ||
Comment 15•11 years ago
|
||
> Already backed out on m-c, so I don't need approval; only a review.
Erm, I mean, I don't need a review; only approval. :)
Assignee | ||
Comment 16•11 years ago
|
||
Comment on attachment 702827 [details] [diff] [review] Back out changeset 9adf5ca922a4 (bug 798354) [Approval Request Comment] * Bug caused by (feature/regressing bug #): Bug 798354 * User impact if declined: Developers can't build the b2g18 branch with clang without this patch. * Testing completed: Already landed on m-c. Risk to taking this patch (and alternatives if risky): Trivial change. String or UUID changes made by this patch: None.
Attachment #702827 -
Flags: approval-mozilla-b2g18?
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → justin.lebar+bug
Assignee | ||
Updated•11 years ago
|
Summary: b2g18 branch fails to build with clang: "ipc_channel_posix.cc:136:55: error: invalid use of non-static data member 'sun_path'" → b2g18 branch fails to build with clang: "ipc_channel_posix.cc:136:55: error: invalid use of non-static data member 'sun_path'" and other errors
Assignee | ||
Comment 17•11 years ago
|
||
Another error. Boy, this is fun.
> In file included from ../../../src/layout/base/nsCSSFrameConstructor.cpp:239:
> ../../../src/layout/base/../xul/base/src/nsListItemFrame.h:31:34: error: implicit conversion of NULL > constant to 'bool' [-Werror,-Wnull-conversion]
Assignee | ||
Comment 18•11 years ago
|
||
For the one in comment 17, we need http://hg.mozilla.org/mozilla-central/rev/978e9865042f4be110e719742d17a7d5480ec2b3
Assignee | ||
Comment 19•11 years ago
|
||
This is enough to get it to compile for me.
Assignee | ||
Comment 20•11 years ago
|
||
Comment on attachment 702906 [details] [diff] [review] Backport hg cset 978e9865042 [Approval Request Comment] Backport a simple fix from upstream. Low risk compared to the current breakage. No string changes, etc.
Attachment #702906 -
Flags: approval-mozilla-b2g18?
Updated•11 years ago
|
Attachment #702827 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Updated•11 years ago
|
Attachment #702906 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Updated•11 years ago
|
tracking-b2g18:
--- → +
Assignee | ||
Comment 21•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/068ec3fe8da9 https://hg.mozilla.org/releases/mozilla-b2g18/rev/115b09d80438
Assignee | ||
Updated•11 years ago
|
status-b2g18:
--- → fixed
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
status-b2g18-v1.0.0:
--- → fixed
status-firefox19:
--- → unaffected
status-firefox20:
--- → unaffected
status-firefox21:
--- → unaffected
Resolution: --- → FIXED
Target Milestone: --- → B2G C4 (2jan on)
You need to log in
before you can comment on or make changes to this bug.
Description
•