Results 1 to 8 of 8

Thread: Building Qwt 6.1.0 RC3 on OS X (from the command line)

  1. #1
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Hi, I am trying to build Qwt 6.1.0 RC3 on OS X doing the following:

    Qt Code:
    1. $ cd qwt-6.1-rc3
    2. $ qmake
    3. $ make
    To copy to clipboard, switch view to plain text mode 

    but then, I got the following errors/warnings:

    ...
    compiling qwt_widget_overlay.cpp
    In file included from qwt_widget_overlay.cpp:10:
    ./qwt_widget_overlay.h:147:12: warning: private field 'm_rgbaBuffer' is not used [-Wunused-private-field]
    uchar* m_rgbaBuffer;
    ^
    1 warning generated.
    ...
    compiling qwt_plot_shapeitem.cpp
    qwt_plot_shapeitem.cpp:245:34: warning: equality comparison result unused [-Wunused-comparison]
    d_data->boundingRect == QwtPlotItem::boundingRect();
    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~
    qwt_plot_shapeitem.cpp:245:34: note: use '=' to turn this equality comparison into an assignment
    d_data->boundingRect == QwtPlotItem::boundingRect();
    ^~
    =
    1 warning generated.
    ...
    rm -f qwt qwt.framework/qwt ../lib/qwt.framework/qwt
    linking ../lib/qwt.framework/qwt
    ld: warning: directory not found for option '-F/Applications/Qt5.0.1/5.0.1/clang_64/qtbase/lib'
    mv -f qwt ../lib/qwt.framework/Versions/6/qwt
    ln -s Versions/6/qwt ../lib/qwt.framework/qwt
    rm -f ../lib/qwt.framework/Versions/Current
    ln -s 6 ../lib/qwt.framework/Versions/Current
    cd textengines/ && ( test -f Makefile || /Applications/Qt5.0.1/5.0.1/clang_64/bin/qmake /Users/Alan/Desktop/qwt-6.1-rc3/textengines/textengines.pro -o Makefile ) && make -f Makefile
    make[1]: Nothing to be done for `first'.
    cd designer/ && ( test -f Makefile || /Applications/Qt5.0.1/5.0.1/clang_64/bin/qmake /Users/Alan/Desktop/qwt-6.1-rc3/designer/designer.pro -o Makefile ) && make -f Makefile
    compiling qwt_designer_plugin.cpp
    compiling qwt_designer_plotdialog.cpp
    rcc qwt_designer_plugin.qrc
    compiling resources/qrc_qwt_designer_plugin.cpp
    moc qwt_designer_plugin.h
    compiling moc/moc_qwt_designer_plugin.cpp
    moc qwt_designer_plotdialog.h
    compiling moc/moc_qwt_designer_plotdialog.cpp
    rm -f libqwt_designer_plugin.dylib
    linking plugins/designer/libqwt_designer_plugin.dylib
    ld: warning: directory not found for option '-F/Applications/Qt5.0.1/5.0.1/clang_64/qtbase/lib'
    ld: library not found for -lqwt
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [plugins/designer/libqwt_designer_plugin.dylib] Error 1
    make: *** [sub-designer-make_first-ordered] Error 2
    Regarding the two warnings, it would probably be nice to fix them, especially the second one. As for the error, I would have expected Qwt's build system to handle it? If not, what is then needed to get Qwt to build out-of-the-box on OS X?

  2. #2
    Join Date
    Nov 2012
    Posts
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Try:
    Qt Code:
    1. qmake qwt.pro -spec macx-clang-libc++
    To copy to clipboard, switch view to plain text mode 

    or macx-clang
    or macx-g++

    Calling qmake with no mkspec always fails (for me). All these work for me.

  3. #3
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Well, I have just tried with macx-clang-libc++, macx-clang and then macx-g++, but in all three cases I ended up with what I mentioned in my original post. FWIW, I am running OS X 10.8.2 with version 4.2 of clang (through Xcode 4.6).

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Concerning the error there was some discussion on the mailing list - use the version from SVN trunk for a fixed version ( beside on Windows don't build debug_and_release - instead debug only + release only ).
    The second warning has been fixed in trunk some time ago - the first one needs to be done.

    There is a reason for having more rc versions: I don't have most of the environments where Qwt is used myself.

    Uwe

  5. #5
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Hi Uwe,

    Thanks a lot for the suggestion. I have just got the trunk version of Qwt and, indeed, it builds fine out-of-the-box. However, I couldn't run the examples since the bundles are not able to find Qwt. E.g.:

    Qt Code:
    1. $ cd ~/qwt/examples/bin/realtime.app/Contents/MacOS
    2. $ otool -L realtime
    3. realtime:
    4. qwt.framework/Versions/6/qwt (compatibility version 6.1.0, current version 6.1.0)
    5. ...
    6. $
    To copy to clipboard, switch view to plain text mode 

    In the end, I had to do the following to be able to run the example:

    Qt Code:
    1. $ install_name_tool -change qwt.framework/Versions/6/qwt [Qwt]/lib/qwt.framework/Versions/6/qwt realtime
    To copy to clipboard, switch view to plain text mode 

    So, not quite able to build and run out-of-the-box.

    Otherwise, I greatly appreciate your work on Qwt, so would it be worth setting up some kind of a web page that would contain a matrix of the platforms on which a particular release of Qwt has been or should be tested? I mean, I would certainly be happy to test things for you (given the exact steps to follow to test Qwt) since I use it on Windows 7 (32-bit and 64-bit), Ubuntu 12.04 (32-bit and 64-bit) and OS X 10.8.2 on a daily basis. (I don't use the Qt project files you provide and, instead, have my own CMake file, but that's besides the point, I could still test things, if needed.)

  6. #6
    Join Date
    Nov 2012
    Posts
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Quote Originally Posted by agarny View Post
    Well, I have just tried with macx-clang-libc++, macx-clang and then macx-g++, but in all three cases I ended up with what I mentioned in my original post. FWIW, I am running OS X 10.8.2 with version 4.2 of clang (through Xcode 4.6).
    I am using the latest versions, and it compiles flawlessly. But your initial error was for the designer plugin, which I've never built.

    So, not quite able to build and run out-of-the-box.
    I run the examples directly from Qt Creator, benefits of this include
    • the environment (paths) are automatically handled on all platforms (no need for install_name_tool, DYLD_LIBRARY_PATH, ldd, LD_LIBRARY_PATH, or depends.exe)
    • you can open the code and step through it
    • and the procedure for running an example is identical on all platforms (just right click the example and select Run).


    A have to admit, I've still never installed Qwt to system. I keep it in '~/working/qwt/qwt', and '~/working/qwt/qwt-qt4'. I like doing it this way as it keeps the platform sections of my .pro file similar.

    When deploying, as I don't install the framework, macdeployqt doesn't work properly with it, here is the Mac section of my qwt.pri file:

    Qt Code:
    1. macx {
    2. # Qwt
    3. QWT_SOURCE_DIR = $$quote($$TOP_SRC_DIR/../qwt)
    4.  
    5. DEFINES += _USE_MATH_DEFINES
    6.  
    7. contains(DEFINES, LT_QWT_DLL) {
    8. DEFINES += QWT_DLL
    9. LIBS += -L$$QWT_SOURCE_DIR/lib -lqwt
    10.  
    11. QWT_BUNDLE_DATA.files = $$QWT_SOURCE_DIR/lib/libqwt.6.dylib
    12. QWT_BUNDLE_DATA.path = Contents/MacOS
    13. QMAKE_BUNDLE_DATA += QWT_BUNDLE_DATA
    14. QMAKE_CLEAN += $$DESTDIR/$${TARGET}.app/Contents/MacOS/libqwt.6.dylib
    15. } else {
    16. QMAKE_LFLAGS += -F$$QWT_SOURCE_DIR/lib/
    17. LIBS += -framework qwt
    18.  
    19. QWT_BUNDLE_DATA.files = $$QWT_SOURCE_DIR/lib/qwt.framework
    20. QWT_BUNDLE_DATA.path = Contents/Frameworks
    21. QMAKE_BUNDLE_DATA += QWT_BUNDLE_DATA
    22.  
    23. contains(TEMPLATE, app) {
    24. QMAKE_POST_LINK += \
    25. $(MKDIR) $$DESTDIR/$${TARGET}.app/$$QWT_BUNDLE_DATA.path $$escape_expand( \\n\\t )
    26. for(a, QWT_BUNDLE_DATA.files):exists($${a}){
    27. QMAKE_POST_LINK += \
    28. $(CHK_DIR_EXISTS) $$DESTDIR/$${TARGET}.app/$$QWT_BUNDLE_DATA.path/$$basename(a) \
    29. || $(INSTALL_DIR) $${a} $$DESTDIR/$${TARGET}.app/$$QWT_BUNDLE_DATA.path $$escape_expand( \\n\\t )
    30. }
    31. }
    32.  
    33. QMAKE_POST_LINK += install_name_tool -change \
    34. qwt.framework/Versions/6/qwt \
    35. @executable_path/../Frameworks/qwt.framework/Versions/6/qwt \
    36. $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET} $$escape_expand( \\n\\t )
    37.  
    38. CONFIG(release, debug|release): {
    39. QMAKE_POST_LINK += install_name_tool -change \
    40. $(QTDIR)/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport \
    41. @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport \
    42. $$DESTDIR/$${TARGET}.app/Contents/Frameworks/qwt.framework/Versions/6/qwt $$escape_expand( \\n\\t )
    43. QMAKE_POST_LINK += install_name_tool -change \
    44. $(QTDIR)/lib/QtWidgets.framework/Versions/5/QtWidgets \
    45. @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets \
    46. $$DESTDIR/$${TARGET}.app/Contents/Frameworks/qwt.framework/Versions/6/qwt $$escape_expand( \\n\\t )
    47. QMAKE_POST_LINK += install_name_tool -change \
    48. $(QTDIR)/lib/QtGui.framework/Versions/5/QtGui \
    49. @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui \
    50. $$DESTDIR/$${TARGET}.app/Contents/Frameworks/qwt.framework/Versions/6/qwt $$escape_expand( \\n\\t )
    51. QMAKE_POST_LINK += install_name_tool -change \
    52. $(QTDIR)/lib/QtCore.framework/Versions/5/QtCore \
    53. @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore \
    54. $$DESTDIR/$${TARGET}.app/Contents/Frameworks/qwt.framework/Versions/6/qwt $$escape_expand( \\n\\t )
    55. QMAKE_POST_LINK += install_name_tool -change \
    56. $(QTDIR)/lib/QtConcurrent.framework/Versions/5/QtConcurrent \
    57. @executable_path/../Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent \
    58. $$DESTDIR/$${TARGET}.app/Contents/Frameworks/qwt.framework/Versions/6/qwt $$escape_expand( \\n\\t )
    59. }
    60. }
    61.  
    62. INCLUDEPATH += $$QWT_SOURCE_DIR/src
    63. DEPENDPATH += $$QWT_SOURCE_DIR/src
    64. }
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Quote Originally Posted by Seamus View Post
    I am using the latest versions, and it compiles flawlessly. But your initial error was for the designer plugin, which I've never built.
    As I said, all I was trying to do was to build Qwt out-of-the-box. As it happens, I already use Qwt in my project. The only thing is that I don't use QMake (but CMake) and therefore build it my own way. I don't, however, need the examples so my Qwt build system doesn't build them. Yet, I quickly needed to check some examples, so I thought I would download Qwt and build it out-of-the-box and this is what prompted my original post...

  8. #8
    Join Date
    Mar 2013
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Building Qwt 6.1.0 RC3 on OS X (from the command line)

    Quote Originally Posted by Uwe View Post
    Concerning the error there was some discussion on the mailing list - use the version from SVN trunk for a fixed version ( beside on Windows don't build debug_and_release - instead debug only + release only ).
    The second warning has been fixed in trunk some time ago - the first one needs to be done.

    There is a reason for having more rc versions: I don't have most of the environments where Qwt is used myself.

    Uwe
    Marked, I also have this problem on my OSX and solved with the latest SVN trunk version.

    Thank you for all the hard work

Similar Threads

  1. How to compile from command line?
    By tonnot in forum Newbie
    Replies: 6
    Last Post: 15th March 2011, 15:55
  2. Replies: 0
    Last Post: 28th June 2010, 02:29
  3. QProcess and the command line
    By auba in forum Qt Programming
    Replies: 17
    Last Post: 27th May 2009, 11:39
  4. Printing to Command Line
    By seanmu13 in forum Qt Programming
    Replies: 3
    Last Post: 5th July 2007, 16:57
  5. Is there a command-line window in Qt4?
    By miaoliang in forum Qt Programming
    Replies: 2
    Last Post: 8th November 2006, 09:56

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.