我试图在Travis-CI(Ubuntu 12.04)上从源代码构建wxPython Phoenix,但我得到了一个名为' api_get_reference'""'''' sip_corewxHeaderCtrlEvent.cpp期间出错。
以下是[source]之后的流程流程。我已经分离出每个build.py步骤以帮助我调试(以便Travis-CI日志折叠输出)。
注意:由于某种原因,build/build.py sip
无法正确下载sip。这就是为什么我有步骤1和2。
sip
。python ./build.py --build_dir=./bld dox
python ./build.py --build_dir=./bld touch
python ./build.py --build_dir=./bld etg --nodoc
sudo -E python ./build.py --build_dir=./bld sip
我发现我需要sudo这一步。 -E
选项是保留环境变量。python ./build.py --build_dir=./bld build_wx
到目前为止,一切似乎都运转良好。但是当我跑步时
python ./build.py --build_dir=./bld build_py
我得到一个"没有名为' api_get_reference'" sip_corewxHeaderCtrlEvent.cpp
有谁知道如何解决这个问题?我错过了一个包吗?我可以设置一个配置项来跳过这个吗?我知道这个构建版本是有效的,因为它适用于wxPython's BuildBot。
OS: Ubuntu 12.04 LTS (precise)
Linux Version: 2.6.32-042stab090.5
Python: 3.4.2 x86_64
wxPython: 3.0.3.dev1820+49a8884 (Phoenix)
sip: 4.16.9
这里是完整的错误文本,以[188/712]开头:
[188/712] cxx: sip/cpp/sip_corewxHeaderCtrlEvent.cpp -> build/waf/3.4/sip/cpp/sip_corewxHeaderCtrlEvent.cpp.3.o
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp: In function ‘PyObject* varget_wxHeaderButtonParams_m_arrowColour(void*, PyObject*, PyObject*)’:
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp:113:13: error: ‘const sipAPIDef’ has no member named ‘api_get_reference’
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp: In function ‘PyObject* varget_wxHeaderButtonParams_m_labelBitmap(void*, PyObject*, PyObject*)’:
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp:184:13: error: ‘const sipAPIDef’ has no member named ‘api_get_reference’
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp: In function ‘PyObject* varget_wxHeaderButtonParams_m_labelColour(void*, PyObject*, PyObject*)’:
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp:223:13: error: ‘const sipAPIDef’ has no member named ‘api_get_reference’
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp: In function ‘PyObject* varget_wxHeaderButtonParams_m_labelFont(void*, PyObject*, PyObject*)’:
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp:265:13: error: ‘const sipAPIDef’ has no member named ‘api_get_reference’
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp: In function ‘PyObject* varget_wxHeaderButtonParams_m_labelText(void*, PyObject*, PyObject*)’:
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp:304:13: error: ‘const sipAPIDef’ has no member named ‘api_get_reference’
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp: In function ‘PyObject* varget_wxHeaderButtonParams_m_selectionColour(void*, PyObject*, PyObject*)’:
../../../sip/cpp/sip_corewxHeaderButtonParams.cpp:346:13: error: ‘const sipAPIDef’ has no member named ‘api_get_reference’
Waf: Leaving directory `/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/build/waf/3.4'
Build failed
-> task in '_core' failed (exit status 1):
{task 140029216390280: cxx sip_corewxHeaderButtonParams.cpp -> sip_corewxHeaderButtonParams.cpp.3.o}
['/usr/bin/g++', '-fPIC', '-pthread', '-pthread', '-pthread', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0/', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng12', '-UNDEBUG', '-g', '-pthread', '-fwrapv', '-fstack-protector', '-fno-strict-aliasing', '-I/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/bld/lib/wx/include/gtk2-unicode-3.0', '-I/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/ext/wxWidgets/include', '-I/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/build/waf/3.4/sip/siplib', '-I/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/sip/siplib', '-I/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/build/waf/3.4/src', '-I/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/src', '-I/opt/python/3.4.2/include/python3.4m', '-DPYTHONDIR="/usr/local/lib/python3.4/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3.4/site-packages"', '-DHAVE_PYTHON_H=1', '-DHAVE_WX=1', '-DHAVE_WXADV=1', '-DHAVE_WXSTC=1', '-DHAVE_WXHTML=1', '-DHAVE_WXGL=1', '-DHAVE_WXWEBVIEW=1', '-DHAVE_WXXML=1', '-DHAVE_WXXRC=1', '-DHAVE_WXRICHTEXT=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-D__WXGTK__', '../../../sip/cpp/sip_corewxHeaderButtonParams.cpp', '-c', '-o', 'sip/cpp/sip_corewxHeaderButtonParams.cpp.3.o']
Command '"/home/travis/virtualenv/python3.4.2/bin/python" /home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/bin/waf-1.7.15-p1 --wx_config=/home/travis/build/dougthor42/wafer_map/wxPython_Phoenix-3.0.3.dev1820+49a8884/bld/wx-config --python="/home/travis/virtualenv/python3.4.2/bin/python" --out=build/waf/3.4 configure build ' failed with exit code 1.
Finished command: build_py (2m3.778s)
The command "python ./build.py --build_dir=./bld build_py" failed and exited with 1 during .
Your build has been stopped.
您可以看到整个Travis构建日志here(https://travis-ci.org/dougthor42/wafer_map/builds/72217442)。
答案 0 :(得分:2)
问题是构建过程正在查找SIP头文件(sip.h)的捆绑副本,该副本与您下载和安装的版本不匹配。要解决此问题,可以编辑文件wscript(在Phoenix发行版的根目录中)。改变这一行:
conf.env.INCLUDES_WXPY = ['sip/siplib', 'src']
到
conf.env.INCLUDES_WXPY = ['src']
或者,您可以下载并安装SIP版本4.16.7,它似乎是捆绑版本。