Open jaredd opened 6 years ago
I think the problem more likely has to do with the geometry interface header. Can you check in ext/wxWidgets/interface/geometry.h and see if there is a SetPolarCoordinates() in wxPoint2DDouble?
Is this the expected behavior?
Yes. We want the tweaker code (the etg scripts) to fail if something unexpectedly changes in the interface headers so things can be fixed instead of silently ignored.
You may want to try building from a source tarball instead of a git checkout (unless you are planning on submitting PRs or something) because all the generated code is present in the tarballs and all you need to do is run the build command (plus install or bdist_wheel or whatever.)
My guess is that his ext/wxWidgets git submodule got pointed at master somehow and not your 3.0 branch commit.
Could be.
I was also looking closer at it this afternoon and discovered that there actually isn't a SetPolarCoordinates
in interface/wx/geometry.h
! I'm guessing that Doxygen is pulling that class info from the real header file for some reason. Which leads to: if he's using a different version of doxygen that isn't experiencing that particular bug then that could explain things too.
Either way, my advice stands. Unless somebody is wanting to contribute to the project in some way then building from a source tarfile instead of from a git checkout will usually be much simpler.
It seems most commenters here were correct. My submodule was on master, not the branch specified in .gitmodules. The SetPolar... function was not present in the wxPoint2DDouble class.
I updated the submodule and tried a rebuild:
$ python build.py --prefix=$VIRTUAL_ENV --build_dir=$PWD/build --gtk3 -v dox etg --nodoc sip build [dox, etg finish without error] Finished command: etg (1m3.528s) Running command: sip Checking for /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/bin/sip-4.19.2-linux64... Not found. Attempting to download... Connection successful... Data downloaded... Checking for /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/bin/sip-4.19.2-linux64... /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/bin/sip-4.19.2-linux64 -w -o -g -I /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/src -I /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/sip/gen -c /tmp/tmpsSWFi7 -b sip/cpp/_core.sbf -X pycode_core:wx/core.py sip/gen/_core.sip sip: WXHINSTANCE is undefined Command '/home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/bin/sip-4.19.2-linux64 -w -o -g -I /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/src -I /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/sip/gen -c /tmp/tmpsSWFi7 -b sip/cpp/_core.sbf -X pycode_core:wx/core.py sip/gen/_core.sip' failed with exit code 1. Finished command: sip (3.149s)
I should note that I also have sip 4.10 installed from a prior build of PyQt4. I'm trying the wxPython-4.0.0rc1.dev3430+077db11.tar.gz source tarball now with a similar command. Pip did not work on the tarball itself.
Hmm, there appears to be a lib / lib64 issue in naming conventions for the build dir. I'll need to check this out more closely.
In file included from /home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/ext/wxWidgets/include/wx/defs.h:27:0, from /home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/ext/wxWidgets/include/wx/wx.h:14, from /home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/src/wxpy_api.h:41, from ../../../../sip/cpp/sipAPI_core.h:19332, from ../../../../sip/cpp/sip_core_ScrolledWindowBase.cpp:10: /home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/ext/wxWidgets/include/wx/platform.h:183:10: fatal error: wx/setup.h: No such file or directory
^~~~~~~~~~~~
compilation terminated. Waf: Leaving directory `/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/build/waf/2.7/gtk3' ... Build failed -> task in '_core' failed (exit status 1): {task 140464354349136: cxx sip_core_ScrolledWindowBase.cpp -> sip_core_ScrolledWindowBase.cpp.3.o} ['/usr/bin/g++', '-fPIC', '-pthread', '-pthread', '-pthread', '-I/usr/include/gtk-3.0', '-I/usr/include/at-spi2-atk/2.0', '-I/usr/include/at-spi-2.0', '-I/usr/include/dbus-1.0', '-I/usr/lib64/dbus-1.0/include', '-I/usr/include/gtk-3.0', '-I/usr/include/gio-unix-2.0/', '-I/usr/include/pkg/libxkbcommon', '-I/usr/include/wayland', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/harfbuzz', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libdrm', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-UNDEBUG', '-g', '-pthread', '-fno-strict-aliasing', '-fmessage-length=0', '-fstack-protector-strong', '-funwind-tables', '-fasynchronous-unwind-tables', '-fmessage-length=0', '-fstack-protector-strong', '-funwind-tables', '-fasynchronous-unwind-tables', '-fwrapv', '-fno-strict-aliasing', '-I/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/build/lib64/wx/include/gtk3-unicode-3.0', '-I/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/ext/wxWidgets/include', '-I/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/build/waf/2.7/gtk3/sip/siplib', '-I/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/sip/siplib', '-I/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/build/waf/2.7/gtk3/src', '-I/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/src', '-I/home/jaredd/pyvenvs/gnuradio3.7/include/python2.7', '-DPYTHONDIR="/usr/local/lib/python2.7/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib64/python2.7/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', '-DHAVE_WXMEDIA=1', '-DHAVE_WXRIBBON=1', '-DHAVE_WXPROPGRID=1', '-DHAVE_WXAUI=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-DWXGTK', '-D_FORTIFY_SOURCE=2', '-D_FORTIFY_SOURCE=2', '-DOPENSSL_LOAD_CONF', '../../../../sip/cpp/sip_core_ScrolledWindowBase.cpp', '-c', '-o', 'sip/cpp/sip_core_ScrolledWindowBase.cpp.3.o'] Command '"/home/jaredd/pyvenvs/gnuradio3.7/bin/python" /home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/bin/waf-1.7.15-p1 --verbose --wx_config=/home/jaredd/pyvenvs/gnuradio3.7/src/wxPython-4.0.0rc1.dev3430+077db11/build/wx-config --verbose --gtk3 --python="/home/jaredd/pyvenvs/gnuradio3.7/bin/python" --out=build/waf/2.7/gtk3 configure build ' failed with exit code 1. Finished command: build_py (9.968s) Finished command: build (5m15.261s)
$ find . -name setup.h ./ext/wxWidgets/include/msvc/wx/setup.h ./ext/wxWidgets/include/wx/android/setup.h ./ext/wxWidgets/include/wx/msw/wince/setup.h ./build/lib/wx/include/gtk3-unicode-3.0/wx/setup.h
I ended up just creating a symlink in the build directory from lib64 to lib. Seems to have worked, but the underlying problem still has to be addressed. Thanks for all the help.
It's there
Lol, now I'm the one who was looking in the wrong place. 😃
I ended up just creating a symlink in the build directory from lib64 to lib
Thanks. I'll try to dig into this a little more soonish.
$ uname -a Linux linux-xdol 4.12.9-1-default #1 SMP PREEMPT Fri Aug 25 07:08:45 UTC 2017 (f2ab6ba) x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/os-release cat /etc/os-release NAME="openSUSE Tumbleweed" # VERSION="20170924" ID=opensuse ID_LIKE="suse" VERSION_ID="20170924" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20170924" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/"
$ git describe wxPython-4.0.0b2-13-g88ed1696
Custom build from source
$ python --version Python 2.7.13
Stock python build (in virtualenv)
$ pwd /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix $ python build.py --prefix=$VIRTUAL_ENV --build_dir=$PWD/build --gtk3 -v dox etg --nodoc Will build using: "/home/jaredd/pyvenvs/gnuradio3.7/bin/python" 2.7.13 (default, Jan 03 2017, 17:41:54) [GCC] Python's architecture is 64bit cfg.VERSION: 4.0.0rc1
Running command: dox Checking for /home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/bin/doxygen-1.8.8-linux... bash ./regen.sh xml Finished command: dox (17.429s) Running command: etg "/home/jaredd/pyvenvs/gnuradio3.7/bin/python" etg/geometry.py --sip --nodoc Traceback (most recent call last): File "etg/geometry.py", line 145, in
run()
File "etg/geometry.py", line 54, in run
c.find('SetPolarCoordinates').ignore()
File "/home/jaredd/pyvenvs/gnuradio3.7/src/Phoenix/etgtools/extractors.py", line 99, in find
(head, self.class.name, self.name))
etgtools.extractors.ExtractorError: Unable to find item named 'SetPolarCoordinates' within ClassDef named 'wxPoint2DDouble'
Command '"/home/jaredd/pyvenvs/gnuradio3.7/bin/python" etg/geometry.py --sip --nodoc' failed with exit code 1.
Finished command: etg (0.104s)
Digging into etgtools/extractors.py, class BaseDef defines basic methods in the calls leading to the error. The variable c is a ClassDef and considering that c.find(X) will raise an uncaught exception, I don't know how this code is meant to operate. In that method, etgtools/extractors.py:92 we have
Probably. It also appears that c.find(X).ignore() can't actually ignore not finding X since ignore operates on the returned object from find, not prior to the find. Is this the expected behavior? If one were to instead do c.ignore().find(X) and actually have a case in the find method that uses the ignore attribute, then perhaps this call might work. But this call pattern seems too numerous for this workaround to be necessary. There must be some other reason the build fails?
I'm willing to dig some more if someone can point me in a direction. I appreciate the help.