Results 1 to 10 of 10

Thread: Building qwt-6.0.2 with qt-4.8

  1. #1
    Join Date
    Feb 2012
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Building qwt-6.0.2 with qt-4.8

    This is my first post here, so please be patient with me.
    I am trying to build qwt-6.0.2 against qt-4.8.0 on RedHat Enterprise Linux 6 64bit computer. The build fails with many errors and here is the beginning of it:

    zms@ilc-esb09 $ qmake
    zms@ilc-esb09 $ make
    cd src/ && make -f Makefile
    make[1]: Entering directory `/opt/qt/qwt-6.0.2/src'
    g++ -c -pipe -Wall -W -g -fPIC -I/usr/lib64/qt-3.3/mkspecs/default -I. -I/opt/qt/qt-4.8/Desktop/Qt/4.8.0/gcc/include -Imoc/ -o obj/qwt_abstract_scale_draw.o qwt_abstract_scale_draw.cpp
    In file included from qwt_abstract_scale_draw.h:13,
    from qwt_abstract_scale_draw.cpp:10:
    qwt_global.h:13:21: error: qglobal.h: No such file or directory
    In file included from qwt_scale_div.h:14,
    from qwt_abstract_scale_draw.h:14,
    from qwt_abstract_scale_draw.cpp:10:
    qwt_interval.h:15:20: error: qdebug.h: No such file or directory
    In file included from qwt_abstract_scale_draw.h:14,
    from qwt_abstract_scale_draw.cpp:10:
    qwt_scale_div.h:15:19: error: qlist.h: No such file or directory
    In file included from qwt_abstract_scale_draw.h:15,
    from qwt_abstract_scale_draw.cpp:10:
    qwt_text.h:14:21: error: qstring.h: No such file or directory
    qwt_text.h:15:19: error: qsize.h: No such file or directory
    qwt_text.h:16:19: error: qfont.h: No such file or directory

    I have successfully build qwt-6.0.2 against qt-4.7.0 on rhel5 32bit Linux.
    The build output is entirely different in this successful case, where I do not see the g++ command, instead
    compiling <some file.cpp>
    is printed for each file that is being compiled. Could be that something is not right with my qt installation?

    I appreciate any suggestions as to what I need to do to correct this problem.
    Thanks,
    Zen

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,188
    Thanked 843 Times in 792 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    Quote Originally Posted by iamzen View Post
    g++ -c -pipe -Wall -W -g -fPIC -I/usr/lib64/qt-3.3/mkspecs/default ...
    Qwt 6.x is not compatible with Qt 3.3.

    Uwe

  3. #3
    Join Date
    Feb 2012
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Building qwt-6.0.2 with qt-4.8

    Thank you Uwe.
    RHEL6 comes with qt-3.3 and qt-4. I have installed qt-4.8 64bit version and could not figure out what to modify so that the qt-3.3 was not being dragged in, so I have uninstalled it. This is probably not the best solution but I was able to build qwt.
    Zen

  4. #4
    Join Date
    Nov 2008
    Location
    Berlin, Germany
    Posts
    13
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt/Embedded PyQt3 PyQt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Building qwt-6.0.2 with qt-4.8

    Quote Originally Posted by iamzen View Post
    Thank you Uwe.
    RHEL6 comes with qt-3.3 and qt-4. I have installed qt-4.8 64bit version and could not figure out what to modify so that the qt-3.3 was not being dragged in, so I have uninstalled it. This is probably not the best solution but I was able to build qwt.
    Zen
    The trick is to use the qmake that come with the target qt installation. If you call /usr/path-to-qt4.8/bin/qmake the qwt will be built correctly.

  5. #5
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    87
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    Quote Originally Posted by eehmke View Post
    The trick is to use the qmake that come with the target qt installation. If you call /usr/path-to-qt4.8/bin/qmake the qwt will be built correctly.
    7 years after this was answered, I have the same problem. I am building qwt-6.1.3 with Qt-4.8.6 on Ubuntu 16.04.

    >which qmake
    gives
    /usr/local/Qt-4.8.6/bin/qmake

    I do:
    qmake qwt.pro
    make

    and get:

    compiling qwt_abstract_scale_draw.cpp
    In file included from qwt_abstract_scale_draw.h:15:0,
    from qwt_abstract_scale_draw.cpp:10:
    qwt_text.h:16:19: fatal error: qfont.h: No such file or directory
    compilation terminated.

    But of course qfont.h is there:
    /usr/local/Qt-4.8.6/include/Qt/qfont.h
    /usr/local/Qt-4.8.6/include/QtGui/qfont.h

    The same happens if I use:
    /usr/local/Qt-4.8.6/bin/qmake qwt.pro

    What am I doing wrong?

  6. #6
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    87
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    Here is the Makefile (with '.txt' added/)
    Attached Files Attached Files

  7. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,188
    Thanked 843 Times in 792 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    Remove CONFIG += silent in qwtbuild.pri and check the include path in the compiler commands that are printed to the console.

    Uwe

  8. #8
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    87
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    Hi Uwe,
    I found the answer and thought I posted it yesterday, but it didn't appear.
    'make clean' does not remove src/Makefile. I had started trying to build with Qt5, but then switched to using Qt4. src/Makefile contained references to Qt5 from my first attempt, and since I had removed Qt5 from my system the build failed. After I deleted src/Makefile everything went smoothly.
    I suggest a small change to the build system to ensure that src/Makefile is removed on a clean (maybe later versions of qwt already have that change.)

    Gib

  9. #9
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,188
    Thanked 843 Times in 792 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    This is what make distclean is doing.

    Uwe

  10. #10
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    87
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Building qwt-6.0.2 with qt-4.8

    Thanks, I didn't know about that.

Similar Threads

  1. Building QT example
    By Aman607 in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2011, 12:10
  2. Re-Building Qt on Mac
    By dpatel in forum Qt Programming
    Replies: 0
    Last Post: 18th May 2011, 12:16
  3. Building X11 on Mac
    By wjlyerly in forum Installation and Deployment
    Replies: 1
    Last Post: 14th February 2010, 16:59
  4. Building Qt 4.6 rc
    By eekhoorn12 in forum Installation and Deployment
    Replies: 4
    Last Post: 3rd December 2009, 07:13
  5. Building on OSX
    By sbauer in forum Newbie
    Replies: 4
    Last Post: 4th September 2009, 14:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.