On Fri, Mar 14, 2014 at 07:12:30PM -0700, Alan Irwin wrote:
> 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.

Neither had I until I stumbled across it in another post about debugging 
issues with dynamic loading of libraries. Definitely a useful thing
to remember.
 
> >
> > 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.

Sounds a good idea. It might be worth experimenting with the new support, 
but for now the approach works on both Qt4 and Qt5.

> > 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.

Yes, that is all with 5.2.0. I've run make test_all_qt and all the 
targets work except test_qt_example. Note you need the QtImageFormats 
module for the tiff format. The other bitmap formats are available by 
default. If you don't install the module then plplot just generates 
empty files with no warning, as I discovered the hard way.

I've lowered the minimum requirements to 5.2.0.
 
Andrew

------------------------------------------------------------------------------
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