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

时间:2015-04-28 13:18:14

标签: qt webkit phantomjs qtwebkit qwebkit

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

1)它尝试访问" C:fastiophantomjsphantomjssrcqtqtbasebinmoc.exe" 。显然,目录名称之间的反斜杠字符在构建过程中被深深地剥离 - 可能是Windows风格的" \" 和Linux风格的&之间的不匹配#34; /" (但这只是猜测)。

2)还有另一个错误,"无法从文件中读取名称:C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/mathml/mathtags.in" ;

如果我从PATH中删除sh.exe,构建仍然会到达这一点,只出现错误#2,这使我认为错误#2是真正的问题。 < / p>

以下是完整的错误消息(据我所知,在构建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.

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

我该如何做到这一点?

以下完整日志:

控制台输出: 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 个答案:

答案 0 :(得分:2)

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

  1. 尽可能从PATH中删除,只留下对构建过程至关重要的条目
  2. 最重要的是,从PATH中删除所有GitHub的git目录
  3. 单独安装GIT(来自GitHub,但是来自git-scm.com),仅添加 cmd 目录(不是 bin 目录)到PATH
  4. 单独安装ActivePerl,将其添加到PATH
  5. 它已经超越了我上述步骤所提出的错误(仍然不确定它是否会成功完成构建,它需要一段时间)。