NSS and MSVS 2022

49 views
Skip to first unread message

Burak Arslan

unread,
Jan 4, 2022, 8:25:42 AM1/4/22
to dev-tec...@mozilla.org
Hello,

It's not possible to build NSS with GYP using MSVC 17 (Visual Studio
2022) because the required definitions are missing from MSVSVersion.py.

I forked and patched GYP so now it seems to work.

Fork is here: https://github.com/plq/gyp/

I added some patches from other forks that looked nice but actually only
this[1] patch is required, the rest is optional.

This is part of the work that tries to add NSS and NSPR ports to vcpkg:
https://github.com/microsoft/vcpkg/pull/21281

Best regards
Burak

[1]:
https://github.com/plq/gyp/commit/b3177c3f6c2c45a8ca098ae0f0ebb4536c624762

Benjamin Beurdouche

unread,
Jan 4, 2022, 8:32:34 AM1/4/22
to Burak Arslan, dev-tec...@mozilla.org
Hi Burak,

Thanks for looking into this! If I am correct there is a gyp fork
maintained by Node.js and called gyp-next.

We have been contemplating moving NSS to use gyp-next but haven’t got
to try yet. Any chance you could have a look and see if building NSS
with gyp-next using MSVC 17 would work? (I don’t have that version of MSVC yet.)

Best,
Benjamin
> --
> 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/2c4adc73-3c47-145c-e4c9-a3ad33df1af1%40burakarslan.com.

Burak Arslan

unread,
Jan 4, 2022, 10:16:14 AM1/4/22
to Benjamin Beurdouche, dev-tec...@mozilla.org
Hello Benjamin,

If you have ~100gb to burn, the ms dev env is quite accessible (in ms
standards) nowadays:
https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

I've seen gyp-next but it was quite easy to get the vanilla version to
work so didn't really look into it.

If I were you, I'd just pay some consultant to migrate to CMake and be
done with it. Maybe it could be done in a semi-automated fashion using
the following route:

https://fuchsia.googlesource.com/build/+/b7c5b2083caa19eddb516f33b9ff13ffe260d5be/gypi_to_gn.py

https://github.com/google/skia/blob/main/gn/gn_to_cmake.py

After all, it only needs to work once.

Best regards,
Burak
>> To unsubscribe from this group and stop receiving emails from it, send an email todev-tech-cry...@mozilla.org.
Reply all
Reply to author
Forward
0 new messages