Build fails with Qt 5.9.1 / clang / macOS

Issue #715 resolved
Martijn Thé created an issue

I just upgraded Qt from 5.9.0 to 5.9.1. After doing so, I'm getting build errors, see below for the logs. I reverted to 5.9.0 to make the build work again.

$ qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=noTests
Reading /Users/mthe/valentina/src/src.pro [/Users/mthe/valentina/build/src]
 Reading /Users/mthe/valentina/src/libs/libs.pro [/Users/mthe/valentina/build/src/libs]
  Reading /Users/mthe/valentina/src/libs/qmuparser/qmuparser.pro [/Users/mthe/valentina/build/src/libs/qmuparser]
  Reading /Users/mthe/valentina/src/libs/vpropertyexplorer/vpropertyexplorer.pro [/Users/mthe/valentina/build/src/libs/vpropertyexplorer]
  Reading /Users/mthe/valentina/src/libs/ifc/ifc.pro [/Users/mthe/valentina/build/src/libs/ifc]
  Reading /Users/mthe/valentina/src/libs/vobj/vobj.pro [/Users/mthe/valentina/build/src/libs/vobj]
  Reading /Users/mthe/valentina/src/libs/vdxf/vdxf.pro [/Users/mthe/valentina/build/src/libs/vdxf]
  Reading /Users/mthe/valentina/src/libs/vlayout/vlayout.pro [/Users/mthe/valentina/build/src/libs/vlayout]
  Reading /Users/mthe/valentina/src/libs/vgeometry/vgeometry.pro [/Users/mthe/valentina/build/src/libs/vgeometry]
  Reading /Users/mthe/valentina/src/libs/vpatterndb/vpatterndb.pro [/Users/mthe/valentina/build/src/libs/vpatterndb]
  Reading /Users/mthe/valentina/src/libs/vmisc/vmisc.pro [/Users/mthe/valentina/build/src/libs/vmisc]
Project MESSAGE: Latest tag distance: 89
  Reading /Users/mthe/valentina/src/libs/vwidgets/vwidgets.pro [/Users/mthe/valentina/build/src/libs/vwidgets]
  Reading /Users/mthe/valentina/src/libs/vtools/vtools.pro [/Users/mthe/valentina/build/src/libs/vtools]
  Reading /Users/mthe/valentina/src/libs/vformat/vformat.pro [/Users/mthe/valentina/build/src/libs/vformat]
  Reading /Users/mthe/valentina/src/libs/fervor/fervor.pro [/Users/mthe/valentina/build/src/libs/fervor]
  Reading /Users/mthe/valentina/src/libs/vtest/vtest.pro [/Users/mthe/valentina/build/src/libs/vtest]
Project MESSAGE: Latest tag distance: 89
 Reading /Users/mthe/valentina/src/app/app.pro [/Users/mthe/valentina/build/src/app]
  Reading /Users/mthe/valentina/src/app/tape/tape.pro [/Users/mthe/valentina/build/src/app/tape]
Project MESSAGE: Build revision: \"Hg:2a61b3edb8f5\"
  Reading /Users/mthe/valentina/src/app/valentina/valentina.pro [/Users/mthe/valentina/build/src/app/valentina]
Project MESSAGE: Build revision: \"Hg:2a61b3edb8f5\"
Project MESSAGE: Qt version: 5.9.1
Project MESSAGE: Qt is installed in /usr/local/Cellar/qt/5.9.1
Project MESSAGE: Qt resources can be found in the following locations:
Project MESSAGE: Documentation: /usr/local/Cellar/qt/5.9.1/doc
Project MESSAGE: Header files: /usr/local/Cellar/qt/5.9.1/include
Project MESSAGE: Libraries: /usr/local/Cellar/qt/5.9.1/lib
Project MESSAGE: Binary files (executables): /usr/local/Cellar/qt/5.9.1/bin
Project MESSAGE: Plugins: /usr/local/Cellar/qt/5.9.1/plugins
Project MESSAGE: Data files: /usr/local/Cellar/qt/5.9.1
Project MESSAGE: Translation files: /usr/local/Cellar/qt/5.9.1/translations
Project MESSAGE: Settings:
Project MESSAGE: Examples: /usr/local/Cellar/qt/5.9.1/examples

$ make -j1
cd src/ && ( test -e Makefile || /usr/local/opt/qt/bin/qmake -o Makefile /Users/mthe/valentina/src/src.pro CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=noTests ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
cd libs/ && ( test -e Makefile || /usr/local/opt/qt/bin/qmake -o Makefile /Users/mthe/valentina/src/libs/libs.pro CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=noTests ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
cd qmuparser/ && ( test -e Makefile || /usr/local/opt/qt/bin/qmake -o Makefile /Users/mthe/valentina/src/libs/qmuparser/qmuparser.pro CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=noTests ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
compiling ../../../../src/libs/qmuparser/stable.h
warning: unknown warning option '-Winherited-variadic-ctor'; did you mean '-Wundefined-var-template'? [-Wunknown-warning-option]
warning: unknown warning option '-Wreceiver-is-weak'; did you mean '-Wreceiver-expr'? [-Wunknown-warning-option]
../../../../src/libs/qmuparser/stable.h:30:9: warning: Compiling precompiled headers for QmuParser library. [-W#pragma-messages]
#pragma message("Compiling precompiled headers for QmuParser library.\n")
        ^
3 warnings generated.
compiling ../../../../src/libs/qmuparser/qmuparser.cpp
warning: unknown warning option '-Winherited-variadic-ctor'; did you mean '-Wundefined-var-template'? [-Wunknown-warning-option]
warning: unknown warning option '-Wreceiver-is-weak'; did you mean '-Wreceiver-expr'? [-Wunknown-warning-option]
In file included from ../../../../src/libs/qmuparser/qmuparser.cpp:22:
In file included from ../../../../src/libs/qmuparser/qmuparser.h:31:
In file included from ../../../../src/libs/qmuparser/qmuparserbase.h:39:
In file included from ../../../../src/libs/qmuparser/qmuparserbytecode.h:28:
../../../../src/libs/qmuparser/qmudef.h:124:71: error: 'nodiscard' attribute cannot be applied to types
static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2) Q_REQUIRED_RESULT;
                                                                      ^
/usr/local/Cellar/qt/5.9.1/lib/QtCore.framework/Headers/qcompilerdetection.h:1177:31: note: expanded from macro 'Q_REQUIRED_RESULT'
#  define Q_REQUIRED_RESULT [[nodiscard]]
                              ^
In file included from ../../../../src/libs/qmuparser/qmuparser.cpp:22:
In file included from ../../../../src/libs/qmuparser/qmuparser.h:31:
In file included from ../../../../src/libs/qmuparser/qmuparserbase.h:39:
In file included from ../../../../src/libs/qmuparser/qmuparserbytecode.h:30:
In file included from ../../../../src/libs/qmuparser/qmuparsertoken.h:31:
../../../../src/libs/qmuparser/qmuparsererror.h:158:58: error: expected ';' at end of declaration list
    virtual QmuParserError *clone() const Q_DECL_OVERRIDE Q_REQUIRED_RESULT;
                                                         ^
                                                         ;
In file included from ../../../../src/libs/qmuparser/qmuparser.cpp:22:
In file included from ../../../../src/libs/qmuparser/qmuparser.h:31:
In file included from ../../../../src/libs/qmuparser/qmuparserbase.h:39:
In file included from ../../../../src/libs/qmuparser/qmuparserbytecode.h:30:
In file included from ../../../../src/libs/qmuparser/qmuparsertoken.h:32:
../../../../src/libs/qmuparser/qmuparsercallback.h:85:38: error: 'nodiscard' attribute cannot be applied to types
    QmuParserCallback* Clone() const Q_REQUIRED_RESULT;
                                     ^
/usr/local/Cellar/qt/5.9.1/lib/QtCore.framework/Headers/qcompilerdetection.h:1177:31: note: expanded from macro 'Q_REQUIRED_RESULT'
#  define Q_REQUIRED_RESULT [[nodiscard]]
                              ^
2 warnings and 3 errors generated.
make[3]: *** [obj/qmuparser.o] Error 1
make[2]: *** [sub-qmuparser-make_first] Error 2
make[1]: *** [sub-libs-make_first] Error 2
make: *** [sub-src-make_first] Error 2

Compiler:

$ clang -v
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ clang++ -v
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Comments (3)

  1. Log in to comment