Closed Bug 1733729 Opened 3 years ago Closed 3 years ago

Non-unified build failures in xpcom/ds and xpcom/io, starting with: xpcom/ds/PLDHashTable.cpp:621:21: error: use of undeclared identifier 'MakeScopeExit'

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox92 --- unaffected
firefox93 --- unaffected
firefox94 --- wontfix
firefox95 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I'm hitting bustage when building with

ac_add_options --disable-unified-build
ac_add_options --enable-debug --disable-optimize

Build errors:

$SRC/xpcom/ds/PLDHashTable.cpp:621:21: error: use of undeclared identifier 'MakeScopeExit'
  auto endWriteOp = MakeScopeExit([&] { mChecker.EndWriteOp(); });
                    ^
1 error generated.
gmake[4]: *** [$SRC/config/rules.mk:674: PLDHashTable.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[3]: *** [$SRC/config/recurse.mk:72: xpcom/ds/target-objects] Error 2
gmake[3]: *** Waiting for unfinished jobs....
$SRC/xpcom/io/nsPipe3.cpp:1180:1: error: implicit instantiation of undefined template 'nsTSubstring<char>'
NS_IMPL_THREADSAFE_CI(nsPipeInputStream)
^
$OBJ/dist/include/nsISupportsImpl.h:1497:16: note: expanded from macro 'NS_IMPL_THREADSAFE_CI'
    _contractID.SetIsVoid(true);                               \
               ^
$OBJ/dist/include/nsStringFwd.h:29:7: note: template is declared here
class nsTSubstring;
      ^
$SRC/xpcom/io/nsPipe3.cpp:1180:1: error: implicit instantiation of undefined template 'nsTSubstring<char>'
NS_IMPL_THREADSAFE_CI(nsPipeInputStream)
^
$OBJ/dist/include/nsISupportsImpl.h:1503:22: note: expanded from macro 'NS_IMPL_THREADSAFE_CI'
    _classDescription.SetIsVoid(true);                         \
                     ^
$OBJ/dist/include/nsStringFwd.h:29:7: note: template is declared here
class nsTSubstring;
      ^
$SRC/xpcom/io/nsPipe3.cpp:1565:1: error: implicit instantiation of undefined template 'nsTSubstring<char>'
NS_IMPL_THREADSAFE_CI(nsPipeOutputStream)
^
$OBJ/dist/include/nsISupportsImpl.h:1497:16: note: expanded from macro 'NS_IMPL_THREADSAFE_CI'
    _contractID.SetIsVoid(true);                               \
               ^
$OBJ/dist/include/nsStringFwd.h:29:7: note: template is declared here
class nsTSubstring;
      ^
$SRC/xpcom/io/nsPipe3.cpp:1565:1: error: implicit instantiation of undefined template 'nsTSubstring<char>'
NS_IMPL_THREADSAFE_CI(nsPipeOutputStream)
^
$OBJ/dist/include/nsISupportsImpl.h:1503:22: note: expanded from macro 'NS_IMPL_THREADSAFE_CI'
    _classDescription.SetIsVoid(true);                         \
                     ^
$OBJ/dist/include/nsStringFwd.h:29:7: note: template is declared here
class nsTSubstring;
      ^

I'm assuming this is from bug 1733308 which removed REQUIRES_UNIFIED_BUILD from these subdirectories.

Flags: needinfo?(mh+mozilla)

At least for the first error, it's in code that's effectively debug-only:

#ifdef MOZ_HASH_TABLE_CHECKS_ENABLED
  mChecker.StartWriteOp();
  auto endWriteOp = MakeScopeExit([&] { mChecker.EndWriteOp(); });
#endif

...where MOZ_HASH_TABLE_CHECKS_ENABLED is defined as:

#if defined(DEBUG) || defined(FUZZING)
#  define MOZ_HASH_TABLE_CHECKS_ENABLED 1
#endif

So at least that first build error is debug-build-specific, and I assume it should be reproducible as long as you've got --enable-debug in your mozconfig.

(I'm guessing bug 1733308's patches were only tested with opt builds, and maybe that's the only build configuration we've got for this on infra right now...)

These changes were necessary for me to build successfully with this in my
mozconfig:
ac_add_options --enable-debug
ac_add_options --disable-unified-build
ac_add_options --enable-profiling

While I'm here, I removed a duplicate include in InputTaskManager.h, and made
nsThreadPool.cpp include its own header first, to match Gecko common practice.

Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/703c5419d4ca
Fix non-unified build bustage in xpcom directory. r=mccr8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Flags: needinfo?(mh+mozilla)

Set release status flags based on info from the regressing bug 1733308

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: