在 Windows 上构建 PhantomJS 2.0 会导致一个奇怪的错误

Building PhantomJS 2.0 on Windows results in a strange error

我正在尝试从 c:\fastio\phantomjs\phantomjs 目录在 Windows 上构建 PhantomJS 2.0。由于某种原因,构建过程在一段时间后失败,出现 2 个错误(请参阅下面的错误消息):

1) 它尝试访问 "C:fastiophantomjsphantomjssrcqtqtbasebinmoc.exe"。显然,目录名称之间的反斜杠字符在构建过程中以某种方式被去除了 - 可能 Windows-style "\" 和 Linux- 之间不匹配style "/"(但这只是一个猜测)。

2) 还有一个错误,"Failed to read names from file: C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/mathml/mathtags.in"。

如果我从 PATH 中删除 sh.exe,构建仍然会进行到这一点,并且只会出现错误 #2,这让我认为错误 #2 才是真正的问题所在.

这是完整的错误消息(据我所知,这是在构建 WebKit 时发生的):

sh: C:fastiophantomjsphantomjssrcqtqtbasebinmoc.exe: command not found
Failed to read names from file: C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/mathml/mathtags.in at C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/dom/make_names.pl line 315.
NMAKE : fatal error U1077: 'C:\Users\Eugene\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin\perl.EXE' : return code '0x7f'
Stop.

(顺便说一句,我看到了 但我已经解决了那里描述的问题,我的错误发生在构建过程的后期。)

我怎样才能使这个工作?

完整日志如下:

控制台输出: http://pastebin.com/btMeNPz4

QT 构建日志文件build_qt_4-285-20-0859.log: http://pastebin.com/LUEJz7E0

WebKit 构建日志文件build_webkit_4-285-20_0859.log: http://pastebin.com/494TivXF

PhantomJS 构建日志文件build_phantomjs_4-285-20_0859.log:

看来我自己找到了解决方案,以下是我的步骤:

  1. 尽可能多地从 PATH 中删除,只留下对构建过程至关重要的条目
  2. 最重要的是,从 PATH
  3. 中删除所有 GitHub 的 git 目录
  4. 单独安装GIT(不是来自GitHub而是来自git-scm.com),添加它的cmd 目录(不是它的 bin 目录)到 PATH
  5. 单独安装ActivePerl,将其添加到PATH

它正在克服我通过上述步骤询问的错误(仍然不确定它是否会成功完成构建,这需要一段时间)。