Closed
Bug 332088
Opened 19 years ago
Closed 19 years ago
Updater should use static libs on Windows
Categories
(Toolkit :: Application Update, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: volkmarkostka, Assigned: regis.caspar+bz)
Details
Attachments
(2 files, 2 obsolete files)
4.25 KB,
text/plain
|
Details | |
2.38 KB,
patch
|
darin.moz
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060328 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060328 Firefox/1.6a1
The partial update tries to replace/update the DLL msvcr80.dll. The problem is that the upadter istself uses that DLL so it can not be updated. This prevents any updates - at least for W2K.
Reproducible: Always
Steps to Reproduce:
1. Download an update (partial for me)
2. Try to install it.
Actual Results:
Update fails because mscvr80.dll can not be pathced/replaced.
Expected Results:
Update works.
Trunk builds (cairo + places)
Comment 1•19 years ago
|
||
Updater should be linked USE_STATIC_LIBS = 1
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•19 years ago
|
||
-> me
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → Firefox 2 alpha2
Updated•19 years ago
|
Priority: P1 → P2
Assignee | ||
Comment 3•19 years ago
|
||
(In reply to comment #1)
> Updater should be linked USE_STATIC_LIBS = 1
Tried that and it's OK only if you have a static version of libmar and libbz2, so there is a need to double compile libmar and libbz2 if they are used by something else.
Comment 4•19 years ago
|
||
Are they?
Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> Are they?
(according to my buildlog)
libbz2 -> used by updater.exe
libmar -> used by mar.exe and by updater.exe
Comment 6•19 years ago
|
||
I think bsmedberg was asking if those libraries were used by something else. The answer today is no. Necko will eventually start linking to libbz2.
Assignee | ||
Comment 7•19 years ago
|
||
patch adding "USE_STATIC_LIBS=1" to updater, libmar and libbz2 Makefile.in if target OS is WINNT.
Updated•19 years ago
|
Attachment #216679 -
Flags: review?(darin)
Comment 8•19 years ago
|
||
A more interesting question is why the update system thinks it needs to patch msvcr80.dll and msvcp80.dll in the first place. A partial update generation bug?
Also, the suggested patch presumably increases the size of updater.exe considerably (to the detriment of download size). A better solution would be to copy the dll's needed into <install_dir>\updates\0 along with the updater.exe. On my machine, where the runtime VC8 dll's are not installed at a system level, I need to manually copy in msvcr80.dll and Microsoft.VC80.CRT.manifest for an update to apply cleanly.
Comment 9•19 years ago
|
||
The static CRT is not a big codesize hit. We update the CRT as part of the update because we are shipping the local CRT and it might change in the future (it probably will, in fact).
Comment 10•19 years ago
|
||
(In reply to comment #9)
> ... We update the CRT as part of the
> update because we are shipping the local CRT and it might change in the future
> (it probably will, in fact).
You mean that a later version of the runtimes will probably be shipped in the future ? So, unless I was unlucky, why did msvcr80.dll and msvcp80.dll need to be updated in the attached manifest? Are the runtime dll's somehow generated or modified in the build process?
Also, my experience was a little different to the reporter - the updater didn't even run without msvcr80.dll and Microsoft.VC80.CRT.manifest
Assignee | ||
Comment 11•19 years ago
|
||
(In reply to comment #9)
> The static CRT is not a big codesize hit. We update the CRT as part of the
> update because we are shipping the local CRT and it might change in the future
> (it probably will, in fact).
They already have??
DLLs shipped with firefox: v8.0.50727.42
DLLs in WinSxS here: v8.0.50727.49 (from winupdate?)
Assignee | ||
Comment 12•19 years ago
|
||
There was missing changes for mar.exe
Attachment #216679 -
Attachment is obsolete: true
Attachment #218303 -
Flags: review?
Attachment #216679 -
Flags: review?(darin)
Comment 13•19 years ago
|
||
The second patch compiles ok with MSVC 6 (the first did not); updater.exe goes from 128KB to 188KB.
bsmedberg, are you best placed to review ? Or darin ? Now that software update for nightlies is back in action on the trunk I suspect that the updater failing is going to start hurting testers.
Assignee | ||
Comment 14•19 years ago
|
||
(In reply to comment #13)
> The second patch compiles ok with MSVC 6 (the first did not); updater.exe goes
> from 128KB to 188KB.
Thanks for the testing, I tested myself with VC 2005 Express and updater.exe was 209Ko (with common control manifest through, see #330231).
Is this really a windows-specific issue? I would think we want the updater to be linked statically on all platforms... Otherwise we may run into a few 'libfoo not found' errors in the future on mac/linux as well.
Updating summary.
Summary: Updater tries to update a DLL it uses itself. (msvcr80.dll) → Updater should be statically linked
Updated•19 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Comment 16•19 years ago
|
||
bent, linked statically against what? linux/mac have standardized glibc dependencies that aren't going to change.
Really? So we gain nothing (in terms of stability) from defining USE_STATIC_LIBS on those platforms?
Comment 18•19 years ago
|
||
USE_STATIC_LIBS doesn't do anything except on windows.
/me slaps forehead.
In that case let's get this fixed up... for Windows :)
OS: All → Windows 2000
Hardware: All → PC
Summary: Updater should be statically linked → Updater should use static libs on Windows
Updated•19 years ago
|
Attachment #218303 -
Flags: review? → review?(benjamin)
Updated•19 years ago
|
Attachment #218303 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 20•19 years ago
|
||
Now that this patch has review (thanks Benjamin), do I need to do something else (request super-review, request check-in)?
Updated•19 years ago
|
Assignee: nobody → regis.caspar+bz
Status: ASSIGNED → NEW
Comment 21•19 years ago
|
||
I got the following error when trying to apply the patch:
mozilla> patch -p0 --dry-run < /c/temp/updater-link-1.diff
(Stripping trailing CRs from patch.)
patching file toolkit/mozapps/update/src/updater/Makefile.in
(Stripping trailing CRs from patch.)
patching file modules/libmar/src/Makefile.in
patch: **** malformed patch at line 32: Index: modules/libbz2/src/Makefile.in
Comment 22•19 years ago
|
||
It's trivial to fix - change:
@@ -47,6 +47,9 @@
to:
@@ -47,5 +47,8 @@
Assignee | ||
Comment 23•19 years ago
|
||
(In reply to comment #21)
> I got the following error when trying to apply the patch:
>
> mozilla> patch -p0 --dry-run < /c/temp/updater-link-1.diff
> (Stripping trailing CRs from patch.)
> patching file toolkit/mozapps/update/src/updater/Makefile.in
> (Stripping trailing CRs from patch.)
> patching file modules/libmar/src/Makefile.in
> patch: **** malformed patch at line 32: Index: modules/libbz2/src/Makefile.in
Oops, seems like I removed a blank line by mistake when doing patches concatenation.. Thanks Darin. Updated version:
$ patch -p0 -R --dry-run < ../patches/bug332088-2.patch
patching file `toolkit/mozapps/update/src/updater/Makefile.in'
patching file `modules/libmar/src/Makefile.in'
patching file `modules/libbz2/src/Makefile.in'
patching file `modules/libmar/tool/Makefile.in
Attachment #218303 -
Attachment is obsolete: true
Attachment #218554 -
Flags: review?
Comment 24•19 years ago
|
||
fixed-on-trunk
Is this needed for FF2 (i.e., the MOZILLA_1_8_BRANCH)?
Comment 25•19 years ago
|
||
marking FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Attachment #218554 -
Flags: review? → review+
Assignee | ||
Comment 26•19 years ago
|
||
(In reply to comment #24)
> fixed-on-trunk
> Is this needed for FF2 (i.e., the MOZILLA_1_8_BRANCH)?
Thanks Darin,
I don't think this is needed on Branch (this was due to MS VC2005 runtime) because Branch doesn't use this runtime (i.e. msvc*80.dll).
But I'm not 100% sure...
Comment 27•19 years ago
|
||
Verified fixed updating from
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060417 Firefox/3.0a1 ID:2006041705 [cairo]
to
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060419 Firefox/3.0a1 ID:2006041905 [cairo]
[Tinderbox configuration glitch on gaius is the reason for the two day jump]
Updated•18 years ago
|
Target Milestone: Firefox 2 alpha2 → Firefox 3 alpha1
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•