Results 1 to 20 of 26

Thread: Qwt 6.3.0 (from qwt-code-r2921-trunk) compilation fails on Ubuntu 18.04.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qwt 6.3.0 (from qwt-code-r2921-trunk) compilation fails on Ubuntu 18.04.

    Hi.

    I need to port the Qwt build system from the qmake to QBS in my project. Previous Qwt stable version 6.2.0 was compiled successfully on any Linux. But now I have updated it to the version from the trunk r2921.

    And right now compilation fails with following errors:

    /usr/bin/g++ -g -O0 -Wall -Wextra -m64 -pipe -fexceptions -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -DQWT_MOC_INCLUDE=1 -DQWT_NO_SVG -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -I/home/denis/Documents/Projects/project-git/project/src/libs -I/opt/Qt/5.9.6/gcc_64/include -I/opt/Qt/5.9.6/gcc_64/include/QtConcurrent -I/opt/Qt/5.9.6/gcc_64/include/QtCore -I/opt/Qt/5.9.6/gcc_64/mkspecs/linux-g++ -I/home/denis/Documents/Projects/project-git/build-project-desktop-debug/qtc_Desktop_Qt_5_9_6_GCC_64bit_Debug/qwt.91a462ca/qt.headers -I/opt/Qt/5.9.6/gcc_64/include/QtGui -I/opt/Qt/5.9.6/gcc_64/include/QtOpenGL -I/opt/Qt/5.9.6/gcc_64/include/QtWidgets -I/opt/Qt/5.9.6/gcc_64/include/QtPrintSupport -I/opt/Qt/5.9.6/gcc_64/include/QtSvg -std=c++14 -o /home/denis/Documents/Projects/project-git/build-project-desktop-debug/qtc_Desktop_Qt_5_9_6_GCC_64bit_Debug/qwt.91a462ca/3a52ce780950d4d9/qwt_plot.cpp.o -c /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp
    In file included from /opt/Qt/5.9.6/gcc_64/include/QtCore/qmetatype.h:49:0,
    from /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot_item.h:14,
    from /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot_dict.h:15,
    from /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.h:14,
    from /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp:10:
    /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp: In function ‘void qwtEnableLegendItems(QwtPlot*, bool)’:
    /opt/Qt/5.9.6/gcc_64/include/QtCore/qobjectdefs.h:271:35: error: initializer fails to determine size of ‘sig’
    # define SIGNAL(a) qFlagLocation("2"#a QLOCATION)
    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp:29:24: note: in expansion of macro ‘SIGNAL’
    const char sig[] = SIGNAL(legendDataChanged(QVariant,QList<QwtLegendD ata>));
    ^~~~~~
    /opt/Qt/5.9.6/gcc_64/include/QtCore/qobjectdefs.h:271:35: error: array must be initialized with a brace-enclosed initializer
    # define SIGNAL(a) qFlagLocation("2"#a QLOCATION)
    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp:29:24: note: in expansion of macro ‘SIGNAL’
    const char sig[] = SIGNAL(legendDataChanged(QVariant,QList<QwtLegendD ata>));
    ^~~~~~
    /opt/Qt/5.9.6/gcc_64/include/QtCore/qobjectdefs.h:270:35: error: initializer fails to determine size of ‘slot’
    # define SLOT(a) qFlagLocation("1"#a QLOCATION)
    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp:30:25: note: in expansion of macro ‘SLOT’
    const char slot[] = SLOT(updateLegendItems(QVariant,QList<QwtLegendDat a>));
    ^~~~
    /opt/Qt/5.9.6/gcc_64/include/QtCore/qobjectdefs.h:270:35: error: array must be initialized with a brace-enclosed initializer
    # define SLOT(a) qFlagLocation("1"#a QLOCATION)
    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    /home/denis/Documents/Projects/project-git/project/src/libs/qwt/qwt_plot.cpp:30:25: note: in expansion of macro ‘SLOT’
    const char slot[] = SLOT(updateLegendItems(QVariant,QList<QwtLegendDat a>));
    ^~~~
    Process failed with exit code 1.
    My env is:

    * Ubuntu 18.04 LTS 64 bit
    * GCC 7.3.0
    * Qt official 5.9.6

    PS: Hovewer on Windows it compiles successfully with MSVC2015 32-bit && Qt 5.9.6.

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

    Default Re: Qwt 6.3.0 (from qwt-code-r2921-trunk) compilation fails on Ubuntu 18.04.

    I compiled the file with your options on my box without problems, but on my box it is a gcc 7.3.1.

    What happens, when changing the offending lines from:

    Qt Code:
    1. const char sig[] = ...
    To copy to clipboard, switch view to plain text mode 
    to
    Qt Code:
    1. const char* sig = ...
    To copy to clipboard, switch view to plain text mode 

    Or do you see another way to change the code to work around the compiler issue - bside writing the SIGNAL/SLOT signatures twice ?

    Uwe

    PS1: your compiler flags differ from those you find in qwtbuild.pri. At least -fno-math-errno -funsafe-math-optimizations should have an impact on the performance, when using methods from cmath. Also you should use a higher optimization level.
    PS2: do you see an effect on your CPU usage, when enabling QwtPlotCurve::FilterPointsAggressive ?

  3. #3
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qwt 6.3.0 (from qwt-code-r2921-trunk) compilation fails on Ubuntu 18.04.

    > What happens, when changing the offending lines from:

    Yes, many thanks, with:

    Qt Code:
    1. const char* sig = ...
    To copy to clipboard, switch view to plain text mode 

    it is successfully compiled.

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

    Default Re: Qwt 6.3.0 (from qwt-code-r2921-trunk) compilation fails on Ubuntu 18.04.

    Weird - seems to be a compiler bug of gcc 7.3.0.

    I will adjust the code - thanks for reporting,

    Uwe

Similar Threads

  1. Replies: 2
    Last Post: 13th December 2011, 16:44
  2. Mingw Cross-compilation of trunk webkit-qt
    By zcrendel in forum Qt Programming
    Replies: 0
    Last Post: 3rd November 2011, 17:23
  3. Compilation fails in Windows XP
    By sim in forum Newbie
    Replies: 3
    Last Post: 1st July 2010, 16:56
  4. qgl_use_font error during compilation of QT git trunk
    By manuels in forum Installation and Deployment
    Replies: 0
    Last Post: 6th March 2010, 14:05
  5. Qt 4.6.1 Compilation fails!
    By Diegol in forum Installation and Deployment
    Replies: 1
    Last Post: 10th February 2010, 16:36

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.