EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2012  <20132014  2015  2016  2017  2018  2019  Index 2012  <20132014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: epicsqt with Qt5.1.1, Qt-Creator 2.8.1
From: "Alexander S. Aryshev" <[email protected]>
To: Emmanuel Mayssat <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 17 Oct 2013 13:40:16 -0700
Title: Re: epicsqt with Qt5.1.1, Qt-Creator 2.8.1
Dear Emmanuel,

well... yes, you are correct. And it actually works well
on Qt4 (we are using it now). Although I can not find any 
reason why it should not work on Qt5. 

The changes I made to epicsqt in order to compile it under Qt5
were very simple and could be divided onto a few categories:
(unfortunately I did not made detailed changes log)

1. In .pro files
Line
QT += widgets uitools
was added
All CONFIG were set to debug_and_release
not sure if it was right thing to do.

2. #include<>
"QtGui" was replaced by "QtWidgets"
etc.

3. QWT functions
A few lines related to "canvas line width" were just commented out.

4. Qt functions
toAscii()  -> toLatin1()

end of QEDesignerPlugin.cpp
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2( QEWidgetsPlugin, QEWidgets )
#endif

and QEDesignerPlugin.h
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" )
#endif

5. Environment variables
#Qt
export QTDIR=/usr/local/Qt-5.1.1
export QTHOME=$QTDIR
export PATH=$PATH:$QTDIR/bin
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$QTDIR/lib"

#For GCC compilation and to resolve Qt GLIBCXX error 
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/lucxopr/Distr/mpc-0.8.1/src/.libs"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/lucxopr/Distr/gcc-4.8.1/i686-pc-linux-gnu/libstdc++-v3/src/.libs"

#QWT
export QWT_ROOT=/home/lucxopr/soft/QtTools/qwt-6.1.0
export QWTHOME=$QWT_ROOT
export QT_PLUGIN_PATH=${QWT_ROOT}/plugins/
export QWT_INCLUDE_PATH=$QWT_ROOT/include
export QWTDIR=$QWT_ROOT
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$QWT_ROOT/lib"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$QWT_ROOT/include"
export PATH=$PATH:$QWT_ROOT/include

#epicsqt
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH:/usr/local/Qt-5.1.1/plugins/designer"
export PATH=$PATH:/home/lucxopr/soft/QtTools/epicsqt/applications/QEGuiApp
export PATH=$PATH:/home/lucxopr/soft/QtTools/epicsqt/applications/QEMonitorApp
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/lucxopr/soft/QtTools/epicsqt/framework/designer
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH:/home/lucxopr/soft/QtTools/epicsqt/framework"
export QCAFRAMEWORK=/home/lucxopr/soft/QtTools/epicsqt/framework

After that qmake gave me following output:
15:33:10: Running steps for project epicsqt...
15:33:10: Starting: "/usr/local/Qt-5.1.1/bin/qmake" /home/lucxopr/soft/QtTools/epicsqt/epicsqt.pro -r -spec linux-g++
Reading /home/lucxopr/soft/QtTools/epicsqt/framework/framework.pro
Project MESSAGE: Applications may need to load the framework library directly. To ensure this can happen one option is to set up LD_LIBRARY_PATH to include the directory <your-epicsqt-project-location>/framework/designer. LD_LIBRARY_PATH is currently :/usr/lib:/home/lucxopr/soft/epics/base-3.14.12.3/lib/linux-x86:/home/lucxopr/soft/epics/extensions/lib/linux-x86:/usr/lib/python2.6/site-packages/numpy/core/include/numpy/:/home/lucxopr/Distr/wxPython-src-2.9.3.1/bld/lib:/home/lucxopr/Distr/wxPython-src-2.9.3.1/bld/lib:/usr/local/Qt-5.1.1/lib:/home/lucxopr/Distr/mpc-0.8.1/src/.libs:/home/lucxopr/Distr/gcc-4.8.1/i686-pc-linux-gnu/libstdc++-v3/src/.libs:/home/lucxopr/soft/QtTools/qwt-6.1.0/lib:/home/lucxopr/soft/QtTools/qwt-6.1.0/include:/home/lucxopr/soft/QtTools/qcustomplot/sharedlib-compilation:/home/lucxopr/soft/QtTools/epicsqt/framework/designer
Project MESSAGE: Applications may need to load the framework library as a Qt plugin. To ensure this can happen one option is to set up QT_PLUGIN_PATH to include the directory <your-epicsqt-project-location>/framework. QT_PLUGIN_PATH is currently /home/lucxopr/soft/QtTools/qwt-6.1.0/plugins/:/usr/local/Qt-5.1.1/plugins/designer:/home/lucxopr/soft/QtTools/epicsqt/framework
Project WARNING: QE_ARCHIVE_LIST is not defined. That's OK, but if you want to be able to backfill QEStripChart widgets from
Project WARNING: an archiver you should define this environment variable to be a space delimited list of your archiver URLs
Project WARNING: For example: 'archiver.synchrotron.org.au:80/cgi-bin/ArchiveDataServer1.cgi archiver.synchrotron.org.au:80/cgi-bin/ArchiveDataServer2.cgi'
Project WARNING: QE_ARCHIVE_LIST is not defined. That's OK, but if you want to be able to backfill QEStripChart widgets from
Project WARNING: an archiver you should define this environment variable to be a space delimited list of your archiver URLs
Project WARNING: For example: 'archiver.synchrotron.org.au:80/cgi-bin/ArchiveDataServer1.cgi archiver.synchrotron.org.au:80/cgi-bin/ArchiveDataServer2.cgi'
Project WARNING: QE_ARCHIVE_LIST is not defined. That's OK, but if you want to be able to backfill QEStripChart widgets from
Project WARNING: an archiver you should define this environment variable to be a space delimited list of your archiver URLs
Project WARNING: For example: 'archiver.synchrotron.org.au:80/cgi-bin/ArchiveDataServer1.cgi archiver.synchrotron.org.au:80/cgi-bin/ArchiveDataServer2.cgi'
Reading /home/lucxopr/soft/QtTools/epicsqt/applications/QEGuiApp/QEGuiApp.pro
Reading /home/lucxopr/soft/QtTools/epicsqt/applications/QEMonitorApp/QEMonitorApp.pro
15:33:13: The process "/usr/local/Qt-5.1.1/bin/qmake" exited normally.
15:33:13: Elapsed time: 00:03.

...and make gave the next output

15:34:01: Running steps for project epicsqt...
15:34:01: Configuration unchanged, skipping qmake step.
15:34:01: Starting: "/usr/bin/make" -j 4
cd framework/ && ( test -e Makefile || /usr/local/Qt-5.1.1/bin/qmake /home/lucxopr/soft/QtTools/epicsqt/framework/framework.pro -spec linux-g++ -o Makefile ) && /usr/bin/make -f Makefile 
make[1]: Entering directory `/home/lucxopr/soft/QtTools/epicsqt/framework'
/usr/bin/make -f Makefile.Release
make[2]: Entering directory `/home/lucxopr/soft/QtTools/epicsqt/framework'

Skipping many output lines here...

widgets/QEImage/QEImage.cpp: In member function 'void QEImage::setImage(const QByteArray&, long unsigned int, QCaAlarmInfo&, QCaDateTime&, const unsigned int&)':
widgets/QEImage/QEImage.cpp:687:31: warning: 'minBits' may be used uninitialized in this function [-Wmaybe-uninitialized]
     elementsPerPixel = minBits/(imageDataSize*8);

Skipping many output lines...

15:35:37: The process "/usr/bin/make" exited normally.
15:35:37: Elapsed time: 01:37.

Personally I suspect that I was not correct with Q_PLUGIN_METADATA
and that is why the library can not be loaded...

Thanks a lot!

Cheers,
Alex


epicsqt is build on Qt4
although the Qt4 to Qt5 migration should be simple, 
I recommend you first try your installation on Qt4.

PS: I am not an epicsqt developer!
--
Emmanuel

> Date: Tue, 15 Oct 2013 19:35:16 -0700
> From: [email protected]
> To: [email protected]
> Subject: epicsqt with Qt5.1.1, Qt-Creator 2.8.1

> Dear QTi-talk,

> I am trying to compile epicsqt 2.7.1 with
> very standard installation of Qt5.1.1 and install
> its plugin into designer under Qt-creator 2.8.1 on
> Scientific Linux 6.4 (kernel 2.6.32-358.18.1.el6.i686).

> The Creator itself was build from src under the same version of Qt.
> The QWT version is 6.1.0. It was also build from src and seems
> working ok (all examples are working fine).

> EPICS base3.14.12.3 is installed and all env. variables are defined.

> After all standard changes http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5
> applied to epicsqt 2.7.1 it was built without any errors
> (just warnings about QE_ARCHIVE_LIST is not defined).
> After that I have defined QT_PLUGIN_PATH pointed to framework folder
> where designer folder with libQEPlugin.so was.

> Unfortunately this library always return
> "Plugin verification data mismatch" on loading.

> Does anyone had a similar problem and know how to solve it?

> Below is a list of my environment.

> With the best regards,
> Alex


> Qt 5.1.1 (Qt-5.1.1)
> ABI: x86-linux-generic-elf-32bit
> Source: /usr/local/Qt-5.1.1
> mkspec: linux-g++
> qmake: /usr/local/Qt-5.1.1/bin/qmake
> Version: 5.1.1
> QMAKE_SPEC linux-g++
> QMAKE_VERSION 3.0
> QMAKE_XSPEC linux-g++
> QT_HOST_BINS /usr/local/Qt-5.1.1/bin
> QT_HOST_DATA /usr/local/Qt-5.1.1
> QT_HOST_LIBS /usr/local/Qt-5.1.1/lib
> QT_HOST_PREFIX /usr/local/Qt-5.1.1
> QT_INSTALL_ARCHDATA /usr/local/Qt-5.1.1
> QT_INSTALL_BINS /usr/local/Qt-5.1.1/bin
> QT_INSTALL_CONFIGURATION /usr/local/Qt-5.1.1/etc/xdg
> QT_INSTALL_DATA /usr/local/Qt-5.1.1
> QT_INSTALL_DEMOS /usr/local/Qt-5.1.1/examples
> QT_INSTALL_DOCS /usr/local/Qt-5.1.1/doc
> QT_INSTALL_EXAMPLES /usr/local/Qt-5.1.1/examples
> QT_INSTALL_HEADERS /usr/local/Qt-5.1.1/include
> QT_INSTALL_IMPORTS /usr/local/Qt-5.1.1/imports
> QT_INSTALL_LIBEXECS /usr/local/Qt-5.1.1/libexec
> QT_INSTALL_LIBS /usr/local/Qt-5.1.1/lib
> QT_INSTALL_PLUGINS /usr/local/Qt-5.1.1/plugins
> QT_INSTALL_PREFIX /usr/local/Qt-5.1.1
> QT_INSTALL_QML /usr/local/Qt-5.1.1/qml
> QT_INSTALL_TESTS /usr/local/Qt-5.1.1/tests
> QT_INSTALL_TRANSLATIONS /usr/local/Qt-5.1.1/translations
> QT_SYSROOT
> QT_VERSION 5.1.1

> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.8.1/lto-wrapper
> Target: i686-pc-linux-gnu
> Configured with: ./configure
> Thread model: posix
> gcc version 4.8.1 (GCC) 



Replies:
Re: epicsqt with Qt5.1.1, Qt-Creator 2.8.1 Jennings Guy
References:
epicsqt with Qt5.1.1, Qt-Creator 2.8.1 Alexander S. Aryshev
RE: epicsqt with Qt5.1.1, Qt-Creator 2.8.1 Emmanuel Mayssat

Navigate by Date:
Prev: Re: epicsqt with Qt5.1.1, Qt-Creator 2.8.1 Jennings Guy
Next: caQtDM Mezger Anton Christian
Index: 2012  <20132014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: epicsqt with Qt5.1.1, Qt-Creator 2.8.1 Emmanuel Mayssat
Next: Re: epicsqt with Qt5.1.1, Qt-Creator 2.8.1 Jennings Guy
Index: 2012  <20132014  2015  2016  2017  2018  2019 
ANJ, 22 Oct 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·