Closed Bug 1053652 Opened 10 years ago Closed 10 years ago

Cannot open include file: 'dwrite_1.h'

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
firefox34 --- fixed
firefox35 --- fixed

People

(Reporter: bagder, Assigned: Callek)

References

Details

Attachments

(3 files)

My MSVC2010 build fails to build current mozilla-central with this error:

gfx\skia\trunk\src\ports\SkTypeface_win_dw.h(20) : fatal error C1083: Cannot open include file: 'dwrite_1.h': No such file or directory

I don't seem to have a dwrite_1.h nor dwrite.h header files in my tree

(I'm using the git mirror at https://github.com/mozilla/gecko-dev)
dwrite_1.h is a directX header. Try updating your directX SDK?
I updated to the Windows 8.1 SDK and the latest directX SDK and this problem is now fixed. Thanks.

(I did however instead run into another...)
This looks like it's the skia version of bug 1037667.
Component: Build Config → Graphics
Product: Firefox → Core
We should investigate whether we can remove Skia's dependency on dwrite_1.h.
I'm getting this now too (I also got bug 1037667). I have directX June 2010 installed and the Windows v7.0 SDK installed (running Windows7).

Do we now need the Windows8.1 SDK? What changed to require that?
Flags: needinfo?(mh+mozilla)
I'm getting this error too with mozilla-central on windows 7, VS2010, DX SDK June 2010.

I think this SDK is the latest for win7.
Yeah, you'll need the win 8.1 sdk for now. When I'm back from PTO I will see if it's worth our while to remove this dependency.
For reference, the build instructions were updated a while ago to show just installing the 8.1 sdk on win7 or higher: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites
(In reply to George Wright (:gw280 PTO Aug 15th - 24th) from comment #8)
> For reference, the build instructions were updated a while ago to show just
> installing the 8.1 sdk on win7 or higher:
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/
> Build_Instructions/Windows_Prerequisites

Thanks, I didn't think the 8.1 SDK could be installed on win7.

Do I need to remove the DX SDK first? Can I still use VS2010 with the 8.1 SDK on win7?
(In reply to Avi Halachmi (:avih) from comment #9)

> Thanks, I didn't think the 8.1 SDK could be installed on win7.
> 
> Do I need to remove the DX SDK first? Can I still use VS2010 with the 8.1
> SDK on win7?

I use win7 and I just got the 8.1 SDK and installed it, didn't uninstall anything and I use VS2010. Works fine!
Flags: needinfo?(mh+mozilla)
Out of curiosity I commented out #include <dwrite_1.h> to see what breaks.

The only use of dwrite_1 is from DWriteFontTypeface::fDWriteFontFace1 [1]. It seems that the code already has a fallback [2] for when that interface is not available, so it ought to be pretty straightforward to just remove it from builds that use the Win7 SDK.

[1] http://dxr.mozilla.org/mozilla-central/search?tree=mozilla-central&q=fDWriteFontFace1
[2] http://hg.mozilla.org/mozilla-central/file/4d94eeca89f3/gfx/skia/trunk/src/ports/SkScalerContext_win_dw.cpp#l482
This compiles. I have no idea what are the consequences at runtime. I'm not signing up to turn this into a real checkin :)
In terms of patching this, what would be acceptable? We have an AC_SUBST for MOZ_HAS_WINSDK_WITH_D3D which we could turn into a local DEFINE which would allow us to #ifdef out the code blocks as suggested by dmajor.
Flags: needinfo?(matt.woodrow)
This is what we use for other places: http://mxr.mozilla.org/mozilla-central/source/gfx/2d/moz.build#68
Flags: needinfo?(matt.woodrow)
Attached patch Possible patchSplinter Review
Compiles on Windows 7 SDK and also passes try:
https://tbpl.mozilla.org/?tree=Try&rev=85c54b040c02
Attachment #8477564 - Flags: review?(matt.woodrow)
Comment on attachment 8477564 [details] [diff] [review]
Possible patch

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

Looks good, but this is George's domain.
Attachment #8477564 - Flags: review?(matt.woodrow) → review?(gwright)
I am hitting this bug as well now.
Is building on windows XP SP3 still supported, given I upgrade DirectX?
That probably won't work unfortunately. Take the patch from comment 15 and I'll look into it.
(In reply to George Wright (:gw280) from comment #18)
> That probably won't work unfortunately. Take the patch from comment 15 and
> I'll look into it.

Yippie, that POC patch got me a running Firefox on windows XP SP3, thanks George!

I also installed
http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
Comment on attachment 8477564 [details] [diff] [review]
Possible patch

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

r- mainly because this touches upstream code, and so I've bounced it upstream (slightly modified) to see what they'd like.
Attachment #8477564 - Flags: review?(gwright) → review-
(In reply to George Wright (:gw280) from comment #21)
> Comment on attachment 8477564 [details] [diff] [review]
> Possible patch
> 
> Review of attachment 8477564 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r- mainly because this touches upstream code, and so I've bounced it
> upstream (slightly modified) to see what they'd like.

Any news on this from upstream?
Flags: needinfo?(gwright)
To be clear, this is breaking SeaMonkey official builders on aurora and trunk atm, might be masking a continued bustage from Bug 1069114, or maybe that other bug is actually fixed.
[11:36:04]	gw280	Callek: https://codereview.chromium.org/552383002/
[11:36:43]	Callek	gw280: any chance of a transplant to -aurora for us?
[11:37:25]	gw280	Callek: I'm swamped right now, but it should be fairly trivial to land the patch
[11:37:51]	Callek	gw280: so, if I write a patch, and r? you, you suspect you'd be able to review within the next few days?
[11:38:02]	Callek	gw280: based on a transplant from there?
[11:38:03]	gw280	Callek: yep
[11:38:10]	Callek	gw280: great, thanks
[11:38:11]	gw280	Callek: just take the patch off that codereview bug

(Trimmed for brevity)
Flags: needinfo?(gwright)
Listing Neil as patch author because he wrote the one on this bug, that was the basis for the upstream one.

I was going to push this to try tonight but it seems hangy. so if you want to push for me, thats great
Attachment #8499361 - Flags: review?(gwright)
Attachment #8499361 - Flags: review?(gwright) → review+
Generally patches from upstream can just be landed with r=upstream
Comment on attachment 8499361 [details] [diff] [review]
[m-i] Port from upstream

Approval Request Comment
[Feature/regressing bug #]: unable to build with the win7 SDK [Breaks SeaMonkey official builders]
[User impact if declined]: No release of SeaMonkey based on current aurora
[Describe test coverage new/current, TBPL]: Landing today
[Risks and why]: NPOTDB for Firefox/Android/B2G (touched files are, but Official Firefox builders are on newer SDKs)
[String/UUID change made/needed]: None
Attachment #8499361 - Flags: approval-mozilla-aurora?
Assignee: nobody → bugspam.Callek
https://hg.mozilla.org/mozilla-central/rev/5fe91075c467
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Comment on attachment 8499361 [details] [diff] [review]
[m-i] Port from upstream

Approved based on comment 27, specifically "NPOTDB for Firefox/Android/B2G". Happy to help SeaMonkey.
Attachment #8499361 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.