wxPython 2.8.9.2 build fail

I’m using Arch linux and trying to build wxPython 2.8.9.2 from source, because it’s not available at ours repository.

I’m using a PKGBUILD file to automate the process and it’s the same as the 2.8.9.1 build, changing only the version number and checksums. The older version builds correctly.

The error output is the following:

WARNING: WXWIN not set in environment. Assuming ‘…’

Found wx-config: /usr/bin/wx-config
Using flags: --toolkit=gtk2 --unicode=yes --version=2.8
Preparing CORE…
Preparing GLCANVAS…
Preparing STC…
Preparing GIZMOS…
running build
running build_py

copying wx/version.py → build-gtk2.unicode/lib.linux-i686-2.6/wx
copying wx/build/build_options.py → build-gtk2.unicode/lib.linux-i686-2.6/wx/build
package init file ‘wx/tools/XRCed/plugins/init.py’ not found (or not a regular file)

package init file ‘wx/tools/XRCed/plugins/init.py’ not found (or not a regular file)
running build_ext
building ‘core’ extension
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=i686 -mtune=generic -O2 -pipe -fPIC -DSWIG_TYPE_TABLE=wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK_ -Iinclude -Isrc -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.6 -c src/gtk/_core_wrap.cpp -o build-gtk2.unicode/temp.linux-i686-2.6/src/gtk/_core_wrap.o -pthread -O3

cc1plus: warning: command line option “-Wstrict-prototypes” is valid for C/ObjC but not for C++
src/gtk/_core_wrap.cpp: In constructor ‘swig::PyObject_ptr::PyObject_ptr(PyObject*, bool)’:
src/gtk/_core_wrap.cpp:2670: warning: suggest explicit braces to avoid ambiguous ‘else’

src/gtk/_core_wrap.cpp: In function ‘bool wxSizer_Remove(wxSizer*, PyObject*)’:
src/gtk/_core_wrap.cpp:4657: warning: ‘virtual bool wxSizer::Remove(wxWindow*)’ is deprecated (declared at /usr/include/wx-2.8/wx/sizer.h:513)

src/gtk/_core_wrap.cpp: In function ‘PyObject* _wrap_GetAccelFromString(PyObject*, PyObject*, PyObject*)’:
src/gtk/_core_wrap.cpp:33822: warning: ‘wxAcceleratorEntry* wxGetAccelFromString(const wxString&)’ is deprecated (declared at /usr/include/wx-2.8/wx/utils.h:571)

src/gtk/_core_wrap.cpp:33822: warning: ‘wxAcceleratorEntry* wxGetAccelFromString(const wxString&)’ is deprecated (declared at /usr/include/wx-2.8/wx/utils.h:571)
src/gtk/_core_wrap.cpp: In function ‘PyObject* _wrap_Window_DragAcceptFiles(PyObject*, PyObject*, PyObject*)’:

src/gtk/_core_wrap.cpp:42358: error: ‘class wxWindow’ has no member named ‘DragAcceptFiles’
error: command ‘gcc’ failed with exit status 1

The PKGBUILD file is attached.

Is it a known problem on the 2.8.9.2 version or I’m missing something?

PKGBUILD (812 Bytes)

Lucas Boppre Niehues wrote:

I'm using Arch linux and trying to build wxPython 2.8.9.2 from source, because it's not available at ours repository.

I'm using a PKGBUILD file to automate the process and it's the same as the 2.8.9.1 build, changing only the version number and checksums. The older version builds correctly.

The error output is the following:

    src/gtk/_core_wrap.cpp: In function ‘PyObject*
    _wrap_Window_DragAcceptFiles(PyObject*, PyObject*, PyObject*)’:
    src/gtk/_core_wrap.cpp:42358: error: ‘class wxWindow’ has no member
    named ‘DragAcceptFiles’
    error: command 'gcc' failed with exit status 1

The PKGBUILD file is attached.

Is it a known problem on the 2.8.9.2 version or I'm missing something?

You are not using the 2.8.9.2 version of wxGTK. It is located in the wxPython source tarball along with the wxPython sources.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Do I have to install it separately or is there a way to make wxPython do it automatically?

Here I am again, still trying to build wxPython 2.8.9.2 from source because it’s not in the Arch repositories.

As Robin Dunn thankfully pointed the problem, I’m lacking the new version of wxGTK.

The problem is, where do I get it? Robin said it’s “in the wxPython source tarball along with the wxPython sources”, but I’ve been looking for it for quite some time and no progress was made. Even Google couldn’t help me with this.

So, please: where is wxGTK 2.8.9.2?

Robin Dunn wrote:

Lucas Boppre Niehues wrote:

I'm using Arch linux and trying to build wxPython 2.8.9.2 from source, because it's not available at ours repository.

I'm using a PKGBUILD file to automate the process and it's the same as the 2.8.9.1 build, changing only the version number and checksums. The older version builds correctly.

The error output is the following:

    src/gtk/_core_wrap.cpp: In function ‘PyObject*
    _wrap_Window_DragAcceptFiles(PyObject*, PyObject*, PyObject*)’:
    src/gtk/_core_wrap.cpp:42358: error: ‘class wxWindow’ has no member
    named ‘DragAcceptFiles’
    error: command 'gcc' failed with exit status 1

The PKGBUILD file is attached.

Is it a known problem on the 2.8.9.2 version or I'm missing something?

You are not using the 2.8.9.2 version of wxGTK. It is located in the wxPython source tarball along with the wxPython sources.

It's at the wxPython website in the download section near the bottom of the page. Here's a direct link to the file:

http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.9.2.tar.bz2

I've seen wxPython labeled wxGTK in Linux application managers before. Sometimes you have to just do a search for "wx" and then look at the description to see if you got the right one. The link above will get you the tarball and should just take care of the issue since Robin said what you need is in there.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Thanks Mike, but that file is exactly the source I’m currently using. And as I said, I couldn’t find anything related to wxGTK in the source tarball.

Is it in a separated part or do I have to pass a specific parameter to the build in order to use it?

Hello,

Thanks Mike, but that file is exactly the source I’m currently using. And as I said, I couldn’t find anything related to wxGTK in the source tarball.

Is it in a separated part or do I have to pass a specific parameter to the build in order to use it?
wxGTK just means a GTK build of wxWidgets. All the source for wxWidgets and wxPython are in that tarball.

I haven’t downloaded a tarball in a long time but IIRC it used to be like this.

wxPython/

wxPython/wxPython

You need to build and install the top level directory first (which is the wxWidgets library). Then build the wxPython source using the wxWidgets build you just did.

There are instructions on how to build right by where you downloaded the tarball from: http://wxpython.org/download.php#sources (see link labeled BUILD).

Cody

···

On Thu, Mar 5, 2009 at 10:23 AM, Lucas Boppre Niehues lucasboppre@gmail.com wrote:

Thank you Cody, you gave me the last part of this puzzle. Now I can understand Dunn’s and Mike’s replies.
The link you provided is well known by me, I have been following the BUILD and INSTALL guides for the last weeks, trying to build it from source for various reasons.
And I would like to apologize my “newbiness” about this whole source tarball building thing.
But now I finally managed to install it. If anyone else having the same problems read this, the steps were:
$ cd ~
$ wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.9.2.tar.bz2
$ tar xvf wxPython-src-2.8.9.2.tar.bz2
$ cd wxPython-src-2.8.9.2
$ mkdir bld
$ cd bld
$ …/configure
–prefix=/opt/wx/2.8
–with-gtk
–with-gnomeprint
–with-opengl
–enable-optimize
–enable-debug_gdb
–enable-geometry
–enable-graphics_ctx
–enable-sound --with-sdl
–enable-mediactrl
–enable-display
–enable-unicode
–enable-debug_flag
$ make && make -C contrib/src/gizmos && make -C contrib/src/stc

make install && make -C contrib/src/gizmos install && make -C contrib/src/stc install

$ PATH=$PATH:/opt/wx/2.8/bin
$ export PATH
$ LD_LIBRARY_PATH=/opt/wx/2.8/lib
$ export LD_LIBRARY_PATH
$ ldconfig
$ cd …/wxPython
$ python setup.py WX_CONFIG="/opt/wx/2.8/bin/wx-config" BUILD_GLCANVAS=“0” build

python setup.py install build_ext --inplace

Only two things went wrong:

  • the “glcanvas” extension, but everything ran smoothly when I disabled it (BUILD_GLCANVAS=“0”)
  • the “media” module was not present, even it being set at the configure script (–enable-mediactrl)

Sooner or later I will have to fix the mediactrl problem, but for now it’s great.

Thank you very much