Closed Bug 505289 Opened 11 years ago Closed 11 years ago

Build fails on Vista or later with UAC enabled


(Firefox Build System :: General, defect)

Windows 7
Not set


(Not tracked)



(Reporter: emk, Assigned: emk)




(4 files)

link -NOLOGO -OUT:nsinstall.exe -PDB:nsinstall.pdb host_nsinstall_win.obj
k:/home/trunk/src/ff-opt/config/nsinstall -m 644 ../mozilla-config.h /k/home/tru
nk/src/config/nsStaticComponents.h  ../dist/include
make[4]: execvp: k:/home/trunk/src/ff-opt/config/nsinstall: Bad file number
make[4]: *** [export] Error 127
make[4]: Leaving directory `/k/home/trunk/src/ff-opt/config'
make[3]: *** [export_tier_base] Error 2
make[3]: Leaving directory `/k/home/trunk/src/ff-opt'
make[2]: *** [tier_base] Error 2
make[2]: Leaving directory `/k/home/trunk/src/ff-opt'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/k/home/trunk/src/ff-opt'
make: *** [build] Error 2

nsinstall should have an asInvoker manifest.
Huh, I thought our build system did this by default... ted?
__COMPAT_LAYER=RunAsInvoker make -f build
What version of MSVC are you using? Using MSVC8 and MSVC9, there is an embedded manifest in nsinstall.exe and things work fine with UAC (I did test this!)
Using MSVC8 Pro.
Clobbering tree didn't help.
It may be a Win7/x64 only issue.
OS: Windows Vista → Windows 7
Hardware: All → x86_64
Works fine using MSVC9. MSVC9 seems to add manifest automatically.
The manifest should be added by our code:

Can you remove the @ from that line (to un-hide the command) and see if it is actually being run?
(In reply to comment #6)
mt.exe was executed:
link -NOLOGO -OUT:nsinstall.exe -PDB:nsinstall.pdb host_nsinstall_win.obj
if test -f nsinstall.exe.manifest; then \
                mt.exe -NOLOGO -MANIFEST nsinstall.exe.manifest -OUTPUTRESOURCE:
nsinstall.exe\;1; \
                rm -f nsinstall.exe.manifest; \
But nsinstall.exe.manifest didn't contain the requestedExecutionLevel.
I've removed "rm -f $@.manifest; \" line to get this.
Attachment #389541 - Attachment mime type: application/octet-stream → application/xml
Benjamin, what's your linker version?
Here is my MSVC8 configuration:
$ link
Microsoft (R) Incremental Linker Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.
$ where link
c:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\link.exe

This linker do not have a /MANIFESTUAC flag.
MANIFESTUAC is new in VC9.
(In reply to comment #11)
So MSVC8 linker didn't have tha ability to add requestedExecutionLevel to manifest. If nsinstall works with MSVC8, where did requestedExecutionLevel come from?
If you want that in your manifest, you need to have a manifest in the srcdir, ala:
ted, would that be nsinstall.exe.manifest?
Yeah, but I think you'll have to fix, since it doesn't seem to support that for HOST_PROGRAM:
Attached patch like this?Splinter Review
This patch fixed the problem for me.
Assignee: nobody → VYV03354
Attachment #390095 - Flags: review?(ted.mielczarek)
The new manifest files are deleted each time the build runs.

Worse that that is that the patch does not seem to fix this issue for me.
The manifest file won't be added when building incrementally. Try make clean and then make in both objdir/config and objdir/js/src/config
That's what I did. 

Copying the nsinstall.exe from mozilla-build into these directories works as a workaround although make clean will remove it each time.
Strange, I just started a new Firefox debug build with the patch applied and it has so far made it well beyond the point it was failing in config. I've also done a make clean / make in objdir/config and objdir/js/src/config on a Firefox optimized build and it added the manifest to both of these files.
Maybe it's because I'm doing a srcdir build then?
I'm using an object dir outside of my source dir so that is entirely possible... I'll try it out.
I just tried an objdir build and that works fine.
I can confirm that the patch doesn't work without an objdir and that the manifest files are deleted.
The manifest stuff didn't work with a srcdir build from the beginning. (see bug 330231)
So I don't consider about that. Please file a follow-up bug if you care. See comment #2 about a workaround.
Comment on attachment 390095 [details] [diff] [review]
like this?

Looks good, thanks.
Attachment #390095 - Flags: review?(ted.mielczarek) → review+
Keywords: checkin-needed
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Does the patch really fix this bug? I cannot build on Vista x64 with VC9 and MozillaBuild1.4.

If I try to execute ($dist)/config/nsinstall.exe from explorer, I look the error dialog which said the applicaiton's side-by-side is invalid (I'm not sure the actual message on English Windows).

Note that I also can reproduce it when I execute it as administrator.
(In reply to comment #28)
I don't confirm yet, but it should be a different problem.
My problem was that explorer displayed a UAC dialog. (not a side-by-side configuration error dialog.)
Please file a new bug about your problem.
When I backed out the patch and removed ($dist)/config/nsinstall.exe, I can build it. Doesn't the patch has a bug?
I guess we need to add /MANIFESTUAC:NO (as bug 419665 did) for HOST_PROGRAM.
I still think it's better to open a new bug and block this bug.
(In reply to comment #31)
> I guess we need to add /MANIFESTUAC:NO (as bug 419665 did) for HOST_PROGRAM.
> I still think it's better to open a new bug and block this bug.

see bug 508202.
Flags: in-testsuite-
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
NB: I'm not sure c-c actually uses this atm, but just in (future) case.
Attachment #428643 - Flags: review?(bugspam.Callek)
Comment on attachment 428643 [details] [diff] [review]
(Bv1-CC) Copy (the useful part of) it to comm-central
[Checkin: Comment 35]

We do: seamonkey.exe.manifest thunderbird.exe.manifest and sunbird.exe.manifest
Attachment #428643 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 428643 [details] [diff] [review]
(Bv1-CC) Copy (the useful part of) it to comm-central
[Checkin: Comment 35]
Attachment #428643 - Attachment description: (Bv1-CC) Copy (the useful part of) it to comm-central → (Bv1-CC) Copy (the useful part of) it to comm-central [Checkin: Comment 35]
Duplicate of this bug: 374373
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.