Closed Bug 806609 Opened 7 years ago Closed 7 years ago

ipc_channel_posix.cc fails to compile on SeaMonkey OS X debug buildslave

Categories

(SeaMonkey :: Build Config, defect)

All
macOS
defect
Not set

Tracking

(seamonkey2.15 fixed)

RESOLVED FIXED
seamonkey2.16
Tracking Status
seamonkey2.15 --- fixed

People

(Reporter: mcsmurf, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

ipc_channel_posix.cc fails to compile on SeaMonkey OS X debug buildslave (in this case on the comm-aurora/mozilla-aurora tree):
/usr/bin/clang++ -o ipc_channel_posix.o -c  -fvisibility=hidden -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DMOZ_SUITE=1 -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_POSIX=1 -DOS_MACOSX=1  -DHAVE_CONFIG_H -I/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium/src -I/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium/src/third_party/libevent -I/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium/src/third_party/libevent/mac -I/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium -I. -I../../dist/include  -I/builds/slave/comm-aurora-osx64-dbg/build/objdir/mozilla/dist/include/nspr -I/builds/slave/comm-aurora-osx64-dbg/build/objdir/mozilla/dist/include/nss      -fPIC -Qunused-arguments  -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-c++0x-extensions -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -DNO_X11 -pipe  -DDEBUG -D_DEBUG -DTRACING -gdwarf-2 -DNO_X11 -O3 -fno-omit-frame-pointer   -Qunused-arguments  -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/ipc_channel_posix.o.pp  /builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc:136:55: error: invalid use of nonstatic data member 'sun_path'
const size_t kMaxPipeNameLength = sizeof(sockaddr_un::sun_path);
                                         ~~~~~~~~~~~~~^~~~~~~~
/builds/slave/comm-aurora-osx64-dbg/build/mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc:156:5: warning: expression result unused [-Wunused-value]
    HANDLE_EINTR(close(fd));
    ^~~~~~~~~~~~~~~~~~~~~~~
[...]
17 warnings and 1 error generated.
make[6]: *** [ipc_channel_posix.o] Error 1

Possible fix for this issue: http://src.chromium.org/viewvc/chrome/trunk/src/ipc/ipc_channel_posix.cc?view=diff&r1=60130&r2=60131

But: The reason that this works on the Firefox tinderbox without that fix is that the FF tinderbox uses -std=gnu++0x in its buildflags, SeaMonkey buildbox somehow does not include that buildflag. Should probably investigate why that happens.
One more idea: Maybe this error has to do with the failed python virtualenv creation (this is not fatal yet, so the build just continues). We'll see when Bug 806317 is fixed.
Correction on Comment 1: I meant not the error itself, but the missing -std=gnu++0x compiler flag compared to the FF build or the SM opt build.
This code in configure.in probably causes the debug not to use the -std=gnu++0x mode:
2752 dnl Check for usable char16_t (2 bytes, unsigned)
2753 dnl (we might not need the unsignedness check anymore)
2754 AC_CACHE_CHECK(for usable char16_t (2 bytes, unsigned),

OS X debug build:
checking for gcc c++0x headers bug without rtti... no
checking for usable char16_t (2 bytes, unsigned)... no

OS X opt build:
checking for gcc c++0x headers bug without rtti... no
checking for usable char16_t (2 bytes, unsigned)... yes

For the -std=gnu++0x mode the first one needs to be no and the second one needs to be yes.
Attached patch Patch (obsolete) — Splinter Review
Quite likely the correct fix, we need to add the OS X sdk to the debug .mozconfig, too. I assume that's the reason why configure does not find a usable char16_t (see Comment 3).
Attachment #676935 - Flags: review?(bugspam.Callek)
Comment on attachment 676935 [details] [diff] [review]
Patch

Review of attachment 676935 [details] [diff] [review]:
-----------------------------------------------------------------

::: suite/config/mozconfigs/macosx64/debug
@@ +1,1 @@
> +ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk

Actually what we want is to source the common file

. $topsrcdir/build/macosx/mozconfig.common

Which will switch our debug builds to the same clang we use in the real opt builds. which is the right choice here to match TB/Firefox afaict

http://mxr.mozilla.org/comm-central/source/mail/config/mozconfigs/macosx64/debug?force=1
http://mxr.mozilla.org/comm-central/source/mozilla/browser/config/mozconfigs/macosx64/debug?force=1
Attachment #676935 - Flags: review?(bugspam.Callek) → review-
Attached patch PatchSplinter Review
Should I also add
# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j4"

to speed up the build?
Attachment #676935 - Attachment is obsolete: true
Attachment #678248 - Flags: review?(bugspam.Callek)
Comment on attachment 678248 [details] [diff] [review]
Patch

Not required, but adding -j4 is probably also a good idea!
Attachment #678248 - Flags: review?(bugspam.Callek) → review+
Pushed: https://hg.mozilla.org/comm-central/rev/71adceeda938
Leaving open for comm-aurora approval if the patch works as expected.
Target Milestone: --- → seamonkey2.16
> mk_add_options MOZ_MAKE_FLAGS="-j4"
Depends on how many cores the VM has.
Comment on attachment 678248 [details] [diff] [review]
Patch

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: No debug builds on Mac OS X
Testing completed (on m-c, etc.): Patch has been tested on comm-central, debug builds work fine again, see http://tbpl.drapostles.org/?tree=SeaMonkey
Risk to taking this patch (and alternatives if risky): No risk, patch does not affect release builds
String changes made by this patch: -
Attachment #678248 - Flags: approval-comm-aurora?
Attachment #678248 - Flags: approval-comm-aurora? → approval-comm-aurora+
Pushed: http://hg.mozilla.org/releases/comm-aurora/rev/4f3140a9ed92
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.