On 07/12/2012 03:20 AM, Sam Laidler wrote:
Hello, hope all is well.



I want to distribute NSS without the MS redistribution package. When I read the 
following, I got the impression that it should be theoretically possible:



https://developer.mozilla.org/en/USE_STATIC_LIBS


USE_STATIC_LIBS don't affect how the nss shared libraries are build, only how the commands and tools are built. It statically links commands with libnss.a rather than libnss3.so (well, sort of, it's really a series of static libraries).

Even in this case, system shared libraries, and even some NSS shared libraries (like libfreebl) are still external dependencies.


In both cases I got NSS to build but I found that nss3.dll had a dependency on 
msvcr90.dll.



I did some Googling and found:



http://old.nabble.com/How-to-build-nspr%2Bnss-on-Windows-with-VS-2008-%28VC%2B%2B-9.0%29-td26081750.html



Here, Wan-Teh seemed to suggest that using the redistribution package was 
unavoidable, whereas Nelson said you can use mozcrt19.dll instead.

Actually both Nelson and WTC are in agreement. If you look at the bug Nelson points to, you will see that the default NSS does not have a way of avoiding redistribution of the given package, however that bug contains a patch Nelson uses to build NSS using mozcrt19.dll rather than msvcr90.dll. If you apply Nelson's (3 year old patch), you may have success in changing the dependency to the mozilla runtine.



I'm sorry, guys, but I'm a bit confused here.



*         Am I doing something wrong when building NSS?

*         I thought static linking relieved the obligation to distribute a 
separate DLL. Or is it loaded at runtime into some kind of address space 
instead?
It only removes the dependencies on most of the standard nss libraries themselves. I believe you still need to dynamically link nspr, freebl and the system libraries.

*         If so, does that mean I should be able to simply drop the msvcr90.dll 
into the working directory that contains a static build without worrying too 
much about the side-by-side/manifest file stuff?
msvcr90.dll just needs to be in your path. If it's in the same directory as nss3.dll, that should be sufficient.

*         I also thought of trying to build NSPR/NSS with mozcrt19, but 
struggled to find out how to do it. Would it help me to achieve what I want?

I believe if you just apply the patch Nelson has in the bug, it should work. You'll need to get a mozcrt19.a from somewhere as well.

bob

-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to