1

Summary

I'm trying to build wxPython Phoenix from source on Travis-CI (Ubuntu 12.04), but am getting a "no member named 'api_get_reference'" error during sip_corewxHeaderCtrlEvent.cpp.

Details

Below is the process flow I'm following [source]. I have separated out each build.py step to help me debug (and so that the Travis-CI log folds output).

Note: For some reason, build/build.py sip does not correctly download sip. This is why I have steps 1 and 2.

  1. DL, extract, and build sip from source.
  2. Create environment variable 'SIP' which points to the install dir
  3. DL wxPython Phoenix source tarball, extract, cd to extracted dir
  4. python ./build.py --build_dir=./bld dox
  5. python ./build.py --build_dir=./bld touch
  6. python ./build.py --build_dir=./bld etg --nodoc
  7. sudo -E python ./build.py --build_dir=./bld sip I've found that I need sudo for this step. The -E option is to keep environment variables.
  8. python ./build.py --build_dir=./bld build_wx

Up to here, everything appears to work fine. But when I run

  1. python ./build.py --build_dir=./bld build_py

I get a "no member named 'api_get_reference'" error during sip_corewxHeaderCtrlEvent.cpp

Does anyone know how to fix this? Am I missing a package? Is there a configuration item I can set to skip this? I know that this build version is valid, since it works on wxPython's BuildBot.

System and Version Info:

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 

Error Text

Here's the full error text, starting with [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. 

You can see the entire Travis build log here (https://travis-ci.org/dougthor42/wafer_map/builds/72217442).

1 Answer 1

2

The problem is that the build process is finding the bundled copy of the SIP header file (sip.h), which doesn't match the version that you downloaded and installed. To work around the problem, you can edit the file wscript (in the root of the Phoenix distribution). Change this line:

 conf.env.INCLUDES_WXPY = ['sip/siplib', 'src'] 

to

 conf.env.INCLUDES_WXPY = ['src'] 

Alternatively, you could probably download and install SIP version 4.16.7 which appears to be the bundled version.

Sign up to request clarification or add additional context in comments.

1 Comment

I can confirm this fix along with defining 'HAVE_ROUND' in pymath.h allows me to compile on Win 7 x64 with Py 3.5.1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.