msvc.sh does define the environment variables INCLUDE and LIB 
INCLUDE does have the path to the standard library headers

But how do I make the build system use it?

According to  
https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
CL.exe uses the environment variables INCLUDE, LIB, LIBPATH, etc;

I defined those variables in the mozilla-build shell when I run build.sh or 
make but I still get that it cannot find stdio.h

This is the output:
cl -Fonow.obj -c      -W3 -nologo -GF -Gy -FS -MD -GT -O2   -UDEBUG 
-U_DEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DN
DEBUG=1 -DXP_PC=1 -DWIN32=1 -D_CRT_SECURE_NO_WARNINGS=1 
-D_CRT_NONSTDC_NO_WARNINGS=1 -DWINNT=1 -D_AMD64_=1 -DFORCE_PR_LOG   
"W:/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config/../../config/now.c"
now.c
W:/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config/../../config/now.c(6): 
fatal error C1083: Cannot open include file: 'stdio.h': No such file or 
directory
make[2]: *** [../../config/rules.mk:450: now.obj] Error 2
make[2]: Leaving directory 
'W:/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config'
make[1]: *** [../config/rules.mk:163: export] Error 2
make[1]: Leaving directory 'W:/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ'
make: *** [Makefile:142: build_nspr] Error 2


Thanks



On Tuesday, May 16, 2023 at 7:52:48 PM UTC-5 Martin Thomson wrote:

> That's more helpful.
>
> There is a script: https://searchfox.org/nss/source/coreconf/msvc.sh that 
> we use to detect where all the MSVC stuff is.  Try poking at that to see 
> what it produces.  (Run `bash -x .../msvc.sh` should produce a bunch of 
> variables with paths that you can check.)
>
> On Wed, May 17, 2023 at 7:04 AM Sam Caro <soca...@gmail.com> wrote:
>
>> Got further ---- Now it can't find the standard library headers
>> What is the correct way to define the Standard library headers location
>>
>> scaro@JSSLW18120040 /C/nss-3.89.1/nss
>> $ make nss_build_all
>> C:/tools/make/make-4.4/WinRel/make.exe build_nspr
>> make[1]: Entering directory 'C:/nss-3.89.1/nss'
>> mkdir -p ./../nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ
>> cd ./../nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ ; \
>> CC="cl" CXX="cl" sh ../configure \
>> --disable-debug --enable-optimize --enable-64bit \
>> --with-dist-prefix='$(topsrcdir)/../dist/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ'
>>  
>> \
>>
>> --with-dist-includedir='$(topsrcdir)/../dist/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/include'
>> configure: loading site script 
>> C:/tools/mozilla-build/msys2/etc/config.site
>> checking build system type... x86_64-pc-msys
>> checking host system type... x86_64-pc-msys
>> checking target system type... x86_64-pc-msys
>> checking for cl... cl
>> configure: WARNING: Unknown version of the Microsoft (R) Manifest Tool.
>> configure: creating ./config.status
>> config.status: creating Makefile
>> config.status: creating config/Makefile
>> config.status: creating config/autoconf.mk
>> config.status: creating config/nsprincl.mk
>> config.status: creating config/nsprincl.sh
>> config.status: creating config/nspr-config
>> config.status: creating config/nspr.pc
>> config.status: creating lib/Makefile
>> config.status: creating lib/ds/Makefile
>> config.status: creating lib/libc/Makefile
>> config.status: creating lib/libc/include/Makefile
>> config.status: creating lib/libc/src/Makefile
>> config.status: creating lib/tests/Makefile
>> config.status: creating pkg/Makefile
>> config.status: creating pr/Makefile
>> config.status: creating pr/include/Makefile
>> config.status: creating pr/include/md/Makefile
>> config.status: creating pr/include/obsolete/Makefile
>> config.status: creating pr/include/private/Makefile
>> config.status: creating pr/src/Makefile
>> config.status: creating pr/src/io/Makefile
>> config.status: creating pr/src/linking/Makefile
>> config.status: creating pr/src/malloc/Makefile
>> config.status: creating pr/src/md/Makefile
>> config.status: creating pr/src/md/windows/Makefile
>> config.status: creating pr/src/memory/Makefile
>> config.status: creating pr/src/misc/Makefile
>> config.status: creating pr/src/threads/Makefile
>> config.status: creating pr/tests/Makefile
>> config.status: creating pr/tests/dll/Makefile
>> config.status: creating pr/src/threads/combined/Makefile
>> config.status: executing default commands
>> C:/tools/make/make-4.4/WinRel/make.exe -C 
>> ./../nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ
>> make[2]: Entering directory 
>> 'C:/nss-3.89.1/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ'
>> C:/tools/make/make-4.4/WinRel/make.exe -C config export
>> make[3]: Entering directory 
>> 'C:/nss-3.89.1/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config'
>> cl -Fonow.obj -c      -W3 -nologo -GF -Gy -FS -MD -GT -O2   -UDEBUG 
>> -U_DEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
>> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DN
>> DEBUG=1 -DXP_PC=1 -DWIN32=1 -D_CRT_SECURE_NO_WARNINGS=1 
>> -D_CRT_NONSTDC_NO_WARNINGS=1 -DWINNT=1 -D_AMD64_=1 -DFORCE_PR_LOG   
>> "C:/nss-3.89.1/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config/../../config/now.c"
>> now.c
>> C:/nss-3.89.1/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config/../../config/now.c(6):
>>  
>> fatal error C1034: stdio.h: no include path set
>> make[3]: *** [../../config/rules.mk:450: now.obj] Error 2
>> make[3]: Leaving directory 
>> 'C:/nss-3.89.1/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ/config'
>> make[2]: *** [../config/rules.mk:163: export] Error 2
>> make[2]: Leaving directory 
>> 'C:/nss-3.89.1/nspr/WINNT3.3.6-341.x86_64_x86_64_64_OPT.OBJ'
>> make[1]: *** [Makefile:142: build_nspr] Error 2
>> make[1]: Leaving directory 'C:/nss-3.89.1/nss'
>> make: *** [Makefile:51: nss_build_all] Error 2
>>
>>
>>
>> On Monday, May 15, 2023 at 3:22:09 PM UTC-5 Sam Caro wrote:
>>
>>>
>>> I did not much from the verbose option
>>>
>>> On Mon, May 15, 2023 at 3:08 PM Anna Weine <anna....@mozilla.com> wrote:
>>>
>>>> Good evening, 
>>>> Could you try to run nss/build.sh -v ? 
>>>>
>>>>
>>>>
>>>> On Mon, 15 May 2023, 20:49 Sam Caro, <soca...@gmail.com> wrote:
>>>>
>>>>>
>>>>> I have been trying to build NSS 3.89.1 on windows 
>>>>> nss/build.sh  does not work 
>>>>>
>>>>> Do you any suggestions on what to check to make it work?
>>>>> like what arguments to  nss/build.sh to use
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>> On Friday, May 5, 2023 at 12:32:50 PM UTC-5 Dennis Jackson wrote:
>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> Network Security Services (NSS) 3.89.1 was released on 5th May 2023. 
>>>>>> This is a minor release ahead of the larger 3.90 next cycle. 
>>>>>>
>>>>>> The HG tag is NSS_3_89_1_RTM. This version of NSS requires NSPR 4.35 
>>>>>> or newer.
>>>>>>
>>>>>> NSS 3.89 source distributions are available on ftp.mozilla.org for
>>>>>> secure HTTPS download:
>>>>>> <
>>>>>> https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_89_1_RTM/src/
>>>>>> >
>>>>>>
>>>>>> Changes:
>>>>>>
>>>>>>    - Bug 1804505 - Update the technical constraints for KamuSM.
>>>>>>    - Bug 1822921 - Add BJCA Global Root CA1 and CA2 root certificates.
>>>>>>
>>>>>> NSS 3.89.1 shared libraries are backwards-compatible with all older 
>>>>>> NSS 3.x shared libraries. A program linked with older NSS 3.x shared 
>>>>>> libraries will work with this new version of the shared libraries 
>>>>>> without 
>>>>>> recompiling or relinking. Furthermore, applications that restrict their 
>>>>>> use 
>>>>>> of NSS APIs to the functions listed in NSS Public Functions will remain 
>>>>>> compatible with future versions of the NSS shared libraries.
>>>>>>
>>>>>> Bugs discovered should be reported by filing a bug report at
>>>>>> <https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS>
>>>>>>
>>>>>> Release notes will be available at
>>>>>> <
>>>>>> https://firefox-source-docs.mozilla.org/security/nss/releases/index.html
>>>>>> >
>>>>>> though you should expect a small delay.
>>>>>>
>>>>>> Best,
>>>>>> Dennis
>>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "dev-tec...@mozilla.org" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to dev-tech-cryp...@mozilla.org.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/a166beb8-b258-452f-9185-6db236268066n%40mozilla.org
>>>>>  
>>>>> <https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/a166beb8-b258-452f-9185-6db236268066n%40mozilla.org?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "dev-tec...@mozilla.org" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dev-tech-cryp...@mozilla.org.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/817cb0d7-4e8f-4195-8e61-f79cd1f6b6afn%40mozilla.org
>>  
>> <https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/817cb0d7-4e8f-4195-8e61-f79cd1f6b6afn%40mozilla.org?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"dev-tech-crypto@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dev-tech-crypto+unsubscr...@mozilla.org.
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/498bc311-43ed-4561-b673-c6c42bf91396n%40mozilla.org.

Reply via email to