Error while buiding wxPython classic on Ubuntu 16.04

5 views
Skip to first unread message

Hung Ta

unread,
Jan 26, 2018, 12:23:32 PM1/26/18
to wxPython-dev
Hi everyone,

I cloned both wxWidgets and wxWidgets/wxPython from github and built them. The build of wxWidgets passed but the wxPython failed below:

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DSWIG_PYTHON_SILENT_MEMLEAK -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -Iinclude -Isrc -I/usr/local/lib/wx/include/gtk3-unicode-3.0 -I/usr/local/include/wx-3.0 -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/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircore -I/usr/include/mircookie -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/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/python2.7 -c src/gtk/_core_wrap.cpp -o build/temp.linux-x86_64-2.7/src/gtk/_core_wrap.o -pthread -O3 -pthread
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
src/gtk/_core_wrap.cpp: In function ‘void SWIG_Python_AddErrorMsg(const char*)’:
src/gtk/_core_wrap.cpp:864:42: error: format not a string literal and no format arguments [-Werror=format-security]
     PyErr_Format(PyExc_RuntimeError, mesg);
.
.
.
cc1plus: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Do someone have a solution for this issue?
Note that build passed on Ubuntu 14.04.

Thanks.

Scott Talbert

unread,
Jan 26, 2018, 1:04:04 PM1/26/18
to wxPython-dev
Why not just use the official Ubuntu packages?

But yes, you need this patch to fix that error:
https://sources.debian.org/src/wxpython3.0/3.0.2.0+dfsg-6/debian/patches/wxpython-missing-format-strings.patch/

Scott

Hung Ta

unread,
Jan 28, 2018, 8:57:09 PM1/28/18
to wxPython-dev
Thanks. But why don't you commit the fix to https://github.com/wxWidgets/wxPython also?

Scott Talbert

unread,
Jan 28, 2018, 10:38:59 PM1/28/18
to Hung Ta, wxPython-dev
Unfortunately, wxPython Classic is pretty much unmaintained at this point,
given that wxPython Phoenix will be released soon. The patch is to the
SWIG-generated files. Robin might apply the patch, but if he ever
re-SWIGs again, the fixes will get wiped out. The real problem is that
the version of SWIG used is too old, and I think there are custom patches
to SWIG.
> --
> You received this message because you are subscribed to the Google Groups
> "wxPython-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to wxPython-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
Reply all
Reply to author
Forward
0 new messages