Closed Bug 241528 Opened 20 years ago Closed 19 years ago

Fix IE profile migration to work with free MS VC toolkit

Categories

(Firefox Build System :: General, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2

People

(Reporter: Waldo, Assigned: bryner)

References

()

Details

Attachments

(3 files, 1 obsolete file)

Over on Mozillazine a few people have gotten Firefox to build using *only* free
tools while still achieving binary compatibility through use of the free MS VC++
toolkit.  Building requires a manual patch, however to disable IE profile
migration (it horks the build).  It would be nice if this could be somehow fixed
so that building using a free setup is possible without requiring source tree hacks.

The patch mentioned in the forums is a hack specifically for the
situation/toolset and can't be used in the tree.

Here's the error text of the error encountered by one builder:


Creating library firefox.lib and object firefox.exp
brwsrcmp.lib(nsIEProfileMigrator.obj) : error LNK2019: unresolved external symbo
l "void __stdcall _com_issue_error(long)" (?_com_issue_error@@YGXJ@Z) referenced
 in function "public: __thiscall _bstr_t::Data_t::Data_t(unsigned short const *)
" (??0Data_t@_bstr_t@@QAE@PBG@Z)
brwsrcmp.lib(nsIEProfileMigrator.obj) : error LNK2019: unresolved external symbo
l "char * __stdcall _com_util::ConvertBSTRToString(unsigned short *)" (?ConvertB
STRToString@_com_util@@YGPADPAG@Z) referenced in function "public: char const *
__thiscall _bstr_t::Data_t::GetString(void)const " (?GetString@Data_t@_bstr_t@@Q
BEPBDXZ)
brwsrcmp.lib(nsIEProfileMigrator.obj) : error LNK2019: unresolved external symbo
l "void __stdcall _com_issue_errorex(long,struct IUnknown *,struct _GUID const &
)" (?_com_issue_errorex@@YGXJPAUIUnknown@@ABU_GUID@@@Z) referenced in function "
public: long __thiscall PSTORECLib::IPStore::ReadItem(unsigned long,struct _GUID
 *,struct _GUID *,unsigned short *,unsigned long *,unsigned char * *,struct PSTO
RECLib::_PST_PROMPTINFO *,unsigned long)" (?ReadItem@IPStore@PSTORECLib@@QAEJKPA
U_GUID@@0PAGPAKPAPAEPAU_PST_PROMPTINFO@2@K@Z)
firefox.exe : fatal error LNK1120: 3 unresolved externals
make[4]: *** [firefox.exe] Error 96
make[4]: Leaving directory `/cygdrive/c/mozilla/browser/app'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/browser'
make[2]: *** [tier_99] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla'
make: *** [build] Error 2
This is what I've been doing to get it to work under MSVC++ Toolkit.
http://tiermann.freehosting.net/Manual-IEMigration-Fix.txt

It definitely can't go into the tree, but it shows what needs to be skipped.
My suggestion is, possibly an option... ac_add_options
--disable-migration=IE,Opera,Etc.

This would help with future environments who have problems with IE migration.
So far, MingW and MSVC++ have had problems.
(Edit to comment #1)
Sorry.
http://tiermann.freehosting.net
Click the "take out" link
Freehosting.net doesn't support direct linking.

mmoy wrote in http://forums.mozillazine.org/viewtopic.php?p=1653125#1653125 that
you need the vccomsup.lib from the windows ddk to build Firefox with IE profile
migration. I asked a friend to verify that - he did, the Windows Server 2003 SP1
DDK contains vccomsup.lib.
So I've orded the DDK CD and now I am able to build Firefox with IE profile
migration. But it needs more than just this lib ...

I made a patch (one for current 2.0 TRUNK and one for MOZILLA_1_8_BRANCH) for a
proper build process.

What's patched? configure, nsModule.cpp, two makefiles and autoconf.mk

What does the patch?

1.) It checks for an env var called DDKLIB_PREFIX which needs to point to that
folder, which contains the vccomsup.lib

2.) checks if that path is in your $LIB

3.) checks if this folder contains vccomsup.lib

4.) defines CAN_IE_PROF_MIGRATION which is needed

If the env var is not set, than CAN_IE_PROF_MIGRATION is not set and IE profile
migration won't be included.

IMHO a much better solution than the hack mentioned in the forums.
Attached patch patch for TRUNK (2.0) (obsolete) — Splinter Review
Attachment #195528 - Flags: review?(bryner)
Wrong approach, IMHO.  The stumbling block is ConvertBSTRToString, and the
proper solution would be to avoid that call and write the equivalent code to
replace it.  Someone had already done that but I can't find the original
Mozillazine post to reference to.
What we need to do is replace the ConvertBSTRToString using code similar to
that attached.
Following up on what Phil said, it appears that we can get away with just implementing _com_issue_error() to avoid needing to link in comsupp.lib.  I didn't have to touch ConvertBSTRToString.  With this patch, I was able to finish the build using the free VC setup.  I verified that importing the IE settings into a new profile works.
Attachment #195528 - Attachment is obsolete: true
Attachment #201197 - Flags: review?(benjamin)
Attachment #195528 - Flags: review?(bryner)
Attachment #201197 - Flags: review?(benjamin) → review+
Attachment #201197 - Flags: superreview?(bugs)
Attachment #201197 - Flags: superreview?(bugs) → superreview?(bryner)
Comment on attachment 201197 [details] [diff] [review]
just implement _com_issue_error

Assuming this doesn't adversely affect the current build setup, sr=me.
Attachment #201197 - Flags: superreview?(bryner) → superreview+
The patch has been checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox1.6-
(In reply to comment #10)
> The patch has been checked in.
> 

check-in for branch would be great
Flags: blocking1.8.1?
Flags: blocking-aviary2?
not a blocker, but it'd be nice to get a fix for those devs using this toolkit.
Flags: blocking-firefox2? → blocking-firefox2-
Comment on attachment 201197 [details] [diff] [review]
just implement _com_issue_error

asking for branch approval.  This will help those (like me) who
need to build both 1.8.1 branch and trunk on a single Windows 2k box, the former with VC7 2003 toolkit and the latter with VC8 (express). I can't use VC6 for 1.8.1 branch any more because 2003 Feb version of PSDK necessary for VC6 cannot be installed side-by-side with the latest PSDF (apparently necessary for VC8 express). 

Of course, I've alrady applied the patch in my tree, but it took me quite a while to come here. By landing this patch in 1.8 branch, we can save them some time..
Attachment #201197 - Flags: approval-branch-1.8.1?
Comment on attachment 201197 [details] [diff] [review]
just implement _com_issue_error

asking for branch approval.  This will help those (like me) who
need to build both 1.8.1 branch and trunk on a single Windows 2k box, the former with VC7 2003 toolkit and the latter with VC8 (express). I can't use VC6 for 1.8.1 branch any more because 2003 Feb version of PSDK necessary for VC6 cannot be installed side-by-side with the latest PSDF (apparently necessary for VC8 express). 

Of course, I've alrady applied the patch in my tree, but it took me quite a while to come here. By landing this patch in 1.8 branch, we can save them some time..
sorry for bug spam (one of extensions installed in my firefox has been doing sth. strange with bugzilla cookie .....)
Comment on attachment 201197 [details] [diff] [review]
just implement _com_issue_error

a=shaver for branch.
Attachment #201197 - Flags: approval-branch-1.8.1? → approval-branch-1.8.1+
landed on the branch
Keywords: fixed1.8.1
What happened to the patch from comment 7 here?  It doesn't seem to have made it into 1_8_BRANCH?
Component: Build Config → General
Product: Firefox → Firefox Build System
Keywords: fixed1.8.1
Target Milestone: Firefox 2 → mozilla2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: