Closed Bug 447603 Opened 17 years ago Closed 17 years ago

SeaMonkey static build fails with Win32 PGO

Categories

(SeaMonkey :: Build Config, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: swsnyder, Unassigned)

Details

Attachments

(1 file)

SeaMonkey can successfully be built statically ("ac_add_options --enable-static --disable-shared") and it can be sucessfully built doing the usual shared build with VS2005/SP1 PGO optimization. The build fails when both build types are used. In a static build the initial compilation and linking work correctly. Then the program is run to generate the profiling data. No problems seen in program functionality. The failure occurs in the final relinking step. Here's the error seen in context: c:\mozbuild\obj-seamonkey\dist\include\string\nstsubstring.h(329) : warning C4952: 'nsACString_internal::AssignLiteral<17>' : no profile data found in program database 'seamonkey.pgd' c:\mozbuild\obj-seamonkey\dist\include\xpcom\nscomptr.h(779) : warning C4952: 'nsCOMPtr<nsIStringInputStream>::operator=' : no profile data found in program database 'seamonkey.pgd' c:\mozbuild\obj-seamonkey\dist\include\xpcom\nscomptr.h(712) : warning C4952: 'nsCOMPtr<nsIEventTarget>::operator=' : no profile data found in program database 'seamonkey.pgd' c:\mozbuild\obj-seamonkey\dist\include\string\nstsubstring.h(263) : error C2220: warning treated as error - no 'executable' file generated c:\mozbuild\obj-seamonkey\dist\include\string\nstsubstring.h(263) : warning C4952: 'nsACString_internal::EqualsLiteral<5>' : no profile data found in program database 'seamonkey.pgd' c:\mozbuild\obj-seamonkey\dist\include\xpcom\nscomptr.h(762) : warning C4952: 'nsCOMPtr<nsIObserverService>::operator=' : no profile data found in program database 'seamonkey.pgd' c:\mozbuild\obj-seamonkey\dist\include\xpcom\nscomptr.h(930) : warning C4952: 'nsCOMPtr<nsINestedURI>::get_DerivedSafe' : no profile data found in program database 'seamonkey.pgd' The linker output continues, reporting other items that were not touched during the profiling run. The build ends with these final lines of output: LINK : fatal error LNK1257: code generation failed make[6]: *** [seamonkey.exe] Error 233 make[6]: Leaving directory `/c/mozbuild/obj-seamonkey/suite/app' make[5]: *** [libs] Error 2 make[5]: Leaving directory `/c/mozbuild/obj-seamonkey/suite' make[4]: *** [libs_tier_app] Error 2 make[4]: Leaving directory `/c/mozbuild/obj-seamonkey' make[3]: *** [tier_app] Error 2 make[3]: Leaving directory `/c/mozbuild/obj-seamonkey' make[2]: *** [default] Error 2 make[2]: Leaving directory `/c/mozbuild/obj-seamonkey' make[1]: *** [build] Error 2 make[1]: Leaving directory `/c/mozbuild/mozilla' make: *** [profiledbuild] Error 2
I've seen this on Firefox too, which is why we added this: http://mxr.mozilla.org/mozilla-central/source/configure.in#2033 I wonder if adding those to PROFILE_GEN-CFLAGS as well would help this? I find that PGO is very underdocumented, and the compiler behavior can be a bit weird.
(In reply to comment #1) > I've seen this on Firefox too, which is why we added this: > http://mxr.mozilla.org/mozilla-central/source/configure.in#2033 And the addition of the 'PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"' fixed the problem seen in Firefox? If so, I wonder why it doesn't fix apparently the same problem in SeaMonkey.
Apparently it still occurs occasionally, so I don't know that it really fixed it.
This patch fixes the problem of a legitimate warning being treated as an error in Win32/PGO relinking of a static build of SeaMonkey. Strictly speaking, it is really not a fix but a work-around for an apparent VS2005/SP1 bug. It is not enough to disable the warnings at re-linking time. Attempting to do this causes the compile to complain, fatally, that the original build was done with different options. This patch disables the warnings for the original compilation.
Status: NEW → ASSIGNED
SeaMonkey is not currently set up to support PGO in our builds. That and your patch is against mozilla/ (which is mozilla-cenrtal). I recommend WONTFIX for now, once we decide to support PGO we will be sure to include the same set build features as implemented in m-c for Firefox.
yes, PGO is bascially unsupported for SeaMonkey right now, additionally, static builds are not supported at the moment, so I'd also call out a WONTFIX for this right now. Once we change to support static builds and PGO, we'll need to revisit this, but we'll probably just copy Firefox code then.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: