在 Windows 上使用 MinGw 构建 mozilla NSPR,无需 VC++
我需要为我的 Perl JavaScript 引擎使用 SpiderMonkey。为此,我需要使用线程安全库构建蜘蛛猴。因此,据我了解,我需要首先构建 NSPR,然后构建 Spidermonkey。
所以,正如我从以下链接中了解到的 https://developer.mozilla.org/en/NSPR_build_instructions
我首先下载了 mozilla-build 并打开了mingw。我按照上述说明进行操作,例如创建 target.debug 目录等......
当我执行 make 时,我收到以下错误消息,
make[3]: nsinstall: Command not found
make[3]: *** [export] Error 127
make[3]: Leaving directory `/c/target.debug/pr/include/md'
make[2]: *** [export] Error 2
make[2]: Leaving directory `/c/target.debug/pr/include'
make[1]: *** [export] Error 2
make[1]: Leaving directory `/c/target.debug/pr'
make: *** [export] Error 2
看起来好像缺少 nsinstall。
我不是 C/C++ 专业程序员,因此寻求您的帮助。
我需要使用 Mingw 在窗口上成功构建蜘蛛猴。
我尝试按照以下链接中提到的步骤进行操作: http://jargon.ca/spidermonkey/
但是当我运行 js.exe 时,它抱怨缺少libnspr4.dll 文件。
所以请帮助我如何在Windows操作系统上构建nspr和spidermonkey。
I need to use spidermonkey for my perl javascript engine. For that I need to build spidermonkey with thread-safe libraries. So as I understand I need to first build NSPR and then spidermonkey.
So, as I understood from following link
https://developer.mozilla.org/en/NSPR_build_instructions
I first downloaded the mozilla-build and opened the mingw. I followed the instructions as mentioned like creating target.debug directory and so on .....
when I am doing make, I am getting following error message
make[3]: nsinstall: Command not found
make[3]: *** [export] Error 127
make[3]: Leaving directory `/c/target.debug/pr/include/md'
make[2]: *** [export] Error 2
make[2]: Leaving directory `/c/target.debug/pr/include'
make[1]: *** [export] Error 2
make[1]: Leaving directory `/c/target.debug/pr'
make: *** [export] Error 2
looks like nsinstall is missing.
I am not a professional programmer in C/C++ so looking for your help.
I need to successfully build the spidermonkey on window using Mingw.
I tried to follow the steps as mentioned in following link:
http://jargon.ca/spidermonkey/
but when I am running the js.exe, it's complaining about missing libnspr4.dll file.
So please help me how can I build nspr and spidermonkey on windows operating system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以从 mozilla 获取 nsinstall 的副本。
You can get a copy of nsinstall from mozilla.
Windows 上没有直接的方法。您有两种选择来做到这一点。请遵循以下说明:
我个人没有尝试过第一个选项,但对于第二个选项,您将需要使用 Microsoft Visual Studio。话又说回来,如果您只需要 NSPR 4,为什么不从 Firefox 安装目录中提取这些文件呢?我猜这些 DLL 的名称类似于 nspr4.dll、plc4.dll 和 plds4.dll。
There is no straight forward way on Windows. You have two options to do that. Either follow instructions on:
I have not personally tried the 1st option, but for second option you will need Microsoft Visual Studio to work with. Then again, if you need just NSPR 4 why don't you pull out those files from your Firefox installation directoy? I guess the DLLs are named something like nspr4.dll, plc4.dll and plds4.dll.
您可以按照以下方式使用 cygwin 构建
nsinstall
:然后使用 mingw 构建(使用
--enable-win32-target=WIN95
)几乎会成功。我必须修复以下问题:(1) pr/include/md/_win95.h
(2) pr/include/pratom.h,第 80 行
(3) 如果想运行测试,则第 1 点的技巧应该也适用于测试 Attach、foreign、testfile。
使用我的构建进行的一些测试失败:cvar、gethost、op_2long、parent、reinit、selct_nm、socket、sockopt、writev。剩下的就成功了。
You can build
nsinstall
with cygwin the following way:Then building with mingw (with
--enable-win32-target=WIN95
) almost succeeds. I had to fix the following things:(1) pr/include/md/_win95.h
(2) pr/include/pratom.h, line 80
(3) If one wants to run the tests, the trick from point 1 should also be applied to tests attach, foreign, testfile.
Some tests fail using my build: cvar, gethost, op_2long, parent, reinit, selct_nm, socket, sockopt, writev. The rest is successful.