Re: NSS 3.47.1 build fail on windows

2020-01-08 Thread Martin Thomson
You shouldn't need to start the mozilla-build shell from within a VS
shell.  Our build uses vswhere and the registry to find the necessary
pieces.  That might be where things are going awry.

From looking at your output, you might want to check this path:
"/c/apps/MVS15/VC/Tools/MSVC/14.10.25017 /", which appears to have a
trailing space in our build output.  That comes from
${VCINSTALLDIR}/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt so
maybe our script is failing to prune out a trailing space or an extra empty
line from that file.  If that file has been modified manually, or we have
an errant carriage return or something like that, then we might need to
make some changes to ensure that we don't catch that.  (We use 'cat', but
we could use 'head -1' instead.)

If that fails, then you help by sharing the output of:

(export target_arch=x64; bash -x /coreconf/msvc.sh)

There will be a lot of paths listed.  You could help by seeing which of
those, if any, don't exist.  Most should.  It's possible however that the
script is failing to find something important.

On Sat, Dec 21, 2019 at 4:20 AM Usha Nayak  wrote:

> On Wednesday, December 11, 2019 at 9:28:17 AM UTC-6, Usha Nayak wrote:
> > Hello,
> >
> > I'm trying to build NSS in debug mode ( I'm assuming if I don't set
> BUILD_OPT=1, default will be debug? ). I gathered from googling, to debug
> NSS, you need to set following env variables, but for that to work I would
> need to build NSS in debug mode:
> > > $ export NSPR_LOG_MODULES="all:5"
> > > $ export NSPR_LOG_FILE="/tmp/pkcs11.log"
> > > $ export NSS_DEBUG_PKCS11_MODULE="NSS Internal PKCS #11 Module"
> >
> >
> > Unfortunately, I have problem building NSS on windows. Since, I wasn't
> able to quite understand what the pre-reqs are for NSS from mozilla site, I
> ended up googling for that as well. Hopefully, this is the right approach.
> >
> > Here's what I did :
> > installed mozillabuild (v3.3)
> > installed gitbash
> > installed gyp
> > got ninja ( not sure if I even need this, regardless copied over
> ninja.exe to mozilla-build\python\Scripts)
> > downloaded nss-3.47-with-nspr-4.23 - unzipped
> >
> > Start->VS2017 -> launched 'x64 native Tools Command Prompt for VS2017'
> > **
> > ** Visual Studio 2017 Developer Command Prompt v15.9.13
> > ** Copyright (c) 2017 Microsoft Corporation
> > **
> > [vcvarsall.bat] Environment initialized for: 'x64'
> >
> > c:\apps\MVS15>set
> PATH=D:\apps\nss-prereq\mozilla-build\python;D:\apps\nss-prereq\mozilla-build\python\Scripts;%PATH%
> > c:\apps\MVS15>set MOZ_NO_RESET_PATH=1
> > c:\apps\MVS15>echo %PATH%
> >
> D:\apps\nss-prereq\mozilla-build\python;D:\apps\nss-prereq\mozilla-build\python\Scripts;c:\apps\MVS15\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64;c:\apps\MVS15\Common7\IDE\VC\VCPackages;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\TestWindow;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
> Explorer;c:\apps\MVS15\MSBuild\15.0\bin\Roslyn;c:\apps\MVS15\Team
> Tools\Performance Tools\x64;c:\apps\MVS15\Team Tools\Performance
> Tools;C:\Program Files (x86)\Microsoft Visual
> Studio\Shared\Common\VSPerfCollectionTools\\x64;C:\Program Files
> (x86)\Microsoft Visual
> Studio\Shared\Common\VSPerfCollectionTools\;C:\Program Files
> (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\;C:\Program
> Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Windows
> Kits\10\bin\10.0.17763.0\x64;C:\Program Files (x86)\Windows
> Kits\10\bin\x64;c:\apps\MVS15\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;c:\apps\MVS15\Common7\IDE\;c:\apps\MVS15\Common7\Tools\;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft
> ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL
> Server\110\Tools\Binn\;C:\Users\nayak\.dnx\bin;C:\Program Files\Microsoft
> DNX\Dnvm\;C:\Program Files\Microsoft SQL
> Server\120\Tools\Binn\;D:\apps\nss-prereq\Git\cmd;C:\Users\nayak\AppData\Local\Microsoft\WindowsApps;;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
> > c:\apps\MVS15>cd D:\apps\nss-prereq\mozilla-build
> >
> > c:\apps\MVS15>D:
> >
> > c:\apps\MVS15>cd D:\apps\nss-prereq\mozilla-build
> >
> > c:\apps\MVS15>D:
> >
> > D:\apps\nss-prereq\mozilla-build>start-shell.bat
> > MozillaBuild Install Directory: D:\apps\nss-prereq\mozilla-build\
> >
> > nayak@svi6w273 ~
> > $ export USE_64=1
> >
> > nayak@svi6w273 ~
> > $ export NSS_DISABLE_GTESTS=1
> > nayak@svi6w273 /d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/nss
> > $ ./build.sh
> > NSPR [1/5] configure ...
> > NSPR [2/5] make ...
> >
> > nayak@svi6w273 

Re: NSS 3.47.1 build fail on windows

2019-12-20 Thread Usha Nayak
On Wednesday, December 11, 2019 at 9:28:17 AM UTC-6, Usha Nayak wrote:
> Hello,
> 
> I'm trying to build NSS in debug mode ( I'm assuming if I don't set 
> BUILD_OPT=1, default will be debug? ). I gathered from googling, to debug 
> NSS, you need to set following env variables, but for that to work I would 
> need to build NSS in debug mode:
> > $ export NSPR_LOG_MODULES="all:5"
> > $ export NSPR_LOG_FILE="/tmp/pkcs11.log"
> > $ export NSS_DEBUG_PKCS11_MODULE="NSS Internal PKCS #11 Module"
> 
> 
> Unfortunately, I have problem building NSS on windows. Since, I wasn't able 
> to quite understand what the pre-reqs are for NSS from mozilla site, I ended 
> up googling for that as well. Hopefully, this is the right approach.
> 
> Here's what I did :
> installed mozillabuild (v3.3)
> installed gitbash
> installed gyp
> got ninja ( not sure if I even need this, regardless copied over ninja.exe to 
> mozilla-build\python\Scripts)
> downloaded nss-3.47-with-nspr-4.23 - unzipped
> 
> Start->VS2017 -> launched 'x64 native Tools Command Prompt for VS2017'
> **
> ** Visual Studio 2017 Developer Command Prompt v15.9.13
> ** Copyright (c) 2017 Microsoft Corporation
> **
> [vcvarsall.bat] Environment initialized for: 'x64'
> 
> c:\apps\MVS15>set 
> PATH=D:\apps\nss-prereq\mozilla-build\python;D:\apps\nss-prereq\mozilla-build\python\Scripts;%PATH%
> c:\apps\MVS15>set MOZ_NO_RESET_PATH=1
> c:\apps\MVS15>echo %PATH%
> D:\apps\nss-prereq\mozilla-build\python;D:\apps\nss-prereq\mozilla-build\python\Scripts;c:\apps\MVS15\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64;c:\apps\MVS15\Common7\IDE\VC\VCPackages;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\TestWindow;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
>  Explorer;c:\apps\MVS15\MSBuild\15.0\bin\Roslyn;c:\apps\MVS15\Team 
> Tools\Performance Tools\x64;c:\apps\MVS15\Team Tools\Performance 
> Tools;C:\Program Files (x86)\Microsoft Visual 
> Studio\Shared\Common\VSPerfCollectionTools\\x64;C:\Program Files 
> (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program 
> Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 
> Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files 
> (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\Program Files (x86)\Windows 
> Kits\10\bin\x64;c:\apps\MVS15\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;c:\apps\MVS15\Common7\IDE\;c:\apps\MVS15\Common7\Tools\;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program
>  Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft 
> ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL 
> Server\110\Tools\Binn\;C:\Users\nayak\.dnx\bin;C:\Program Files\Microsoft 
> DNX\Dnvm\;C:\Program Files\Microsoft SQL 
> Server\120\Tools\Binn\;D:\apps\nss-prereq\Git\cmd;C:\Users\nayak\AppData\Local\Microsoft\WindowsApps;;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
> c:\apps\MVS15>cd D:\apps\nss-prereq\mozilla-build
> 
> c:\apps\MVS15>D:
> 
> c:\apps\MVS15>cd D:\apps\nss-prereq\mozilla-build
> 
> c:\apps\MVS15>D:
> 
> D:\apps\nss-prereq\mozilla-build>start-shell.bat
> MozillaBuild Install Directory: D:\apps\nss-prereq\mozilla-build\
> 
> nayak@svi6w273 ~
> $ export USE_64=1
> 
> nayak@svi6w273 ~
> $ export NSS_DISABLE_GTESTS=1
> nayak@svi6w273 /d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/nss
> $ ./build.sh
> NSPR [1/5] configure ...
> NSPR [2/5] make ...
> 
> nayak@svi6w273 /d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/nss
> 
> 
> nss-3.47-with-nspr-4.23\nss-3.47\nspr\Debug\config.log based on build.sh :
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> It was created by configure, which was
> generated by GNU Autoconf 2.69.  Invocation command line was
> 
>   $ ../configure 
> --prefix=/d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/dist/Debug 
> --enable-64bit
> 
> ## - ##
> ## Platform. ##
> ## - ##
> 
> hostname = svi6w273
> uname -m = i686
> uname -r = 1.0.19(0.48/3/2)
> uname -s = MINGW32_NT-6.2
> uname -v = 2016-07-13 17:45
> 
> /usr/bin/uname -p = unknown
> /bin/uname -X = unknown
> 
> /bin/arch  = unknown
> /usr/bin/arch -k   = unknown
> /usr/convex/getsysinfo = unknown
> /usr/bin/hostinfo  = unknown
> /bin/machine   = unknown
> /usr/bin/oslevel   = unknown
> /bin/universe  = unknown
> 
> PATH: /local/bin
> PATH: /d/apps/nss-prereq/mozilla-build/bin
> PATH: /d/apps/nss-prereq/mozilla-build/kdiff3
> PATH: /d/apps/nss-prereq/mozilla-build/nsis-3.01
> PATH: /d/apps/nss-prereq/mozilla-build/python
> PATH: 

NSS 3.47.1 build fail on windows

2019-12-11 Thread Usha Nayak
Hello,

I'm trying to build NSS in debug mode ( I'm assuming if I don't set 
BUILD_OPT=1, default will be debug? ). I gathered from googling, to debug NSS, 
you need to set following env variables, but for that to work I would need to 
build NSS in debug mode:
> $ export NSPR_LOG_MODULES="all:5"
> $ export NSPR_LOG_FILE="/tmp/pkcs11.log"
> $ export NSS_DEBUG_PKCS11_MODULE="NSS Internal PKCS #11 Module"


Unfortunately, I have problem building NSS on windows. Since, I wasn't able to 
quite understand what the pre-reqs are for NSS from mozilla site, I ended up 
googling for that as well. Hopefully, this is the right approach.

Here's what I did :
installed mozillabuild (v3.3)
installed gitbash
installed gyp
got ninja ( not sure if I even need this, regardless copied over ninja.exe to 
mozilla-build\python\Scripts)
downloaded nss-3.47-with-nspr-4.23 - unzipped

Start->VS2017 -> launched 'x64 native Tools Command Prompt for VS2017'
**
** Visual Studio 2017 Developer Command Prompt v15.9.13
** Copyright (c) 2017 Microsoft Corporation
**
[vcvarsall.bat] Environment initialized for: 'x64'

c:\apps\MVS15>set 
PATH=D:\apps\nss-prereq\mozilla-build\python;D:\apps\nss-prereq\mozilla-build\python\Scripts;%PATH%
c:\apps\MVS15>set MOZ_NO_RESET_PATH=1
c:\apps\MVS15>echo %PATH%
D:\apps\nss-prereq\mozilla-build\python;D:\apps\nss-prereq\mozilla-build\python\Scripts;c:\apps\MVS15\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64;c:\apps\MVS15\Common7\IDE\VC\VCPackages;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\TestWindow;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
 Explorer;c:\apps\MVS15\MSBuild\15.0\bin\Roslyn;c:\apps\MVS15\Team 
Tools\Performance Tools\x64;c:\apps\MVS15\Team Tools\Performance 
Tools;C:\Program Files (x86)\Microsoft Visual 
Studio\Shared\Common\VSPerfCollectionTools\\x64;C:\Program Files 
(x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program 
Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\;C:\Program 
Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Windows 
Kits\10\bin\10.0.17763.0\x64;C:\Program Files (x86)\Windows 
Kits\10\bin\x64;c:\apps\MVS15\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;c:\apps\MVS15\Common7\IDE\;c:\apps\MVS15\Common7\Tools\;C:\
 
ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program
 Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft 
ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\;C:\Users\nayak\.dnx\bin;C:\Program Files\Microsoft 
DNX\Dnvm\;C:\Program Files\Microsoft SQL 
Server\120\Tools\Binn\;D:\apps\nss-prereq\Git\cmd;C:\Users\nayak\AppData\Local\Microsoft\WindowsApps;;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;c:\apps\MVS15\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
c:\apps\MVS15>cd D:\apps\nss-prereq\mozilla-build

c:\apps\MVS15>D:

c:\apps\MVS15>cd D:\apps\nss-prereq\mozilla-build

c:\apps\MVS15>D:

D:\apps\nss-prereq\mozilla-build>start-shell.bat
MozillaBuild Install Directory: D:\apps\nss-prereq\mozilla-build\

nayak@svi6w273 ~
$ export USE_64=1

nayak@svi6w273 ~
$ export NSS_DISABLE_GTESTS=1
nayak@svi6w273 /d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/nss
$ ./build.sh
NSPR [1/5] configure ...
NSPR [2/5] make ...

nayak@svi6w273 /d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/nss


nss-3.47-with-nspr-4.23\nss-3.47\nspr\Debug\config.log based on build.sh :
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../configure 
--prefix=/d/apps/nss-prereq/nss-3.47-with-nspr-4.23/nss-3.47/dist/Debug 
--enable-64bit

## - ##
## Platform. ##
## - ##

hostname = svi6w273
uname -m = i686
uname -r = 1.0.19(0.48/3/2)
uname -s = MINGW32_NT-6.2
uname -v = 2016-07-13 17:45

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /local/bin
PATH: /d/apps/nss-prereq/mozilla-build/bin
PATH: /d/apps/nss-prereq/mozilla-build/kdiff3
PATH: /d/apps/nss-prereq/mozilla-build/nsis-3.01
PATH: /d/apps/nss-prereq/mozilla-build/python
PATH: /d/apps/nss-prereq/mozilla-build/python/Scripts
PATH: /d/apps/nss-prereq/mozilla-build/python3
PATH: /d/apps/nss-prereq/mozilla-build/python3/Scripts
PATH: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /d/apps/nss-prereq/mozilla-build/python
PATH: /d/apps/nss-prereq/mozilla-build/python/Scripts
PATH: