Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"nsinstall: Bad file number" error while Building Mozilla Firefox on Windows Vista (32-bit)

72 views
Skip to first unread message

JawzX01

unread,
Aug 29, 2009, 1:48:32 PM8/29/09
to
Hello,

I've been attempting to build Firefox from Mozilla-Central on Windows
Vista for a little while now. I've been refraining from posting here
as I was thinking my issues simply needed to be resolved but I've come
to the point where I need help. I'm not sure where to start to fix
this latest error.

I've made several attempts and have followed the documentation as
thoroughly as possible. Here is my configuration -- everything I can
think of. I hope someone can help.

I've made a very simple .mozconfig file. It just has the following

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
ac_add_options --enable-application=browser
mk_add_options MOZ_CO_PROJECT=browser

I'm running on Windows Vista Ultimate SP1 32 bit. I'm not sure my
hardware is relevant but it's a AMD Athlon 64 X2 Dual Core 6000+ (3.0
GHz). 3 GBs of RAM and more than a 500 GB hard drive with more than
50% free.

I've either already had or installed the following:

- Mozilla Build System
- Windows SDK (6.0, 6.0A and then 6.1) which should be the Vista SDK
and Windows 2008 SDK*)
- Visual Studio 2008 Standard

*I installed the Windows 2008 SDK to resolve what this page mentions:
https://developer.mozilla.org/en/oleacc.idl

The error that was outputted is the following:

/bin/sh: c:/Users/Frank/Documents/hg-repos/firefox-src-hgRepo/mozilla-
fv-expirem
ent/obj-i686-pc-mingw32/config/nsinstall: Bad file number
make[7]: *** [libs] Error 126
make[7]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32/dom/tests/mochitest/dom-
level2-html'
make[6]: *** [libs] Error 2
make[6]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32/dom/tests/mochitest'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32/dom/tests'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32/dom'
make[3]: *** [libs_tier_gecko] Error 2
make[3]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32'
make[2]: *** [tier_gecko] Error 2
make[2]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
src-hgRepo
/mozilla-fv-expirement/obj-i686-pc-mingw32'
make: *** [build] Error 2

One other thing that I figure might be relevant is that I already had
MinGW and MSys installed. They are obviously installed elsewhere from
the Mozilla build system but I mention this because I figure there
could be a conflict.

JawzX01

unread,
Aug 29, 2009, 3:52:25 PM8/29/09
to

I just found this:
http://www.kevinbrosnan.net/mozilla-build-error-nsinstall-bad-file-number

It indicates that I need to run the start-msvc9.bat as an admin. I
tried this but I received the same error message. "/nsinstall: Bad
file number"

Mook

unread,
Aug 30, 2009, 1:37:41 AM8/30/09
to
JawzX01 wrote:
> On Aug 29, 12:48 pm, JawzX01 <jawz...@gmail.com> wrote:
>> Hello,
>>
>> I've been attempting to build Firefox from Mozilla-Central on Windows
>> Vista for a little while now. I've been refraining from posting here
>> as I was thinking my issues simply needed to be resolved but I've come
>> to the point where I need help. I'm not sure where to start to fix
>> this latest error.
>>

>> /bin/sh: c:/Users/Frank/Documents/hg-repos/firefox-src-hgRepo/mozilla-
>> fv-expirement/obj-i686-pc-mingw32/config/nsinstall: Bad file number


>> make[7]: *** [libs] Error 126
>> make[7]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
>> src-hgRepo

> I just found this:


> http://www.kevinbrosnan.net/mozilla-build-error-nsinstall-bad-file-number
>
> It indicates that I need to run the start-msvc9.bat as an admin. I
> tried this but I received the same error message. "/nsinstall: Bad
> file number"

Could you try running that nsinstall.exe from an unelevated Explorer (as
in, double clicking on the executable) and see what happens? It
shouldn't need elevation on m-c... If possible, please also try
extracting the manifest (open the .exe with visual studio as a file,
which should get you to its embedded resources; one of them will be some
sort of XML document)?

It's also possible that it has unrelated permission problems, in which
case the Explorer test should catch that.

--
Mook

JawzX01

unread,
Aug 30, 2009, 6:26:12 PM8/30/09
to
On Aug 30, 12:37 am, Mook <mook.moz

+nntp.news.mozilla....@gmail.com.please-avoid-direct-mail> wrote:
> JawzX01 wrote:
> > On Aug 29, 12:48 pm, JawzX01 <jawz...@gmail.com> wrote:
> >> Hello,
>
> >> I've been attempting to build Firefox from Mozilla-Central on Windows
> >> Vista for a little while now. I've been refraining from posting here
> >> as I was thinking my issues simply needed to be resolved but I've come
> >> to the point where I need help. I'm not sure where to start to fix
> >> this latest error.
>
> >> /bin/sh: c:/Users/Frank/Documents/hg-repos/firefox-src-hgRepo/mozilla-
> >> fv-expirement/obj-i686-pc-mingw32/config/nsinstall: Bad file number
> >> make[7]: *** [libs] Error 126
> >> make[7]: Leaving directory `/c/Users/Frank/Documents/hg-repos/firefox-
> >> src-hgRepo
> > I just found this:
> >http://www.kevinbrosnan.net/mozilla-build-error-nsinstall-bad-file-nu...

>
> > It indicates that I need to run the start-msvc9.bat as an admin. I
> > tried this but I received the same error message. "/nsinstall: Bad
> > file number"
>
> Could you try running that nsinstall.exe from an unelevated Explorer (as
> in, double clicking on the executable) and see what happens?  It
> shouldn't need elevation on m-c...  If possible, please also try
> extracting the manifest (open the .exe with visual studio as a file,
> which should get you to its embedded resources; one of them will be some
> sort of XML document)?
>
> It's also possible that it has unrelated permission problems, in which
> case the Explorer test should catch that.
>
> --
> Mook

Thank you very much for your reply. I've attempted to do what you
said. When I double click it in explorer, a command window opens and
closes immediately. I then tried to execute the command via a normal-
level command window. The program returns nsinstall: not enough
arguments.

If I pass two arguments, it completes with success. It seems to copy
files; I also see the results in explorer.

Here is the XML i've extracted from the binary:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
name="something" type="win32"></assemblyIdentity>
<description>Description of your application</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"
uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

Given what you've shown me, I think you've lead me to believe that it
isn't a permissions error... at least not with regards to
nsinstall.exe. Possibly another file or path that it is access...

Mook

unread,
Aug 30, 2009, 9:35:09 PM8/30/09
to
JawzX01 wrote:

> Thank you very much for your reply. I've attempted to do what you
> said. When I double click it in explorer, a command window opens and
> closes immediately. I then tried to execute the command via a normal-
> level command window. The program returns nsinstall: not enough
> arguments.

> Given what you've shown me, I think you've lead me to believe that it


> isn't a permissions error... at least not with regards to
> nsinstall.exe. Possibly another file or path that it is access...
>

Yep, it all sounds like nsinstall itself is fine. This is going to
sound ridiculous, but please try rebuilding with a much, much shorter
absolute path; some parts of msys still depend on MAX_PATH, which is
absurdly small. The DOM mochitests to happen to have long names, too...

--
Mook

JawzX01

unread,
Aug 31, 2009, 2:10:04 PM8/31/09
to
On Aug 30, 8:35 pm, Mook <mook.moz


No, that doesn't sound ridiculous. I've been considering trying that
for a while but for some reason never quite got to it. I'll give it a
try tonight (I'm "working" right now :-) ).

Thank you.And if you think of anything else I could try, please post
it. I'm open to almost anything right now... I'll follow up once I
have new information.

JawzX01

unread,
Sep 1, 2009, 11:00:04 AM9/1/09
to
On Aug 30, 8:35 pm, Mook <mook.moz
+nntp.news.mozilla....@gmail.com.please-avoid-direct-mail> wrote:

This did solve the problem. Thank you very much for your input and
time. Once moved the folder to my C:\ drive and redid the build, I
received a working debug binary.

0 new messages