I am trying to build NSPR version greater than 4.2 on windows.
I understand cygwin is the only way to build this.
I have Visual Studio 6.0 on my machine. I have tried both on a Windows XP
and Windows Vista machine.
When i do a build as described on the build web page, I get a error at the
final link step.
link: invalid option -- n
Try `link --help' for more information.
c:\moztools\bin\gmake.exe[2]: *** [libnspr4.dll] Error 1
c:\moztools\bin\gmake.exe[2]: Leaving directory
`c:/work/nss-3.11.4-with-nspr-4.
6.4.tar/nss-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/target/pr/src'
c:\moztools\bin\gmake.exe[1]: *** [export] Error 2
c:\moztools\bin\gmake.exe[1]: Leaving directory
`c:/work/nss-3.11.4-with-nspr-4.
6.4.tar/nss-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/target/pr'
c:\moztools\bin\gmake.exe: *** [export] Error 2
I have tried building version 4.6.4 and version 4.6.7. both give me the same
link error.
Can anyone help with this issue and suggest how to build NSPR(version 4.2
and higher) successfully on windows.
Also in Cygwin, during an NSPR build, which compiler does it use. And how is
this compiler configured.
I installed Visual Studio 2005 on my machine, but the results were same as
above.
Thanks
VT
On Wed, Jul 29, 2009 at 2:01 PM,
news.mozilla.org<vinu....@pass-consulting.com> wrote:
> Hi,
>
> I am trying to build NSPR version greater than 4.2 on windows.
>
> I understand cygwin is the only way to build this.
We also support MSYS now. I now recommend that you get MozillaBuild,
which includes MSYS and will set up everything for you.
> I have Visual Studio 6.0 on my machine. I have tried both on a Windows XP
> and Windows Vista machine.
>
> When i do a build as described on the build web page, I get a error at the
> final link step.
>
> link: invalid option -- n
> Try `link --help' for more information.
Most likely, you are using Cygwin's "link" rather than Visual C++'s "link".
Please adjust your PATH environment variable so that "link" is Visual
C++'s "link".
Wan-Teh
thanks for your suggestion. Now the build goes fine with cygwin.
I also want to build NSS. So i downloaded nss-3.11.4-with-nspr-4.6.4.
Now, after your suggestion, i have built NSPR-4.6.4 successfully.
But doing the nss-3.11.4 build according to the
http://www.mozilla.org/projects/security/pki/nss/nss-3.11.4/nss-3.11.4-build.html
FAILS.
I do this build from a windows command line using the Netscape wintools.
process_begin: CreateProcess((null), pwd, ...) failed.
process_begin: CreateProcess((null), pwd, ...) failed.
cd ../coreconf ; gmake
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[1]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/coreconf'
cd nsinstall; gmake export
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[2]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/coreconf/nsinstall'
gmake[2]: Nothing to be done for `export'.
gmake[2]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/coreconf/nsinstall'
cd nsinstall; gmake libs
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[2]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/coreconf/nsinstall'
gmake[2]: Nothing to be done for `libs'.
gmake[2]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/coreconf/nsinstall'
gmake[1]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/coreconf'
cd ../../nsprpub/WINNT5.1_OPT.OBJ ; gmake
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[1]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ'
cd config; gmake -j1 export
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[2]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/config'
rm -f ../dist/bin/nspr-config
gmake[2]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/config'
cd pr; gmake -j1 export
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[2]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/pr'
cd include; gmake export
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[3]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/pr/include'
cd md; gmake export
process_begin: CreateProcess((null), pwd, ...) failed.
gmake[4]: Entering directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/ns
s-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/pr/include/
md'
sh ../../../../build/cygwin-wrapper nsinstall -m 444
../../../../pr/include/md/_
aix32.cfg ../../../../pr/include/md/_aix64.cfg
../../../../pr/include/md/_beos.c
fg ../../../../pr/include/md/_bsdi.cfg ../../../../pr/include/md/_darwin.cfg
../
../../../pr/include/md/_dgux.cfg ../../../../pr/include/md/_freebsd.cfg
../../..
/../pr/include/md/_hpux32.cfg ../../../../pr/include/md/_hpux64.cfg
../../../../
pr/include/md/_irix32.cfg ../../../../pr/include/md/_irix64.cfg
../../../../pr/i
nclude/md/_linux.cfg ../../../../pr/include/md/_ncr.cfg
../../../../pr/include/m
d/_nec.cfg ../../../../pr/include/md/_netbsd.cfg
../../../../pr/include/md/_next
step.cfg ../../../../pr/include/md/_nto.cfg
../../../../pr/include/md/_openbsd.c
fg ../../../../pr/include/md/_openvms.cfg ../../../../pr/include/md/_os2.cfg
../
../../../pr/include/md/_osf1.cfg ../../../../pr/include/md/_qnx.cfg
../../../../
pr/include/md/_reliantunix.cfg ../../../../pr/include/md/_rhapsody.cfg
../../../
../pr/include/md/_riscos.cfg ../../../../pr/include/md/_scoos.cfg
../../../../pr
/include/md/_solaris.cfg ../../../../pr/include/md/_sony.cfg
../../../../pr/incl
ude/md/_sunos4.cfg ../../../../pr/include/md/_unixware.cfg
../../../../pr/includ
e/md/_unixware7.cfg ../../../../pr/include/md/_win16.cfg
../../../../pr/include/
md/_win95.cfg ../../../../pr/include/md/_winnt.cfg
../../../../pr/include/md/_ai
x.h ../../../../pr/include/md/_beos.h ../../../../pr/include/md/_bsdi.h
../../..
/../pr/include/md/_darwin.h ../../../../pr/include/md/_dgux.h
../../../../pr/inc
lude/md/_freebsd.h ../../../../pr/include/md/_hpux.h
../../../../pr/include/md/_
irix.h ../../../../pr/include/md/_linux.h ../../../../pr/include/md/_macos.h
../
../../../pr/include/md/_ncr.h ../../../../pr/include/md/_nec.h
../../../../pr/in
clude/md/_netbsd.h ../../../../pr/include/md/_nextstep.h
../../../../pr/include/
md/_nspr_pthread.h ../../../../pr/include/md/_nto.h
../../../../pr/include/md/_o
penbsd.h ../../../../pr/include/md/_openvms.h
../../../../pr/include/md/_os2.h .
./../../../pr/include/md/_os2_errors.h ../../../../pr/include/md/_osf1.h
../../.
./../pr/include/md/_pcos.h ../../../../pr/include/md/_pth.h
../../../../pr/inclu
de/md/_qnx.h ../../../../pr/include/md/_reliantunix.h
../../../../pr/include/md/
_rhapsody.h ../../../../pr/include/md/_riscos.h
../../../../pr/include/md/_scoos
.h ../../../../pr/include/md/_solaris.h ../../../../pr/include/md/_sony.h
../../
../../pr/include/md/_sunos4.h ../../../../pr/include/md/_unix_errors.h
../../../
../pr/include/md/_unixos.h ../../../../pr/include/md/_unixware.h
../../../../pr/
include/md/_win16.h ../../../../pr/include/md/_win32_errors.h
../../../../pr/inc
lude/md/_win95.h ../../../../pr/include/md/_winnt.h
../../../../pr/include/md/pr
osdep.h ../../../../pr/include/md/sunos4.h ../../../dist/include/nspr/md
process_begin: CreateProcess((null), sh ../../../../build/cygwin-wrapper
nsinsta
ll -m 444 ../../../../pr/include/md/_aix32.cfg
../../../../pr/include/md/_aix64.
cfg ../../../../pr/include/md/_beos.cfg ../../../../pr/include/md/_bsdi.cfg
../.
./../../pr/include/md/_darwin.cfg ../../../../pr/include/md/_dgux.cfg
../../../.
./pr/include/md/_freebsd.cfg ../../../../pr/include/md/_hpux32.cfg
../../../../p
r/include/md/_hpux64.cfg ../../../../pr/include/md/_irix32.cfg
../../../../pr/in
clude/md/_irix64.cfg ../../../../pr/include/md/_linux.cfg
../../../../pr/include
/md/_ncr.cfg ../../../../pr/include/md/_nec.cfg
../../../../pr/include/md/_netbs
d.cfg ../../../../pr/include/md/_nextstep.cfg
../../../../pr/include/md/_nto.cfg
../../../../pr/include/md/_openbsd.cfg
../../../../pr/include/md/_openvms.cfg .
./../../../pr/include/md/_os2.cfg ../../../../pr/include/md/_osf1.cfg
../../../.
./pr/include/md/_qnx.cfg ../../../../pr/include/md/_reliantunix.cfg
../../../../
pr/include/md/_rhapsody.cfg ../../../../pr/include/md/_riscos.cfg
../../../../pr
/include/md/_scoos.cfg ../../../../pr/include/md/_solaris.cfg
../../../../pr/inc
lude/md/_sony.cfg ../../../../pr/include/md/_sunos4.cfg
../../../../pr/include/m
d/_unixware.cfg ../../../../pr/include/md/_unixware7.cfg
../../../../pr/include/
md/_win16.cfg ../../../../pr/include/md/_win95.cfg
../../../../pr/include/md/_wi
nnt.cfg ../../../../pr/include/md/_aix.h ../../../../pr/include/md/_beos.h
../..
/../../pr/include/md/_bsdi.h ../../../../pr/include/md/_darwin.h
../../../../pr/
include/md/_dgux.h ../../../../pr/include/md/_freebsd.h
../../../../pr/include/m
d/_hpux.h ../../../../pr/include/md/_irix.h
../../../../pr/include/md/_linux.h .
./../../../pr/include/md/_macos.h ../../../../pr/include/md/_ncr.h
../../../../p
r/include/md/_nec.h ../../../../pr/include/md/_netbsd.h
../../../../pr/include/m
d/_nextstep.h ../../../../pr/include/md/_nspr_pthread.h
../../../../pr/include/m
d/_nto.h ../../../../pr/include/md/_openbsd.h
../../../../pr/include/md/_openvms
.h ../../../../pr/include/md/_os2.h ../../../../pr/include/md/_os2_errors.h
../.
./../../pr/include/md/_osf1.h ../../../../pr/include/md/_pcos.h
../../../../pr/i
nclude/md/_pth.h ../../../../pr/include/md/_qnx.h
../../../../pr/include/md/_rel
iantunix.h ../../../../pr/include/md/_rhapsody.h
../../../../pr/include/md/_risc
os.h ../../../../pr/include/md/_scoos.h ../../../../pr/include/md/_solaris.h
../
../../../pr/include/md/_sony.h ../../../../pr/include/md/_sunos4.h
../../../../p
r/include/md/_unix_errors.h ../../../../pr/include/md/_unixos.h
../../../../pr/i
nclude/md/_unixware.h ../../../../pr/include/md/_win16.h
../../../../pr/include/
md/_win32_errors.h ../../../../pr/include/md/_win95.h
../../../../pr/include/md/
_winnt.h ../../../../pr/include/md/prosdep.h
../../../../pr/include/md/sunos4.h
../../../dist/include/nspr/md, ...) failed.
make (e=2): The system cannot find the file specified.
gmake[4]: *** [export] Error 2
gmake[4]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/pr/include/m
d'
gmake[3]: *** [export] Error 2
gmake[3]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/pr/include'
gmake[2]: *** [export] Error 2
gmake[2]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ/pr'
gmake[1]: *** [export] Error 2
gmake[1]: Leaving directory
`C:/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/nsprpub/WINNT5.1_OPT.OBJ'
gmake: *** [build_nspr] Error 2
Can you suggest something by looking at the above error log.
Thanks
Vinu
"Wan-Teh Chang" <w...@google.com> wrote in message
news:mailman.765.124890221...@lists.mozilla.org...
I have seen this kind of problem before. I seem to remember it
is caused by using the gmake.exe from the Netscape wintools
with Cygwin's sh.exe. If so, the fix is to use Cygwin's make.exe
instead. Again, you may need to adjust your PATH environment
variable so that "make.exe" is Cygwin's make.exe.
This is why I now recommend MozillaBuild -- it takes care of
everything for you. You don't need to install Cygwin or
Netscape wintools, and you don't need to worry about the
PATH environment variable.
Wan-Teh
I am now trying to build NSS3.11.4 with MozillaBuild.
But NSS3.11.4 is dependent on NSPR4.6.4 and needs its include and lib files.
So when i start start-msvc8.bat from MozillaBuild, the include files and lib
files are not set properly and i always get
make[2]: Entering directory
`/c/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss
-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/nss/lib/util'
cl -FoWINNT5.1_DBG.OBJ/quickder.obj -c -Od -Z7 -MD -W3 -nologo -GT -DXP_PC -DDEB
UG -D_DEBUG -UNDEBUG -DDEBUG_Administrator -DWIN32 -D_WINDOWS -D_X86_ -DWINNT
-I
../../../../dist/WINNT5.1_DBG.OBJ/include -I../../../../dist/public/nss -I../..
/../../dist/private/nss -I../../../../dist/public/dbm
/c/WORK/Software/nss-3.11
.4-with-nspr-4.6.4.tar/nss-3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/ns
s/lib/util/quickder.c
quickder.c
c:\work\software\nss-3.11.4-with-nspr-4.6.4.tar\nss-3.11.4-with-nspr-4.6.4\nss-3
.11.4\mozilla\security\nss\lib\util\secasn1.h(48) : fatal error C1083:
Cannot op
en include file: 'plarena.h': No such file or directory
make[2]: *** [WINNT5.1_DBG.OBJ/quickder.obj] Error 2
make[2]: Leaving directory
`/c/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss-
3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/nss/lib/util'
make[1]: *** [libs] Error 2
make[1]: Leaving directory
`/c/WORK/Software/nss-3.11.4-with-nspr-4.6.4.tar/nss-
3.11.4-with-nspr-4.6.4/nss-3.11.4/mozilla/security/nss/lib'
make: *** [libs] Error 2
Now, I am trying to set the INCLUDE and LIB environment variables so that
the NSPR include and lib files are picked up correctly.
But somehow, using "export" or using "set", I have been unsuccessful till
now.
Is there any other way to make NSS pick up the correct NSPR include and lib
files?
Thanks
Vinu
"Wan-Teh Chang" <w...@google.com> wrote in message
news:mailman.779.124890750...@lists.mozilla.org...
If you use nss-3.11.4-with-nspr-4.6.4.tar.gz, you can just say
cd mozilla/security/nss
make nss_build_all
And it will build first build NSPR and then build NSS. You
don't need to worry about setting LIB and INCLUDE.
Re: set or export
Use export if you're using bash. Use set if you're using
the Command Prompt.
Wan-Teh