|
From: Mojca M. <moj...@gm...> - 2014-02-24 19:28:11
|
On Mon, Feb 24, 2014 at 7:25 PM, Ethan A Merritt wrote:
> On Monday, 24 February, 2014 19:01:02 Mojca Miklavec wrote:
>> Hi,
>>
>> I tried to test gnuplot with Qt5, but there is one flaw in the
>> configure script: I need to have pkg-config installed if I want to
>> build with Qt 5 even if I provide QT_CFLAGS and QT_LIBS.
>>
>> I have pkg-config and lots of other libraries installed via MacPorts,
>> but MacPorts doesn't provide Qt5. The problem is that as soon as any
>> given library (like libpng, libreadline, ...) comes from MacPorts that
>> means that -I/path/to/macports/include and -L/path/to/macports/lib
>> will consequently also pick Qt4 headers and libraries from MacPorts
>> instead of taking them from the location specified by QT_CFLAGS and
>> QT_LIBS, so I need to either uninstall Qt 4 from MacPorts or remove
>> any dependency on MacPorts.
>
> That doesn't follow. The situation is the same on linux in the sense
> that whichever Qt version is found first will be used by default.
The problem is that -I/opt/local/include seems to be the first
argument to compiler "no matter what". I inspected the Makefiles a bit
and it seems that this is set by CPPFLAGS. I'm not exactly sure what
sets it, but the workaround seems to be to set
export INCLUDES="$QT_CFLAGS"
which puts the paths to Qt5 in front of everything else. Without that,
Qt4 is always found first.
Despite this, I still believe that configuration should work properly
when pkg-config is absent.
Weird enough, after I have compiled gnuplot in a slightly different
way (without excluding MacPorts libraries, but maybe only the timing
has changed), I get
gnuplot> plot sin(x)
QIODevice::write: device not open
QIODevice::write: device not open
Error: short read from gnuplot_qt socket
gnuplot> qt_processTermEvent received a GE_fontprops event. This
should not have happened
gnuplot> plot sin(x)
but the mouse events work. The first plot is still very weird with
wrong font initializations. Something is still misbehaving.
Mojca
|