enthought/mayavi — Issue #24: Build fails with "QWidget: Must construct a QApplication before a QPaintDevice"
Author: mluessi
Created: 2012-02-18 20:06:49+00:00
State: open

Hi,

I am trying to compile mayavi 4.1.0 on Gentoo linux (amd64) and it fails to build the TVTK classes with the error "QWidget: Must construct a QApplication before a QPaintDevice" (see output below). There is also a Gentoo bug report for the same problem:

https://bugs.gentoo.org/show_bug.cgi?id=399537

I am using VTK 5.8.0 and Qt 4.7.4. Has anyone encountered this problem before, or any ideas what could be causing it? I am happy to help resolving this issue.

Best,

Martin

Build output:
>>> Compiling source in /var/tmp/portage/sci-visualization/mayavi-4.1.0/work/mayavi-4.1.0 ...
* Building of sci-visualization/mayavi-4.1.0 with CPython 2.7...
python2.7 setup.py build -b build-2.7
running build
----------------------------------------------------------------------
Building TVTK classes... vtkSimple3DCirclesStrategy: Ignoring method: Get/SetMarkedValue
default: (invalid), range: None
vtkArrayNorm: Ignoring method: Get/SetWindow
default: [0, 9223372036854775807), range: None
vtkChart: Ignoring method: Get/SetSize
default: [0.0, 0.0, 0.0, 0.0], range: None
QWidget: Must construct a QApplication before a QPaintDevice
/var/tmp/portage/sci-visualization/mayavi-4.1.0/temp/environment: line 1368: 1461 Aborted "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build -b "$(_distutils_get_build_dir)" "$@"