Closed Bug 208320 Opened 21 years ago Closed 21 years ago

MSVC++ .net 2003: Midl 6.00.0361 not supported

Categories

(SeaMonkey :: Build Config, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ian, Assigned: mozbugs-build)

References

Details

The build script complains that Midl 6.00.0361, the version shipped with MSVC++
.net 2003, is not supported.
I changed the test to the following:

        if test "$_MIDL_MAJOR_VERSION" != "5" -a "$_MIDL_FULL_VERSION" !=
"6.00.0347" -a "$_MIDL_FULL_VERSION" != "6.00.0361"; then
            AC_MSG_ERROR([Midl version $_MIDL_FULL_VERSION was found.  Midl
version must be 5.x.x (VC6*) or 6.00.0347 (VC7) or 6.00.0361 (VC.net 2003).])
        fi

...and the build seems to be going on ok. I'll report any problems I get.
Ok, so it doesn't work.

make[5]: Entering directory `/cygdrive/e/Trees/Mozilla.1/mozilla/accessible/publ
ic/msaa'
"midl" e:/Trees/Mozilla.1/mozilla/accessible/public/msaa/ISimpleDOMNode.idl
Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0361
Copyright (c) Microsoft Corporation 1991-2002. All rights reserved.
Processing e:\Trees\Mozilla.1\mozilla\accessible\public\msaa\ISimpleDOMNode.idl
midl : command line error MIDL1004 : cannot execute C preprocessor cl.exe
make[5]: *** [done_gen] Error 236
make[5]: Leaving directory `/cygdrive/e/Trees/Mozilla.1/mozilla/accessible/publi
c/msaa'

Doing it manually, as in:

E:\Trees\Mozilla.1>sh
$ cd /cygdrive/e/Trees/Mozilla.1/mozilla/accessible/public/msaa
$ "midl" e:/Trees/Mozilla.1/mozilla/accessible/public/msaa/ISimpleDOMNode.idl

...works fine. I'll investigate further.
I stuck "sh" into the Makefile and got my environment out. It looks fine to me:
--------------------------------------------------------------------------------
FRAMEWORKDIR=E:\WINNT\Microsoft.NET\Framework
VSINSTALLDIR=E:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
VDMSPATH=E:\Program Files\VDMSound\
PROGRAMFILES=E:\Program Files
OS2LIBPATH=E:\WINNT\system32\os2\dll;
LOGONSERVER=\\ABYSSINIAN
ALLUSERSPROFILE=E:\Documents and Settings\All Users
HOME=/cygdrive/e
SYSTEMDRIVE=E:
PROMPT=$P$G
INCLUDE=E:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\INCLUDE;E:
\Program Files\Microsoft Visual Studio .NET 2003\VC7\INCLUDE;E:\Program Files\Mi
crosoft Visual Studio .NET 2003\VC7\PlatformSDK\include\prerelease;E:\Program Fi
les\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\include;E:\Program Files\M
icrosoft Visual Studio .NET 2003\SDK\v1.1\include;E:\Program Files\Microsoft Vis
ual Studio .NET 2003\SDK\v1.1\include\;E:\Program Files\Microsoft.NET\FrameworkS
DK\include\;E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\
PROCESSOR_IDENTIFIER=x86 Family 6 Model 11 Stepping 1, GenuineIntel
PS1=$
VS71COMNTOOLS=E:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\
PROCESSOR_REVISION=0b01
MAKEFLAGS= --unix -w
PS2=>
DEVENVDIR=E:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
USERDOMAIN=ABYSSINIAN
MSVCDIR=E:\Program Files\Microsoft Visual Studio .NET 2003\VC7
PROCESSOR_ARCHITECTURE=x86
!::=::\
_=set
TEMP=/cygdrive/e/DOCUME~1/IANHIC~1/LOCALS~1/Temp
FRAMEWORKVERSION=v1.1.4322
USERNAME=Ian Hickson
TERM=cygwin
COMMONPROGRAMFILES=E:\Program Files\Common Files
WINDIR=E:\WINNT
LIBIDL_PREFIX=E:\ProgramFiles\MozTools.net
PATH=/usr/bin:/cygdrive/e/ProgramFiles/MozTools.net/bin:/cygdrive/e/ProgramFiles
/MozTools/bin:/cygdrive/e/Program Files/Microsoft.NET/FrameworkSDK/Bin/:/cygdriv
e/e/Program Files/Microsoft Visual Studio .NET/Common7/IDE/:/cygdrive/e/WINNT/Mi
crosoft.NET/Framework/v1.0.3705/:/cygdrive/e/Program Files/Microsoft Visual Stud
io .NET/Vc7/bin/:/cygdrive/e/WINNT/system32:/cygdrive/e/WINNT:/cygdrive/e/WINNT/
System32/Wbem:/cygdrive/e/Program Files/Common Files/Adaptec Shared/System:"E:/P
rogram Files/Hummingbird/Connectivity/7.00/Accessories/":/cygdrive/e/Program Fil
es/VDMSound/:/cygdrive/e/Program Files/Microsoft Visual Studio .NET 2003/Common7
/IDE:/cygdrive/e/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN:/cygdri
ve/e/Program Files/Microsoft Visual Studio .NET 2003/Common7/Tools:/cygdrive/e/P
rogram Files/Microsoft Visual Studio .NET 2003/Common7/Tools/bin/prerelease:/cyg
drive/e/Program Files/Microsoft Visual Studio .NET 2003/Common7/Tools/bin:/cygdr
ive/e/Program Files/Microsoft Visual Studio .NET 2003/SDK/v1.1/bin:/cygdrive/e/W
INNT/Microsoft.NET/Framework/v1.1.4322:.
OS=Windows_NT
MAKELEVEL=5
NUMBER_OF_PROCESSORS=1
USERPROFILE=E:\Documents and Settings\Ian Hickson
MOZ_TOOLS=E:\ProgramFiles\MozTools
VCINSTALLDIR=E:\Program Files\Microsoft Visual Studio .NET 2003
TMP=/cygdrive/e/DOCUME~1/IANHIC~1/LOCALS~1/Temp
!E:=E:\Trees\Mozilla.1\mozilla
APPDATA=E:\Documents and Settings\Ian Hickson\Application Data
SHELL=/bin/sh.exe
LIB=E:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\LIB;E:\Program
 Files\Microsoft Visual Studio .NET 2003\VC7\LIB;E:\Program Files\Microsoft Visu
al Studio .NET 2003\VC7\PlatformSDK\lib\prerelease;E:\Program Files\Microsoft Vi
sual Studio .NET 2003\VC7\PlatformSDK\lib;E:\Program Files\Microsoft Visual Stud
io .NET 2003\SDK\v1.1\lib;E:\Program Files\Microsoft Visual Studio .NET 2003\SDK
\v1.1\Lib\;E:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\;E:\Program Fil
es\Microsoft.NET\FrameworkSDK\Lib\
!EXITCODE=00000001
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
GLIB_PREFIX=E:\ProgramFiles\MozTools.net
IFS=

SYSTEMROOT=E:\WINNT
FRAMEWORKSDKDIR=E:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1
HOMEDRIVE=E:
HOMEPATH=\
COMSPEC=E:\WINNT\system32\cmd.exe
COMPUTERNAME=ABYSSINIAN
MFLAGS=- --unix -w
PROCESSOR_LEVEL=6
--------------------------------------------------------------------------------

But I can reproduce the problem using the shell in question:

--------------------------------------------------------------------------------
$ pwd
/cygdrive/e/Trees/Mozilla.1/mozilla/accessible/public/msaa
$ "midl" e:/Trees/Mozilla.1/mozilla/accessible/public/msaa/ISimpleDOMNode.idl
Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0361
Copyright (c) Microsoft Corporation 1991-2002. All rights reserved.
Processing e:\Trees\Mozilla.1\mozilla\accessible\public\msaa\ISimpleDOMNode.idl
midl : command line error MIDL1004 : cannot execute C preprocessor cl.exe
$
--------------------------------------------------------------------------------

However, if I run "cl" myself, it works:

--------------------------------------------------------------------------------
$ cl
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
$
--------------------------------------------------------------------------------

Microsoft documentation suggest that the problem might be that the command line
to cl is too long.

Still investigating...
I'm going to bed for now. cls: Any ideas as to what I should look at? I couldn't
see anything to do with WINNT_TARGET anywhere, and the path looks right to me.
Also cc'ing dbaron since dbaron seems to excel at finding porting problems. :-)

I'll work on this more tomorrow.
If I copy cl.exe to E:\ and then run

   "midl" /cpp_cmd "e:\cl.exe" e:/Trees/Mozilla.1/mozilla/accessible/public/msa
   a/ISimpleDOMNode.idl

...instead, it works. It doesn't work if I put the full path (including spaces)
into the /cpp_cmd line, though. And now I'm really going to bed.
I was able to get the build going under MSVC++ .NET 2003, while trying to build
Firebird. After changing iostream.h to iostream and adding std:: where
appropriate and also adding support for midl 6.00.0361 as outlined by Ian, I was
able to start a build. I changed both configure and configure.in (there were
references to iostream.h and midl in both). I tried it twice, using the
libidl/glib that Ian compiled, as well as one that i compiled myself using cls'
patches, with the same result.

The build failed with the following message:

Building deps for d:/cvs-1.11.5/mozilla/xpcom/ds/nsSupportsArray.cpp
cl -FonsSupportsArray.obj -c -D_IMPL_NS_GFX -D_IMPL_NS_MSG_BASE -D_IMPL_NS_PICS
-D_IMPL_NS_WIDGET  -DOSTYPE=\"WINNT5.1\" -DOSARCH=\"WINNT\" -D_IMPL_NS_COM  -I..
/../dist/include/string -I../../dist/include/xpcom -I../../dist/include -I../../
dist/include/nspr          -TP -nologo -W3 -nologo -Gy -Fdxpcomds_s.pdb  -DNDEBU
G -DTRIMMED -MD            -DX_DISPLAY_MISSING=1 -DHAVE_SNPRINTF=1 -D_WINDOWS=1
-D_WIN32=1 -DWIN32=1 -DXP_WIN=1 -DXP_WIN32=1 -DHW_THREADS=1 -DWINVER=0x400 -DSTD
C_HEADERS=1 -DNEW_H=\<new\> -DWIN32_LEAN_AND_MEAN=1 -DNO_X11=1 -D_X86_=1 -DD_INO
=d_ino -DMOZ_DEFAULT_TOOLKIT=\"windows\" -DMOZ_PHOENIX=1 -DMOZ_XUL_APP=1 -DMOZ_E
NABLE_COREXFONTS=1 -DOJI=1 -DIBMBIDI=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ
_JSLOADER=1 -DMOZ_MATHML=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\".mozilla\" -DCPP_THR
OW_NEW=throw\(\) -DMOZ_XUL=1 -DMOZ_PROFILESHARING=1 -DMOZ_DLL_SUFFIX=\".dll\" -D
JS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1 -DNS_PRINTING=1 -DMOZILLA_VERSION=\"1.5a\"
 -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT d:/cvs-1.11.5/mozilla/xpcom/ds/nsSupports
Array.cpp
nsSupportsArray.cpp
d:/cvs-1.11.5\mozilla\xpcom\ds\nsSupportsArray.cpp(327) : error C2666: 'operator
`!='' : 2 overloads have similar conversions
        d:\cvs-1.11.5\mozilla\dist\include\xpcom\nsCOMPtr.h(1192): could be 'NSC
AP_BOOL operator !=<nsISupports,nsISupports>(const U *,const nsCOMPtr<nsISupport
s> &)'
        with
        [
            U=nsISupports
        ]
        or       'built-in C++ operator!=(nsISupports *, nsISupports *)'
        while trying to match the argument list '(nsISupports *, nsCOMPtr<nsISup
ports>)'
        note: qualification adjustment (const/volatile) may be causing the ambig
uity
d:/cvs-1.11.5\mozilla\xpcom\ds\nsSupportsArray.cpp(605) : warning C4018: '<' : s
igned/unsigned mismatch
make[4]: *** [nsSupportsArray.obj] Error 2
make[4]: Leaving directory `/cygdrive/d/cvs-1.11.5/mozilla/xpcom/ds'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/cygdrive/d/cvs-1.11.5/mozilla/xpcom'
make[2]: *** [tier_2] Error 2
make[2]: Leaving directory `/cygdrive/d/cvs-1.11.5/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/d/cvs-1.11.5/mozilla'
make: *** [build] Error 2
You probably need to change last _MSC_VER test in nsCOMPtr.h so that it only
does what it's doing there for versions of VC++ less than what you're using. 
(Of course, if Windows used the autoconf tests, we wouldn't have this problem,
but that's a good bit of work...)
Let's please stick to one issue per bug. Ali: Please file a new bug for that
issue (please cc me on it). Curiously, I haven't hit that problem (yet). Did you
not hit the midl problem?
Horrah. Ok. It seems the problem was that my path was too long and had some of
the VC7 things in it twice.
midl's semantics changed in .net 2003, see bug 208320.
Depends on: 208461
What am I talking about. I meant bug 208461.
The patch for this bug was included in bug 208461's patch.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.