Message: previous - next
Month: February 2014

Re: [trinity-devel] python-tqt FTBFS - ImportError: No module named sip4_tqt

From: "E. Liddell" <ejlddll@...>
Date: Sat, 8 Feb 2014 19:44:29 -0500
On Sat, 08 Feb 2014 18:12:43 -0600
"David C. Rankin" <drankinatty@...> wrote:

> E,
>   I tracked that code to line 752 in
>     # Build the program.
>     exe = compile_qt_program("mkfeatures.cpp", include_dir=sipcfg.py_inc_dir,
> python=1)
>     if not exe:
>         sipconfig.error("Unable to build mkfeatures utility.")
> mkfeatures.cpp looks good as well, I've attached it.
>   With the magic '-w' flag, I believe we have now found evidence of the reason
> behind the failure:
> cfgtest.cpp:1:21: fatal error: qcanvas.h: No such file or directory
>  #include <qcanvas.h>
>                      ^
>   Pretty obvious, it is looking for qcanvas.h, etc.. instead of tqcanvas.h which
> is in usr/include/tqt/tqcanvas.h.
>   It can't find usr/include/tqt/tqobject.h. WTF?
>   Why is the 't' not in present in build configuration files for python-tqt and
> why isn't is seeing the installed headers? The following includes should take
> care of it:
>   CFLAGS="${CFLAGS} -L${TDEDIR}/lib -I/usr/include/tqt -I${TDEDIR}/include
> -I${QTDIR}/include" \
>   CXXFLAGS="${CXXFLAGS} -L${TDEDIR}/lib -I/usr/include/tqt -I${TDEDIR}/include
> -I${QTDIR}/include" \
>   Other than providing CFLAGS/CXXFLAGS, I have no way of controlling that part
> of the python-tqt setup - do I? How to fix?

I'm not an expert on serpentine build systems either, alas--just providing what
guesses I can since everyone else seems to be equally Python-challenged.
The errors now bubbling up seem to be coming from cfgtest.cpp.  It's written
by another section of that script, by the check_class function 
(" def check_class . . .")  It's called in turn by check_module and check_plugin.
Some of the arguments passed to those functions are class names and include
directories.  Are all the calls to those looking for tq* and not q*?  The
Python script seems to have its own include directory tracking, and I'm not
sure how well it's integrated with CMake.

However, if this was building before, the problem may well be at the CMake
end.  Something isn't getting passed through.  The significant options for seem to be:
	-g dir  where the Qt qconfig.h file can be found [default Qt include directory]
	-l dir  the directory containing the VendorID header file
	-m dir  the directory containing the VendorID library
 	-n dir  the directory containing the QScintilla header files [default Qt include directory]
 	-o dir  the directory containing the QScintilla library [default Qt lib directory]
 	-q dir  the root directory of the Qt installation

Running "python -h" should give a more up-to-date version of that with
the defaults for -l, -m, -q properly indicated.  You're setting some of those, but not
all, IIRC.

E. Liddell