Build Thunderbird(2.0.0.22) failed using mozilla-build and msvc8 (visual studio 2005)

Hi,

I want fix a bug in Thunderbird, and I have download the source code tarball
of thunderbird 2.0.0.22 to modified the source code files, but I can't build
it with MSVC8.

The following information is the build tools output:

g:/Temp/Test/mozilla/xpcom/base/nsStackFrameWin.cpp(330) : error C2664:
'BOOL (H
ANDLE,PENUMLOADED_MODULES_CALLBACK,PVOID)' : cannot convert parameter 2 from
'ov
erloaded-function' to 'PENUMLOADED_MODULES_CALLBACK'
        None of the functions with this name in scope match the target type
g:/Temp/Test/mozilla/xpcom/base/nsStackFrameWin.cpp(380) : error C2664:
'BOOL (H
ANDLE,PENUMLOADED_MODULES_CALLBACK64,PVOID)' : cannot convert parameter 2
from '
overloaded-function' to 'PENUMLOADED_MODULES_CALLBACK64'
        None of the functions with this name in scope match the target type
make[3]: *** [nsStackFrameWin.obj] Error 2
make[3]: Leaving directory `/g/Temp/Test/mozilla/xpcom/base'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/g/Temp/Test/mozilla/xpcom'
make[1]: *** [tier_2] Error 2
make[1]: Leaving directory `/g/Temp/Test/mozilla'
make: *** [default] Error 2

How can I solve these problems?

My system information:
"Mozilla tools directory: C:\mozilla-build\"
Windows SDK directory: C:\Program Files\Microsoft SDKs\Windows\v6.0A\
Windows SDK version: 6.0A
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
Mozilla build environment: MSVC version 8.
Microsoft Windows XP [Ver 5.1.2600.5512] Service Pack 3
Microsoft Visual Studio 2005 8.0.50727.42

Samuel
Zeeis Team
http://www.zeeis.com/
0
Samuel
7/31/2009 9:42:04 AM
mozilla.dev.apps.thunderbird 3464 articles. 0 followers. Post Follow

2 Replies
758 Views

Similar Articles

[PageSpeed] 40

On 31/07/2009 10:42, Samuel wrote:
> Hi,
>
> I want fix a bug in Thunderbird, and I have download the source code tarball
> of thunderbird 2.0.0.22 to modified the source code files, but I can't build
> it with MSVC8.
....
> How can I solve these problems?

As per https://developer.mozilla.org/en/Windows_Build_Prerequisites 
MSVC8 isn't a supported build environment for the 1.8.1 branch (which is 
what Thunderbird 2.0.0.x is build on).

So you'll have to downgrade your MSVC version if you can.

Have you considered trying to fix the bug on the Thunderbird 3 builds 
first? These are the up to date builds that we are working on and we 
always require a fix on them first before getting something into the 
security and stability releases (unless it is already fixed or doesn't 
appear on the TB 3 builds).

Standard8
0
Mark
7/31/2009 10:00:20 AM
Samuel wrote:
> Hi,
> 
> I want fix a bug in Thunderbird, and I have download the source code tarball
> of thunderbird 2.0.0.22 to modified the source code files, but I can't build
> it with MSVC8.
> 
> The following information is the build tools output:
> 
> g:/Temp/Test/mozilla/xpcom/base/nsStackFrameWin.cpp(330) : error C2664:
> 'BOOL (H
> ANDLE,PENUMLOADED_MODULES_CALLBACK,PVOID)' : cannot convert parameter 2 from
> 'ov
> erloaded-function' to 'PENUMLOADED_MODULES_CALLBACK'
>         None of the functions with this name in scope match the target type
> g:/Temp/Test/mozilla/xpcom/base/nsStackFrameWin.cpp(380) : error C2664:
> 'BOOL (H
> ANDLE,PENUMLOADED_MODULES_CALLBACK64,PVOID)' : cannot convert parameter 2
> from '
> overloaded-function' to 'PENUMLOADED_MODULES_CALLBACK64'
>         None of the functions with this name in scope match the target type
> make[3]: *** [nsStackFrameWin.obj] Error 2
> make[3]: Leaving directory `/g/Temp/Test/mozilla/xpcom/base'
> make[2]: *** [libs] Error 2
> make[2]: Leaving directory `/g/Temp/Test/mozilla/xpcom'
> make[1]: *** [tier_2] Error 2
> make[1]: Leaving directory `/g/Temp/Test/mozilla'
> make: *** [default] Error 2
> 
> How can I solve these problems?
> 
> My system information:
> "Mozilla tools directory: C:\mozilla-build\"
> Windows SDK directory: C:\Program Files\Microsoft SDKs\Windows\v6.0A\
> Windows SDK version: 6.0A
> Setting environment for using Microsoft Visual Studio 2005 x86 tools.
> Mozilla build environment: MSVC version 8.
> Microsoft Windows XP [Ver 5.1.2600.5512] Service Pack 3
> Microsoft Visual Studio 2005 8.0.50727.42
> 
> Samuel
> Zeeis Team
> http://www.zeeis.com/
Problem is that you have different windows sdk, but it is solvable.
I've successfully compiled tb2 with win6.0 sdk and with msvc8.

you have to add an explicit type conversion on that line
line 330:       enumRes = _EnumerateLoadedModules(aProcess, 
(PENUMLOADED_MODULES_CALLBACK)callbackEspecial, (PVOID)&aAddr);

line 380:         enumRes = _EnumerateLoadedModules64(aProcess, 
(PENUMLOADED_MODULES_CALLBACK64)callbackEspecial64, (PVOID)&aAddr);


you will also need to modify you have to disable some typedefs:
netwerk\system\win32\nsNotifyAddrListener.cpp:

#if 0
typedef enum {
     IpPrefixOriginOther = 0,
     IpPrefixOriginManual,
     IpPrefixOriginWellKnown,
     IpPrefixOriginDhcp,
     IpPrefixOriginRouterAdvertisement
} IP_PREFIX_ORIGIN;
#endif
typedef NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN;
#if 0
typedef enum {
     IpSuffixOriginOther = 0,
     IpSuffixOriginManual,
     IpSuffixOriginWellKnown,
     IpSuffixOriginDhcp,
     IpSuffixOriginLinkLayerAddress,
     IpSuffixOriginRandom
} IP_SUFFIX_ORIGIN;
#endif

typedef NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN;

#if 0
typedef enum {
     IpDadStateInvalid    = 0,
     IpDadStateTentative,
     IpDadStateDuplicate,
     IpDadStateDeprecated,
     IpDadStatePreferred
} IP_DAD_STATE;
#endif


#if 0
typedef enum {
     IfOperStatusUp = 1,
     IfOperStatusDown,
     IfOperStatusTesting,
     IfOperStatusUnknown,
     IfOperStatusDormant,
     IfOperStatusNotPresent,
     IfOperStatusLowerLayerDown
} IF_OPER_STATUS;
#endif


you will encountered with crash during build in xpidl because it is 
linked without microsoft manifest.

When I built it I also changed WINVER in configure.* to 
AC_DEFINE_UNQUOTED(WINVER,0x500).

PM-
0
Pavol
7/31/2009 11:30:06 AM
Reply: