Closed Bug 426065 Opened 15 years ago Closed 15 years ago

Build configure should confirm the correct Windows SDK is installed

Categories

(Firefox Build System :: General, defect)

x86
Windows Vista
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: jimm, Assigned: benjamin)

References

Details

Attachments

(2 files)

Born out of comments on bug 412374, the current build does not confirm the Vista SDK is installed. Since landing 412374 it's been suggested we warn users early on in the build that their environment is not set up correctly.

Benjamin - I'd be happy to try and roll this together but would welcome some help in understanding how it's done. My knowledge of our make system is a pretty lite.
Jim: could you provide a sample program that we could compile in configure to test the header/APIs you need? It should be the simplest set of code that won't compile without the necessary headers/APIs existing. If you can provide this, I'll write the configure bits for you.
Sure. Is code needed or could we just test for sdkdir/Include/wpcapi.h? If that header isn't present it would indicate an out of date sdk.  

I think an AC_CHECK_HEADERS would be sufficient, if it works on Windows... we should try it, at least! I'll do that when I find the right VM.
I'll take a shot at AC_CHECK_HEADERS and see if it works.
Assignee: nobody → jmathies
This patch adds a (correct) check for AC_CHECK_HEADERS. The previous check for mmintrin.h was completely broken. I slightly dislike having all the -nologo stuff, but it has to be that way unless I go changing the AC_CHECK_HEADERS macro itself (which I'm not about to do!)

Still needs another patch to actually use the values.
Assignee: jmathies → benjamin
Status: NEW → ASSIGNED
Attachment #315177 - Flags: review?(ted.mielczarek)
Comment on attachment 315177 [details] [diff] [review]
AC_CHECK_HEADERS for various things that are important, rev. 1

Not fantastic, but autoconf doesn't really play well with VC++ anyway.

AC_CHECK_HEADERS will actually find that idl file properly? Interesting.
Attachment #315177 - Flags: review?(ted.mielczarek) → review+
Yeah it will... because the .idl files are kept in INCLUDE, and it doesn't actually compile anything, only preprocess.
Comment on attachment 315177 [details] [diff] [review]
AC_CHECK_HEADERS for various things that are important, rev. 1

This is pretty low-risk. I'd like to take it for 1.9 since we recently added the Vista SDK dependency and I don't want to deal with "why doesn't FF3 compile on Windows" questions for the next year. Note that this patch doesn't add the error checking yet... I want to land it first to make sure that configure output from the tinderbox is reasonable.
Attachment #315177 - Flags: approval1.9?
Comment on attachment 315177 [details] [diff] [review]
AC_CHECK_HEADERS for various things that are important, rev. 1

a1.9=beltzner
Attachment #315177 - Flags: approval1.9? → approval1.9+
This actually uses part 1. I've verified that the tests all trigger correctly when the revelant headers are missing with a Vista SDK. I'm going to submit this to the tryserver as well to make sure I didn't accidentally break mac/linux.
Attachment #315817 - Flags: review?(ted.mielczarek)
Comment on attachment 315817 [details] [diff] [review]
Actually use part 1

Error messages with documentation links! I love it!
Attachment #315817 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 315817 [details] [diff] [review]
Actually use part 1

This shouldn't break people who weren't already broken.
Attachment #315817 - Flags: approval1.9?
Comment on attachment 315817 [details] [diff] [review]
Actually use part 1

a1.9=beltzner
Attachment #315817 - Flags: approval1.9? → approval1.9+
All fixed on CVS trunk, with some basic documentation pages in place.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
What's the content of conftest.out, when the test did not fail?

I have atlbase.h, oleacc.idl and wpcapi.h but the test fails. The created conftest.out only contains the name conftest.c followed by a new line.

config.log
-----------
configure:6517: checking for mmintrin.h
configure:6517: checking for oleacc.idl
configure:6527: cl -E -nologo  conftest.c >/dev/null 2>conftest.out
conftest.c

configure: failed program was:
#line 6522 "configure"
#include "confdefs.h"
#include <oleacc.idl>
configure:6566: checking for atlbase.h
configure:6576: cl -TP -E -nologo  conftest.C >/dev/null 2>conftest.out
conftest.C

configure: failed program was:
#line 6571 "configure"
#include "confdefs.h"
#include <atlbase.h>
configure:6566: checking for wpcapi.h
configure:6576: cl -TP -E -nologo  conftest.C >/dev/null 2>conftest.out
conftest.C

configure: failed program was:
#line 6571 "configure"
#include "confdefs.h"
#include <wpcapi.h>
configure:13048: checking if app-specific confvars.sh exists
configure:15719: checking for tar archiver
configure:15725: checking for gnutar
configure:15780: checking for iconv
configure:15786: checking for iconv


build.log
----------
checking for mmintrin.h... (cached) no
checking for oleacc.idl... no
checking for atlbase.h... no
checking for wpcapi.h... no
checking if app-specific confvars.sh exists... /cygdrive/i/building_Mozilla/source/TRUNK/mozilla/browser/confvars.sh
checking for tar archiver... checking for gnutar... (cached) tar
tar
checking for iconv... checking for iconv... (cached) iconv
configure: error: System header atlbase.h is not available. See http://developer.mozilla.org/en/docs/atlbase.h for details on fixing this problem.
*** Fix above errors and then restart with "make -f client.mk build"
make[1]: *** [configure] Error 1
make[1]: Leaving directory `/cygdrive/i/building_Mozilla/source/TRUNK/mozilla'
make: *** [/cygdrive/i/building_Mozilla/source/TRUNK/mozilla/../firefox_vc9/Makefile] Error 2


I have set
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-accessibility
but not 
ac_add_options --disable-xpconnect-idispatch
in my .mozconfig


I am using VC9 Express Edition together with the Vista SDK and the Win2k3 SDK with a patched atlbase.h (as described at http://developer.mozilla.org/en/docs/Mozilla_Build_FAQ#Win32-specific_questions).
Ronny, are you using cygwin or mozillabuild? If you are using the cygwin environment (which is a configuration that is no longer actively maintained), you are seeing bug 425974.
(In reply to comment #16)
> Ronny, are you using cygwin or mozillabuild? If you are using the cygwin
> environment (which is a configuration that is no longer actively maintained),
> you are seeing bug 425974.
> 

You are right, I'm still using cygwin - thanks for the hint.

(perhaps I should switch to MSYS)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.