On 2016-01-21 21:23-0500 Hazen Babcock wrote:

>
> Hello,
>
> As Qt4 is now at least technically no longer supported I thought I might 
> spend some time to see if I could get our PyQt bindings to work with Qt5. 
> However unfortunately I can't even build PLplot with Qt5 due to a cmake 
> error. Any suggestions would be appreciated.
>
> The error message:
>
> CMake Error at bindings/qt_gui/CMakeLists.txt:54 (target_link_libraries):
>  The plain signature for target_link_libraries has already been used with
>  the target "plplotqt".  All uses of target_link_libraries with a target
>  must be either all-keyword or all-plain.
>
>  The uses of the plain signature are here:
>
>   * /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:278 
> (target_link_libraries)
>
>
> I used this command in my build directory:
> cmake -DPLPLOT_USE_QT5=ON ../plplot > cmake.txt 2>&1

Hi Hazen:

If you compare the two target_link_libraries commands on the exact
lines mentioned in the error message, bindings/qt_gui/CMakeLists.txt
uses the PRIVATE keyword, and Qt5CoreMacros.cmake uses no keywords at
all, and apparently from the error message that combination of keyword
signature and plain text signature for target_link_libraries commands
for the same target is not allowed by CMake.

I had success with a build of PLplot against Qt5 some time ago.  But I am pretty
sure that predated May 2015 when "git blame" tells me I introduced
that PRIVATE keyword in bindings/qt_gui/CMakeLists.txt.  So I would
try locally removing PRIVATE from the offending line in
bindings/qt_gui/CMakeLists.txt.  That might introduce some
overlinking issues, but I don't think you have to be concerned with
those.

Also, please follow the advice in the first two lines of cmake.txt,
namely

-- WARNING: CMAKE_VERSION = 3.2.2 is in the range from 3.2 through 3.3.1 which 
has
    a compromised find ability that was fixed in 3.3.2.  Please upgrade to 
3.3.2 or greater.

I suggest trying 3.3.2 instead of exploring 3.4.x territory just yet
because we have a lot of good experience with 3.3.2, and we have little
experience of any kind with 3.4.x.

Anyhow, with the above workaround and CMake-3.3.2, I think you
should likely be able to build PLplot against Qt5, but let me
know if you encounter any further issues.

By the way, Qt4 is virtually CMake-unaware so that CMake has to do
everything for it in house (but in a well-understood and stable way
that virtually always works).  In contrast Qt5 supplies a lot of CMake
support files that help CMake figure out how to build software against
Qt5, but there is a lot of churn on both the CMake side and Qt5 side
on how the two work together. Part of that churn is there are about 4
different build methods of various vintages that are supported for the
two working together.  I chose the most modern of those methods that
was available for our minimum CMake version at the time, but our CMake
minimum version is higher now so I might be able to use a still more
modern build method which might avoid the above issue altogether.
Although I don't have time to explore that possibility any time soon,
it is something to keep in mind for the future.

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
__________________________

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to