Bug 1164515

Summary: RFE: Qwt build for Qt5
Product: [Fedora] Fedora Reporter: Brallan Jesús Aguilar Rivera <apcomptec>
Component: qwtAssignee: Rex Dieter <rdieter>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: atu, frh+fedora, rdieter
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: qwt-6.1.2-1.fc21 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-02 17:21:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brallan Jesús Aguilar Rivera 2014-11-16 02:25:34 UTC
Description of problem:
The current version of Qwt works only with Qt4. Some errors are produced while build a Qt5 project using it in QtCreator.

Version-Release number of selected component (if applicable):
6.1.0

How reproducible:
Always

Steps to Reproduce:
1. Create a Qwt plot
2. Configure properly .pro file in QtCreator (add LIBS += -lqwt)
3. Compile. Segmentation fault is produced

Actual results:
The Qwt Fedora package was compiled using Qt4 instead of Qt5

Expected results:
Depending of the Qt version of the project, there would be a Qwt for it

Additional info:
http://stackoverflow.com/questions/21682219/segfault-in-qt-code-when-linking-qwt-libraries

Comment 1 Rex Dieter 2014-11-16 02:50:39 UTC
Hrm, last I tried, qwt didn't support qt5

I'll check again.

Comment 2 Rex Dieter 2014-11-16 02:52:39 UTC
http://qwt.sourceforge.net/qwtinstall.html

claims it does, but 

[ qwt-6.1.1]$ qmake-qt5 .
[ qwt-6.1.1]$ make
cd src/ && ( test -e Makefile || /usr/bin/qmake-qt5 /home/rdieter1/SCM/pkgs.fedoraproject.org/BUILDROOT/qwt-6.1.1/src/src.pro -o Makefile ) && make -f Makefile 
make[1]: Entering directory `/home/rdieter1/SCM/pkgs.fedoraproject.org/BUILDROOT/qwt-6.1.1/src'
g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++ -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtCore -Imoc -o obj/qwt_abstract_scale_draw.o qwt_abstract_scale_draw.cpp
In file included from qwt_scale_map.h:14:0,
                 from qwt_abstract_scale_draw.cpp:14:
qwt_transform.h:110:5: error: ‘QT_STATIC_CONST’ does not name a type
     QT_STATIC_CONST double LogMin;
     ^
qwt_transform.h:111:5: error: ‘QT_STATIC_CONST’ does not name a type
     QT_STATIC_CONST double LogMax;
     ^
make[1]: *** [obj/qwt_abstract_scale_draw.o] Error 1
make[1]: Leaving directory `/home/rdieter1/SCM/pkgs.fedoraproject.org/BUILDROOT/qwt-6.1.1/src'
make: *** [sub-src-make_first-ordered] Error 2


I'll try to contact upstream to find out what's going wrong here.

Comment 3 Rex Dieter 2014-11-16 03:52:00 UTC
I found upstream has a couple of Qt-5.4-specific fixes committed since 6.1.1 release, which look promising.

Comment 4 Rex Dieter 2014-11-16 04:00:21 UTC
Oh, it's too bad, upstream's Qt5 support is ... poor.

They currently do not support parallel-installs of both Qt4 and Qt5 versions (library names and support files are all named the same).

Fixing this is likely a prerequisite before we can ship a qt5-enabled qwt build in fedora.

Comment 5 Rex Dieter 2014-11-16 04:02:31 UTC
marking RFE/FutureFeature

Comment 6 Rex Dieter 2014-11-26 16:31:07 UTC
Fwiw, appended is the patch opensuse currently uses, referenced in upstream ml discussion on this topic,
http://sourceforge.net/p/qwt/mailman/message/33075738/

diff -urN qwt-6.1.0-orig/designer/designer.pro qwt-6.1.0/designer/designer.pro
--- qwt-6.1.0-orig/designer/designer.pro        2013-05-30 18:18:27.753341938 +0300
+++ qwt-6.1.0/designer/designer.pro     2013-09-16 18:10:22.317441101 +0300
@@ -95,7 +95,7 @@
             LIBS      += -L$${QWT_ROOT}/lib
         }

-        qwtAddLibrary(qwt)
+        qwtAddLibrary(Qt5Qwt)

         contains(QWT_CONFIG, QwtDll) {

diff -urN qwt-6.1.0-orig/src/src.pro qwt-6.1.0/src/src.pro
--- qwt-6.1.0-orig/src/src.pro  2013-05-30 18:18:27.693341940 +0300
+++ qwt-6.1.0/src/src.pro       2013-09-16 18:10:02.749374315 +0300
@@ -15,7 +15,7 @@
 include( $${QWT_ROOT}/qwtfunctions.pri )

 TEMPLATE          = lib
-TARGET            = $$qwtLibraryTarget(qwt)
+TARGET            = $$qwtLibraryTarget(Qt5Qwt)

 DESTDIR           = $${QWT_ROOT}/lib

Comment 7 Rex Dieter 2014-11-26 17:19:41 UTC
I'd *personally* opt for using qwt-qt5 name (instead of Qt5Qwt), but will wait for some consensus in the upstream discussion before implementing any change in our packaging.

Comment 8 Rex Dieter 2015-01-22 21:00:40 UTC
* Mon Dec 01 2014 Rex Dieter <rdieter> - 6.1.1-3
- RFE: Qwt build for Qt5 (#1164515)

Comment 9 Fedora Update System 2015-01-22 22:14:05 UTC
qwt-6.1.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/qwt-6.1.2-1.fc20

Comment 10 Fedora Update System 2015-01-22 22:16:22 UTC
qwt-6.1.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/qwt-6.1.2-1.fc21

Comment 11 Fedora Update System 2015-01-26 02:28:42 UTC
Package qwt-6.1.2-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qwt-6.1.2-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1069/qwt-6.1.2-1.fc21
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2015-02-02 17:21:15 UTC
qwt-6.1.2-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-02-02 17:21:47 UTC
qwt-6.1.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.