Can't Build QT on Monterey: qiosurfacegraphicsbuffer.h:54:32: error: unknown type name 'CGColorSpaceRef'; did you mean 'QColorSpace'?
-
I'm on MacOS 12.2.1 with QT 5.15.2.
I get these errors when I try to build QT.
qiosurfacegraphicsbuffer.h:54:32: error: unknown type name 'CGColorSpaceRef'; did you mean 'QColorSpace'?
qiosurfacegraphicsbuffer.mm:90:32: error: out-of-line definition of 'setColorSpace' does not match any declaration in 'QIOSurfaceGraphicsBuffer'
Here's the complete output.
https://pastebin.com/raw/R9zdmdN9
I'd appreciate any help!
Thanks! -
Hi,
Which version of Xcode are you using ?
With which SDK ? -
Hi, had the same issue.
This helped me:
https://codereview.qt-project.org/c/qt/qtbase/+/378706
Also following this:
https://wiki.qt.io/Building_Qt_5_from_Git
And exclude qtwebengine from the build, this does not work with 5.15.2 anymore.Best Regards.
Erik -
Hi, had the same issue.
This helped me:
https://codereview.qt-project.org/c/qt/qtbase/+/378706
Also following this:
https://wiki.qt.io/Building_Qt_5_from_Git
And exclude qtwebengine from the build, this does not work with 5.15.2 anymore.Best Regards.
Erik@erikmiers how do apply that patch? I did exclude webengine when building.
-
I'm on MacOS 12.2.1 with QT 5.15.2.
I get these errors when I try to build QT.
qiosurfacegraphicsbuffer.h:54:32: error: unknown type name 'CGColorSpaceRef'; did you mean 'QColorSpace'?
qiosurfacegraphicsbuffer.mm:90:32: error: out-of-line definition of 'setColorSpace' does not match any declaration in 'QIOSurfaceGraphicsBuffer'
Here's the complete output.
https://pastebin.com/raw/R9zdmdN9
I'd appreciate any help!
Thanks! -
Qt6 is a whole new library. There's no way I'm going to try to build a Qt5 app with it. There's a 0% chance it would build. So I went through the trouble of figuring out how to apply those patches.
The link above is to a confusing web tool, but I eventually figured out that you can download the patches. Both of them are identical, so only one is needed. But the patch can't be applied to Qt5 automatically, so you'll have to manually edit the file.
If you downloaded the "qt-everywhere-src-5.15.2" archive, the file to patch is:
qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
Somewhere before the line that says QT_BEGIN_NAMESPACE, insert this line:
#include <CoreGraphics/CGColorSpace.h>
Then configure without qtwebengine:
./configure -opensource -confirm-license -skip qtwebengine && make -j 8