Configuring Qt5 for MacOS SDK 12 Fails - how do I override -Wall?
-
I need to build a version of Qt5 for a software tool on my MacPro running Big Sur. Configuring and building fails with one particular compiler error over and over:
../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qstring.h:1063:22: error: definition of implicit copy constructor for 'QCharRef' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); }
^
../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qstring.h:1163:28: note: in implicit copy constructor for 'QCharRef' first required here
{ Q_ASSERT(i >= 0); return QCharRef(*this, i); }For now I am happy to work around this by adjusting the compiler flags - but I cannot figure out how to reconfigure in a way which will add -Wno-deprecated-copy AFTER the -Wall in the CXXFLAGS (if it is not after, it is ignored). How does one edit the internal order of the various portions of the build CXXFLAGS?
Thanks!
-DS
-
Hi and welcome to devnet,
Which exact version are you building ?
Why not use the pre-built binaries ?
Which version of Xcode are you using ? -
Hi and welcome to devnet,
Which exact version are you building ?
Why not use the pre-built binaries ?
Which version of Xcode are you using ?Thank you.
I am building 5.12 as pulled via git checkout.
I don't want to install the pre-built binaries, thank you.
I am using Xcode Version 13.1. -
5.12 is a bit old in that respect.
What configure line are you using ?
-
@SGaist
I am following the instructions here: https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_source_code -
@SGaist I just need to guarantee that an application built against v5 will compile without errors - how recent a version should I try?
The specific configure I am using, from the web page I mentioned, is: ../qt5/configure -developer-build -opensource -nomake examples -nomake tests
-Doug
-
Don't use a developer-build unless you plan to hack on Qt itself.
-
@SGaist Right! Figured that out, thank you. Now trying to figure out why the "make install" appears to be rebuilding everything when I typed it right after the make succeeded (I posted a separate query).