Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] qt/6.7.0: Build failure on macOS with vulkan=true #24045

Open
neobrain opened this issue May 20, 2024 · 0 comments
Open

[package] qt/6.7.0: Build failure on macOS with vulkan=true #24045

neobrain opened this issue May 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@neobrain
Copy link

neobrain commented May 20, 2024

Description

Qt uses MoltenVK on macOS when Vulkan support is enabled. Currently, this configuration fails to build with Conan, since some of the Qt sources can't find the MoltenVK headers. A similar issue was reported in #6812 and was thought to have been fixed in #6835.

Package and Environment Details

  • Package Name/Version: qt/6.7.0
  • Operating System+version: macOS 14.5
  • Compiler+version: clang 15
  • Conan version: conan 2.3.1
  • Python version: Python 3.12.3

Conan profile

[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos

Steps to reproduce

Due to #23684, a conanfile to force vulkan-headers to a specific version is required to reproduce this issue. Depending on your compiler version, you will also need to use the fixed MoltenVK recipe from #23866 and the fixed Qt recipe from #24013.

cat <<EOF > conanfile.py
from conan import ConanFile

class BasicConanfile(ConanFile):
    name = "pkg"

    def requirements(self):
        self.requires("qt/6.7.0")
        self.requires("vulkan-headers/1.3.268.0", force=True) # See https://github.com/conan-io/conan-center-index/issues/23684
        pass

    def configure(self):
        self.options["qt"].with_vulkan = True;

        # Disable some options to speed up the build
        self.options["qt"].with_sqlite3 = False;
        self.options["qt"].with_freetype = False;
        self.options["qt"].with_harfbuzz = False;
        self.options["qt"].with_brotli = False;
        self.options["qt"].with_md4c = False;
        self.options["qt"].with_obdc = False;
        self.options["qt"].with_libpng = False;
        self.options["qt"].openssl = False;
        self.options["qt"].opengl = "no";
        pass
EOF

conan install . --build=missing

Logs

Relevant excerpt of the logs:

FAILED: qtbase/src/plugins/platforms/cocoa/CMakeFiles/QCocoaIntegrationPlugin.dir/main.mm.o 
/Library/Developer/CommandLineTools/usr/bin/c++ -DGL_SILENCE_DEPRECATION -DQCocoaIntegrationPlugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_LEAN_HEADERS=1 -DQT_NO_AS_CONST -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_PLUGIN -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/src/plugins/platforms/cocoa/QCocoaIntegrationPlugin_autogen/include -I/Users/tony/.conan2/p/qtbacac31821945/s/src/qtbase/src/plugins/platforms/cocoa -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/src/plugins/platforms/cocoa -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include/QtCore -I/Users/tony/.conan2/p/qtbacac31821945/s/src/qtbase/mkspecs/macx-clang -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/src/corelib -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include/QtCore/6.7.0 -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include/QtCore/6.7.0/QtCore -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include/QtGui -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/src/gui -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include/QtGui/6.7.0 -I/Users/tony/.conan2/p/b/qt240ffd1f43b86/b/build/Release/qtbase/include/QtGui/6.7.0/QtGui -isystem /Users/tony/.conan2/p/vulkad7e0b43a2448f/p/res/vulkan/registry -isystem /Users/tony/.conan2/p/vulkad7e0b43a2448f/p/include -x objective-c++ -DNDEBUG -O2 -std=c++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=11.0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -MD -MT qtbase/src/plugins/platforms/cocoa/CMakeFiles/QCocoaIntegrationPlugin.dir/main.mm.o -MF qtbase/src/plugins/platforms/cocoa/CMakeFiles/QCocoaIntegrationPlugin.dir/main.mm.o.d -o qtbase/src/plugins/platforms/cocoa/CMakeFiles/QCocoaIntegrationPlugin.dir/main.mm.o -c /Users/tony/.conan2/p/qtbacac31821945/s/src/qtbase/src/plugins/platforms/cocoa/main.mm
In file included from /Users/tony/.conan2/p/qtbacac31821945/s/src/qtbase/src/plugins/platforms/cocoa/main.mm:8:
In file included from /Users/tony/.conan2/p/qtbacac31821945/s/src/qtbase/src/plugins/platforms/cocoa/qcocoaintegration.h:8:
/Users/tony/.conan2/p/qtbacac31821945/s/src/qtbase/src/plugins/platforms/cocoa/qcocoawindow.h:19:10: fatal error: 'MoltenVK/mvk_vulkan.h' file not found
#include <MoltenVK/mvk_vulkan.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
@neobrain neobrain added the bug Something isn't working label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant