On 2014-03-15 00:28-0000 Andrew Ross wrote:

> OK. So the file not found error is a slight read herring. Following some
> googling I tried
>
> LD_DEBUG=all test-drv-info qt
>
> and came up with the following error
>
>    31836:     
> /home/andrew/software/plplot/build_qt5/bindings/qt_gui/libplplotqtd.so.1: 
> error: symbol lookup error: undefined symbol: _ZTV11QtExtWidget (fatal)
>
> so it is actually a problem with linking to libplplotqtd.

I had never heard of LD_DEBUG before, but when I googled for it, it
does seem to be a powerful way to figure out linking issues on Linux.  So thanks
for drawing that weapon in the arsenal to my attention.

>
> Looking further this turns out to be because moc is not being run on
> include/qt.h.  There is a new automoc facility in CMake (which I assume
> is what Alan's comment in include/CMakeLists.txt was referring to as the
> "different method in Qt5". Our file usage doesn't appear to meet the
> conditions for this though, and also we weren't actually setting the
> automoc property! Anyway, you can still use the old method, but the cmake
> is now qt5_wrap_cpp. I've changed back to using this and all works fine.

The impression I got from reading the (somewhat terse) information in
http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html is
that for 2.8.9 (our minimum CMake version) or later versions of CMake,
that the qt5_use_modules macro is all that needs to be called.  For
example, qt5_wrap_cpp is only mentioned for the case of CMake version
2.8.3 (or above).  So the impression left is that it will work, as you
have found, but it is old-fashioned if you can guarantee your users
are using 2.8.9 or above (as in our case).  However, the only other
mention of automoc in that document is for 2.8.11 (which we cannot
guarantee for our users) or above where automoc target properties and
the CMAKE_AUTOMOC variable which controls are apparently first
available for CMake in a way that supports Qt5.  (The corresponding
cmake documentation for 2.8.9 does mention CMAKE_AUTOMOC, but goes out
of its way to mention only Qt4 for that case.) So I now suspect you
have found the only possibility that will work for all our users until
we bump our minimum CMake version from 2.8.9 to at least 2.8.11.

In sum I suspect your changes were the only way to go for now.  I also
(revision 13059) made an additional change for didactic reasons, but
this additional change should have no practical consequences.

> With this final change I can now compile and run plplot and the examples
> with qt5.

Were all your good test results for Qt-5.2.0?  If so, please commit
the approprate change to cmake/modules/qt.cmake to lower the current minimum
version of Qt5 that we support from 5.2.1 to 5.2.0.

> RM, how do you get on with these latest changes?

RM, I am interested in your reply to that question as well. :-)

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to