|
From: Ethan A M. <sf...@us...> - 2014-02-24 18:26:15
|
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. On my machines qt5 is found before qt4 if both are present. You can override this by ./configure --with-qt=qt4 If you like, I can add a similar configure option --with-qt=qt5 but alternatively you can just make sure that the qt5 directories come before the MacPorts/qt4 directories in your various path statements. Ethan > > But if I remove MacPorts from PATH completely, gnuplot refuses to > include Qt due to lack of pkg-config: > > checking for QT... configure: WARNING: > The pkg-config script could not be found or is too old. Make sure it > is in your PATH or set the PKG_CONFIG environment variable to the full > path to pkg-config. > > Alternatively, you may set the environment variables QT_CFLAGS > and QT_LIBS to avoid the need to call pkg-config. > See the pkg-config man page for more details. > > To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. > checking for QT... configure: WARNING: > The pkg-config script could not be found or is too old. Make sure it > is in your PATH or set the PKG_CONFIG environment variable to the full > path to pkg-config. > > Alternatively, you may set the environment variables QT_CFLAGS > and QT_LIBS to avoid the need to call pkg-config. > See the pkg-config man page for more details. > > To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. > configure: WARNING: The Qt terminal will not be compiled. > checking that generated files are newer than configure... done > > > Can the configure script please be changed in such a way that > pkg-config becomes optional in the case of Qt (5)? I don't have any > simple patch ready for that, but you can see below what I needed apart > from hacking the ./configure[.in] just to get a rough idea. > > > There is a chance that I've screwed something up (or that there are > problems with the repository I'm using), but gnuplot with Qt 5 seems > pretty nonfunctional on Mac OS X. > > It starts with > > > plot sin(x) > QIODevice::write: device not open > QIODevice::write: device not open > Error: short read from gnuplot_qt socket > > then nevertheress plots something, but uses the wrong dimensions and > doesn't allocate any space for fonts. The second plot works better and > uses proper dimensions (I can send screenshots if anyone is > interested). The third plot throws: > > qt_processTermEvent received a GE_fontprops event. This should not have happened > > Mouse events (increasing or decreasing the window) don't work at all. > Or rather: they do work in a weird way. If I try to move the second > plot around, the second plot isn't changed, but the third plot is > moved. If I increase or decrease the window, the plot doesn't change, > but the next plot adapts to those dimensions. > > If I type "quit" to fast (soon after the first plot), the following is thrown: > > > Event not swallowed ! 1041 > ############### WRONG readEvent 0 6851 > > I'm sorry for not testing Qt 5 earlier, but it's relatively > non-trivial to figure out how to build gnuplot against Qt 5.2 on Mac. > Here is what I eventually used: > > export QT_PATH=/path/to/qt/5.2.1/clang_64 > > export QT_LIBS="-F$QT_PATH/lib \ > -framework QtCore \ > -framework QtGui \ > -framework QtWidgets \ > -framework QtNetwork \ > -framework QtSvg \ > -framework QtPrintSupport" > > # NOTE: CFLAGS usually look more like > # -framework QtCore, > # but then it would need to be used as > # #include <QtCore/QtCore> > # > # Current use of headers requires the weird > # -I$QT_PATH/lib/QtCore.framework/Headers > > export QT_CFLAGS="-F$QT_PATH/lib \ > -I$QT_PATH/lib/QtCore.framework/Headers \ > -I$QT_PATH/lib/QtGui.framework/Headers \ > -I$QT_PATH/lib/QtWidgets.framework/Headers \ > -I$QT_PATH/lib/QtNetwork.framework/Headers \ > -I$QT_PATH/lib/QtSvg.framework/Headers" > > export UIC=$QT_PATH/bin/uic > export MOC=$QT_PATH/bin/moc > export RCC=$QT_PATH/bin/rcc > > export CC=clang > export CXX=clang++ > > export EMACS=no > > export PATH=/usr/bin:/bin:/usr/sbin:/sbin > > ./configure --with-qt --prefix=$PWD/inst > > > I can test the latest released version to see how that behaves, but it > would be of enormous help when testing numerous patches if the > repository was using some other version control system. I'm unable to > work with CVS and I have a somewhat screwed-up GIT mirror (thanks to > bugs in "git cvsimport"). Combined with all other problems related to > non-trivial Qt5 configuration ... there are simply a lot of obstacles > preventing easy testing. > > I will compare the results with the released version (with branch 4.6) > next, but really ... it would help me a lot if conversion to git was > done prior to that. > > Thank you, > Mojca > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |