Closed Bug 427765 Opened 16 years ago Closed 16 years ago

Problem when building with VC++2005 Express Edition

Categories

(Firefox Build System :: MozillaBuild, task)

x86
Windows XP
task
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: masa141421356, Assigned: masa141421356)

References

Details

Attachments

(3 files, 6 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Now, Firefox Trunk uses Parental Controll API, it requires Windwos Vista SDK.
But, it does NOT contains ATL header files.
And, VC++ 2005 Express edition does not contains ATL header files too.
It causes to fail to build Fx Trunk ("atlbase.h" not found).


Reproducible: Always

Steps to Reproduce:
1.Install VC++2005 Express Edition
2.Install Windows Vista SDK.
3.Install MozillaBuild 1.2 package
4.Get sourece files
5.Configure and build.

Actual Results:  
It always fails with "atlbase.h" not found.

Expected Results:  
Build succeeded.

ATL header files is only included with:
1. VC++ 2005 other than Express Edition
2. Platform SDKs (e.g. Windows 2003 Server R2 Platform SDK)
... Windows SDKs (Windows Vista SDK, Windows 2008 Server SDK)
    does not contain ATL header files

It means , To build Fx trunk with VC++2005 Express Edtion,
1.Install VC++2005 Express Edition
2.Install Windows Vista SDK.
3.Additionally, install Windows 2003 Server R2 Platform SDK .
4.Install MozillaBuild 1.2 package
5.Get sourece files
6.Configure
7.Modify batch files
8.Build Fx Trunk.

I'll attach my fixed batch files.
Attached file Fixed guess-msvc.bat (obsolete) —
Attached file fixed start-msvc8.bat (obsolete) —
Comment on attachment 314345 [details]
fixed start-msvc8.bat

This batchfiles Adds Platform SDK's ATL header file path to INCLUDE environment variable when using VC++ExpressEdition and WIndows VIsta SDK.
Component: Build Config → MozillaBuild
Product: Firefox → mozilla.org
QA Contact: build.config → mozillabuild
Version: unspecified → other
Attachment #314344 - Attachment mime type: application/octet-stream → text/plain
I think, it is needed to fix MDC documantation too.
  http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites
I filed it as Bug 427968 .
According to Bug 427968 Comment #1, there is a same problem on oleacc.idl .
 (It is contained in only Platfrom SDK, not in VC++ Express and Windows Vista SDK).
Attached file new Fixed start-msvc8.bat (obsolete) —
Oleacc.idl and midl.exe are also not contained in VC++ 2005 Express Edition and Windows Vista SDK.
Oleacc.idl : Exists in Platfrom SDK's "Include" folder.
Midl.exe   : Exists in Platfrom SDK's "Bin" folder.
Attachment #314345 - Attachment is obsolete: true
Attached file Fixed start-msvc8.bat Rev.2.1 (obsolete) —
Sorry, attachment 315110 [details] contains my private settings.
Attachment #315110 - Attachment is obsolete: true
Sorry, Midl.exe is not missing in Windows Vista SDK,
 only I did not install "Win32 Development Tools".

And I found a problem around midl.exe.

Unknwn.idl in Windows Vista SDK is not compatible with midl.exe of Platform SDK for Windows Server 2003 R2.

>E:\Microsoft SDKs\Windows\v6.0\include\unknwn.idl(108) : error MIDL2025 : syntax error : expecting ] or , near "annotation"

Attachment #314344 - Flags: review?
Attached file Fixed start-msvc8.bat Rev.2.2 (obsolete) —
I can build Fx Trunk with CVS source and follwoing configuration.

mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt-static
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-libxul
ac_add_options --disable-tests
ac_add_options --disable-installer
Attachment #315121 - Attachment is obsolete: true
Attachment #315228 - Flags: review?
Attachment #315228 - Attachment mime type: application/octet-stream → text/plain
Keywords: dev-doc-needed
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hm, I re-installed the W2K3R2 SDK and tried attachment 315228 [details] and still got errors at IA2CommonTypes.idl with an error of nsinstall: Accessible2.h: No such file or directory

Looking deeper, I found that it wasn't setting the right includes, and it hadn't referenced the PSDK. So I'm not sure that modified build file is right :(
(In reply to comment #10)
Attachment 315228 [details] requires attachment 314344 [details].
Attachment 314344 [details] detects PSDK and sets its information to PSDKDIR and PSDKVER even if Windows Vista SDK is found.
Oh, I see. My mistake!

I can confirm that these new batch files work perfectly. After running them, I get:

$ set | grep include
INCLUDE='C:\Program Files\Microsoft SDKs\Windows\v6.0\\include;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\\include\atl;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\\include;C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;'

And as a result, builds work, even with a totally basic .mozconfig

I have updated the MDC page on software requirements to refer to this bug, as well as the revised batch files. This should allow people to continue using the free software chain for building Mozilla on windows until we have MozillaBuild updated:

http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites
Keywords: dev-doc-needed
Note that I've also filed bug 428657 and bug 428660 about using depricated headers (which is part of the cause of this problem). Are those the only ones getting us in trouble?
Attachment #315228 - Flags: review? → review?(bhearsum)
Attachment #314344 - Flags: review? → review?(bhearsum)
Attachment #315228 - Flags: review?(bhearsum) → review?(ted.mielczarek)
Attachment #314344 - Flags: review?(bhearsum) → review?(ted.mielczarek)
Masahiro: these files are in CVS here: http://lxr.mozilla.org/mozilla/source/tools/build-environment/win32/

Can you provide diffs from CVS?
Attachment #314344 - Attachment is obsolete: true
Attachment #314344 - Flags: review?(ted.mielczarek)
Attached patch start-msvc8.bat patch rev.1.0 (obsolete) — Splinter Review
Patch for start-msvc8.bat
Attachment 315228 [details] was based on older file.
this patch is based on latest start-msvc8.bat (1.12)
Attachment #315228 - Attachment is obsolete: true
Attachment #316436 - Flags: review?(ted.mielczarek)
Attachment #315228 - Flags: review?(ted.mielczarek)
Attachment #316434 - Attachment description: patch rev.1.0 → guess-msvc.bat patch rev.1.0
Attachment #316434 - Flags: review?(ted.mielczarek)
Comment on attachment 316436 [details] [diff] [review]
start-msvc8.bat patch rev.1.0

sorry this is not correct file!!
Attachment #316436 - Attachment is obsolete: true
Attachment #316436 - Flags: review?(ted.mielczarek)
This is based on start-msvc8.bat ver.1.12.
I checked environment variable's values but ,I can not test with clean-build.
Because my PC has a problem around CPU-fan, my PC hangs when building browser by OVERHEAT.
Please test this batch file with clean-build.
Attachment #316438 - Flags: review?(ted.mielczarek)
Attachment #316434 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 316438 [details] [diff] [review]
start-msvc8.bat patch rev.1.1

Looks good, thanks for the descriptive comments in there!

On a related note, does Visual C++ 2008 Express Edition have this same problem? I assume so, since it doesn't have its own PSDK. Can we get a patch to fix start-msvc9.bat as well?
Attachment #316438 - Flags: review?(ted.mielczarek) → review+
Assignee: nobody → masa141421356
I checked these in. If VC 2008 needs the same fix we can do that in another bug.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
I've just opened bug 433483- I believe this is me experiencing this issue with VC 2008? Do I need to install the Windows Server R2 Platform SDK?
Looks like we probably need to make the same fix to start-msvc9.bat.
Should I close bug 433483 again as depending on this one or do you want to continue the start-msvc9.bat fixes in bug 433483?
Please move that other bug into the MozillaBuild component and someone can patch it there.
Smbd already moved to Build Config- I assume this is correct?
I checked this in, it's the same fix for start-msvc9.bat.
The documentation at http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites does not mention that the Server 2003 Platform SDK is required for Visual C++ Express 2008.
So fix it, it's a wiki.
Status: RESOLVED → VERIFIED
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.