Closed Bug 1586138 Opened 7 years ago Closed 7 years ago

Build fails when including mozilla/ipc/MessageChannel.h in MediaKeySystemAccess.h

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bryce, Unassigned)

Details

While refactoring I'm trying add #include "mozilla/ipc/MessageChannel.h" to MediaKeySystemAccessManager.h so that I can use ResponseRejectReason.

However, when doing so my build fails with:

 2:08.65 In file included from Unified_cpp_mozapps_extensions0.cpp:20:
 2:08.65 In file included from c:/projects/mozilla/mozilla-unified/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp:10:
 2:08.65 In file included from c:/projects/mozilla/mozilla-builds/obj-ff-dbg-opt/dist/include\mozilla/dom/Navigator.h:21:
 2:08.65 In file included from c:/projects/mozilla/mozilla-builds/obj-ff-dbg-opt/dist/include\mozilla/dom/MediaKeySystemAccessManager.h:9:
 2:08.65 c:/projects/mozilla/mozilla-builds/obj-ff-dbg-opt/dist/include\mozilla/ipc/MessageChannel.h(11,10): fatal error: 'base/basictypes.h' file not found
 2:08.65 #include "base/basictypes.h"
 2:08.66          ^~~~~~~~~~~~~~~~~~~
 2:09.42 1 error generated.

It's not clear to me if I shouldn't be doing this, and if so, if there's a more advisable way to achieve what I'm attempting to do.

Discussion with :glandium suggests this is due to

if you're including ipc stuff, you need to include /ipc/chromium/chromium-config.mozbuild in your moz.build

and that the AddonManager moz.build does not include that, but transatively ends up bringing in ipc stuff from my change, which results in this issue.

So the issue would need to be solved by:

  • Not including MessageChannel.h in something that makes its way to AddonManager, as I'm trying to do.
  • Having AddonManager bring in the chromium config.
  • Avoid MessageChannel.h requiring the chromium config, or if it does need it, splitting it, so folks like me can grab the enums without needing to drag in config everywhere.

Going to mark this as invalid, as I think I have my answer and isn't a bug in the build system.

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.