Last Comment Bug 427765 - Problem when building with VC++2005 Express Edition
: Problem when building with VC++2005 Express Edition
Status: VERIFIED FIXED
:
Product: mozilla.org
Classification: Other
Component: MozillaBuild (show other bugs)
: other
: x86 Windows XP
: -- major (vote)
: ---
Assigned To: Masahiro YAMADA
:
Mentors:
Depends on: 437748
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-08 08:07 PDT by Masahiro YAMADA
Modified: 2008-09-08 20:56 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fixed guess-msvc.bat (3.71 KB, text/plain)
2008-04-08 08:09 PDT, Masahiro YAMADA
no flags Details
fixed start-msvc8.bat (1.89 KB, text/plain)
2008-04-08 08:09 PDT, Masahiro YAMADA
no flags Details
new Fixed start-msvc8.bat (2.42 KB, text/plain)
2008-04-11 07:52 PDT, Masahiro YAMADA
no flags Details
Fixed start-msvc8.bat Rev.2.1 (2.49 KB, application/octet-stream)
2008-04-11 08:19 PDT, Masahiro YAMADA
no flags Details
Fixed start-msvc8.bat Rev.2.2 (2.39 KB, text/plain)
2008-04-11 17:20 PDT, Masahiro YAMADA
no flags Details
guess-msvc.bat patch rev.1.0 (2.18 KB, patch)
2008-04-18 07:11 PDT, Masahiro YAMADA
ted: review+
Details | Diff | Review
start-msvc8.bat patch rev.1.0 (4.08 KB, patch)
2008-04-18 07:16 PDT, Masahiro YAMADA
no flags Details | Diff | Review
start-msvc8.bat patch rev.1.1 (1.65 KB, patch)
2008-04-18 07:34 PDT, Masahiro YAMADA
ted: review+
Details | Diff | Review
same fix for start-msvc9.bat (1.81 KB, patch)
2008-06-12 11:31 PDT, Ted Mielczarek [:ted.mielczarek]
no flags Details | Diff | Review

Description Masahiro YAMADA 2008-04-08 08:07:20 PDT
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.
Comment 1 Masahiro YAMADA 2008-04-08 08:09:11 PDT
Created attachment 314344 [details]
Fixed guess-msvc.bat
Comment 2 Masahiro YAMADA 2008-04-08 08:09:47 PDT
Created attachment 314345 [details]
fixed start-msvc8.bat
Comment 3 Masahiro YAMADA 2008-04-08 08:13:26 PDT
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.
Comment 4 Masahiro YAMADA 2008-04-09 05:14:38 PDT
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 .
Comment 5 Masahiro YAMADA 2008-04-09 07:36:31 PDT
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).
Comment 6 Masahiro YAMADA 2008-04-11 07:52:26 PDT
Created attachment 315110 [details]
new Fixed start-msvc8.bat

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.
Comment 7 Masahiro YAMADA 2008-04-11 08:19:42 PDT
Created attachment 315121 [details]
Fixed start-msvc8.bat Rev.2.1

Sorry, attachment 315110 [details] contains my private settings.
Comment 8 Masahiro YAMADA 2008-04-11 08:42:44 PDT
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"

Comment 9 Masahiro YAMADA 2008-04-11 17:20:08 PDT
Created attachment 315228 [details]
Fixed start-msvc8.bat Rev.2.2

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
Comment 10 Mike Beltzner [:beltzner, not reading bugmail] 2008-04-12 13:00:20 PDT
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 :(
Comment 11 Masahiro YAMADA 2008-04-12 15:51:07 PDT
(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.
Comment 12 Mike Beltzner [:beltzner, not reading bugmail] 2008-04-12 20:27:33 PDT
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

Comment 13 Mike Beltzner [:beltzner, not reading bugmail] 2008-04-12 21:47:54 PDT
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
Comment 14 Mike Beltzner [:beltzner, not reading bugmail] 2008-04-12 22:15:26 PDT
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?
Comment 15 Ted Mielczarek [:ted.mielczarek] 2008-04-15 07:22:22 PDT
Masahiro: these files are in CVS here: http://lxr.mozilla.org/mozilla/source/tools/build-environment/win32/

Can you provide diffs from CVS?
Comment 16 Masahiro YAMADA 2008-04-18 07:11:46 PDT
Created attachment 316434 [details] [diff] [review]
guess-msvc.bat patch rev.1.0
Comment 17 Masahiro YAMADA 2008-04-18 07:16:41 PDT
Created attachment 316436 [details] [diff] [review]
start-msvc8.bat patch rev.1.0

Patch for start-msvc8.bat
Attachment 315228 [details] was based on older file.
this patch is based on latest start-msvc8.bat (1.12)
Comment 18 Masahiro YAMADA 2008-04-18 07:21:30 PDT
Comment on attachment 316436 [details] [diff] [review]
start-msvc8.bat patch rev.1.0

sorry this is not correct file!!
Comment 19 Masahiro YAMADA 2008-04-18 07:34:37 PDT
Created attachment 316438 [details] [diff] [review]
start-msvc8.bat patch rev.1.1

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.
Comment 20 Ted Mielczarek [:ted.mielczarek] 2008-04-28 08:25:12 PDT
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?
Comment 21 Ted Mielczarek [:ted.mielczarek] 2008-04-29 07:33:09 PDT
I checked these in. If VC 2008 needs the same fix we can do that in another bug.
Comment 22 Andreas Goetz 2008-05-13 06:15:07 PDT
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?
Comment 23 Ted Mielczarek [:ted.mielczarek] 2008-05-13 07:02:20 PDT
Looks like we probably need to make the same fix to start-msvc9.bat.
Comment 24 Andreas Goetz 2008-05-13 08:25:56 PDT
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?
Comment 25 Ted Mielczarek [:ted.mielczarek] 2008-05-13 08:28:14 PDT
Please move that other bug into the MozillaBuild component and someone can patch it there.
Comment 26 Andreas Goetz 2008-05-13 10:45:29 PDT
Smbd already moved to Build Config- I assume this is correct?
Comment 27 Ted Mielczarek [:ted.mielczarek] 2008-06-12 11:31:55 PDT
Created attachment 324836 [details] [diff] [review]
same fix for start-msvc9.bat

I checked this in, it's the same fix for start-msvc9.bat.
Comment 28 Aaron Nowack 2008-06-28 10:41:21 PDT
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.
Comment 29 Ted Mielczarek [:ted.mielczarek] 2008-06-29 14:03:47 PDT
So fix it, it's a wiki.

Note You need to log in before you can comment on or make changes to this bug.