Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Building Qt from source : Mac OS can't find vulkan



  • I'm building Qt from source for a CI pipeline

    Package Name/Version: qt/5.14.2
    Operating System+version: OSX 10.15
    Compiler+version: Clang 11.0
    Conan version: conan 1.22.2
    Python version: Python 3.7.4
    IDE : CLion 2019.3

    /Users/craigscott/.conan/data/qt/5.14.2/bincrafters/stable/source/qt5/qtbase/configure -top-level -shared -confirm-license -silent -nomake examples -nomake tests -prefix /Users/craigscott/.conan/data/qt/5.14.2/bincrafters/stable/package/5a073314ab6ebc03228759256ae1f2e8e3b64772 -opensource -debug -skip qtsvg -skip qtdeclarative -skip qtactiveqt -skip qtscript -skip qtmultimedia -skip qtxmlpatterns -skip qttranslations -skip qtdoc -skip qtlocation -skip qtsensors -skip qtconnectivity -skip qtwayland -skip qt3d -skip qtimageformats -skip qtgraphicaleffects -skip qtquickcontrols -skip qtserialbus -skip qtserialport -skip qtx11extras -skip qtmacextras -skip qtwinextras -skip qtandroidextras -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquickcontrols2 -skip qtpurchasing -skip qtcharts -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtgamepad -skip qtscxml -skip qtspeech -skip qtnetworkauth -skip qtremoteobjects -skip qtwebglplugin -skip qtlottie -skip qtquicktimeline -skip qtquick3d --zlib=system -no-opengl -no-openssl --glib=no --pcre=qt --fontconfig=no --icu=no --sql-mysql=no --sql-psql=no --sql-odbc=no --zstd=yes -system-doubleconversion -system-freetype -no-harfbuzz -no-libjpeg -no-libpng -no-sqlite ZLIB_LIBS=-lz DOUBLECONVERSION_LIBS=-ldouble-conversion FREETYPE_INCDIR=/Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/include/freetype2 FREETYPE_LIBS=-lfreetyped -lpng16d -lz -lbz2 LIBPNG_LIBS=-lpng16d -lz ZSTD_LIBS=-lzstd -I /Users/craigscott/.conan/data/double-conversion/3.1.5/_/_/package/5fed66895e5b85fca4af6ac05bb157e1ffecb806/include -L /Users/craigscott/.conan/data/double-conversion/3.1.5/_/_/package/5fed66895e5b85fca4af6ac05bb157e1ffecb806/lib -I /Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/include -I /Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/include/freetype2 -L /Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/lib -I /Users/craigscott/.conan/data/zstd/1.4.4/_/_/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/include -L /Users/craigscott/.conan/data/zstd/1.4.4/_/_/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/lib -I /Users/craigscott/.conan/data/libpng/1.6.37/_/_/package/a468ffad8adea3fcab8dd371aecce5321635f9fc/include -L /Users/craigscott/.conan/data/libpng/1.6.37/_/_/package/a468ffad8adea3fcab8dd371aecce5321635f9fc/lib -I /Users/craigscott/.conan/data/bzip2/1.0.8/_/_/package/e26f883c3e136952d830bcdc838898582f2a8d80/include -L /Users/craigscott/.conan/data/bzip2/1.0.8/_/_/package/e26f883c3e136952d830bcdc838898582f2a8d80/lib -I /Users/craigscott/.conan/data/zlib/1.2.11/conan/stable/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/include -L /Users/craigscott/.conan/data/zlib/1.2.11/conan/stable/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/lib -no-framework -platform macx-clang
    
    looking for library vulkan
    Trying source 0 (type pkgConfig) of library vulkan ...
    pkg-config use disabled globally.
      => source produced no result.
    Trying source 1 (type makeSpec) of library vulkan ...
    vulkan/vulkan.h not found in [] and global paths.
      => source produced no result.
    test config.qtbase_gui.libraries.vulkan FAILED
    
    VK_ICD_FILENAMES=/Users/craigscott/Downloads/vulkansdk-macos-1.2.135.0/macOS/etc/vulkan/icd.d/MoltenVK_icd.json
    VULKAN_SDK=/Users/craigscott/Downloads/vulkansdk-macos-1.2.135.0/macOS
    VK_LAYER_PATH=/Users/craigscott/Downloads/vulkansdk-macos-1.2.135.0/macOS/etc/vulkan/explicit_layer.d
    PATH=/Users/craigscott/Downloads/vulkansdk-macos-1.2.135.0/macOS/bin
    

  • Lifetime Qt Champion

    Hi,

    Did you try adding a -I and -L pointing to your vulkan dependencies ?



  • + /Users/craigscott/.conan/data/qt/5.14.2/bincrafters/stable/source/qt5/qtbase/configure -top-level -shared -confirm-license -silent -nomake examples -nomake tests -prefix /Users/craigscott/.conan/data/qt/5.14.2/bincrafters/stable/package/70208ca969fe2074e043d206ec9a93fe3bbb254d -opensource -debug -skip qtsvg -skip qtdeclarative -skip qtactiveqt -skip qtscript -skip qtmultimedia -skip qtxmlpatterns -skip qttranslations -skip qtdoc -skip qtlocation -skip qtsensors -skip qtconnectivity -skip qtwayland -skip qt3d -skip qtimageformats -skip qtgraphicaleffects -skip qtquickcontrols -skip qtserialbus -skip qtserialport -skip qtx11extras -skip qtmacextras -skip qtwinextras -skip qtandroidextras -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquickcontrols2 -skip qtpurchasing -skip qtcharts -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtgamepad -skip qtscxml -skip qtspeech -skip qtnetworkauth -skip qtremoteobjects -skip qtwebglplugin -skip qtlottie -skip qtquicktimeline -skip qtquick3d --zlib=system -no-opengl -no-openssl --glib=no --pcre=qt --fontconfig=no --icu=no --sql-mysql=no --sql-psql=no --sql-odbc=no --zstd=yes -system-doubleconversion -system-freetype -no-harfbuzz -no-libjpeg -no-libpng -no-sqlite ZLIB_LIBS=-lz DOUBLECONVERSION_LIBS=-ldouble-conversion FREETYPE_INCDIR=/Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/include/freetype2 FREETYPE_LIBS=-lfreetyped -lpng16d -lz -lbz2 LIBPNG_LIBS=-lpng16d -lz ZSTD_LIBS=-lzstd -I /Users/craigscott/.conan/data/double-conversion/3.1.5/_/_/package/5fed66895e5b85fca4af6ac05bb157e1ffecb806/include -L /Users/craigscott/.conan/data/double-conversion/3.1.5/_/_/package/5fed66895e5b85fca4af6ac05bb157e1ffecb806/lib -I /Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/include -I /Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/include/freetype2 -L /Users/craigscott/.conan/data/freetype/2.10.1/_/_/package/ea086d65ab89aa1cac270b520ea07c3277cad44b/lib -I /Users/craigscott/.conan/data/zstd/1.4.4/_/_/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/include -L /Users/craigscott/.conan/data/zstd/1.4.4/_/_/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/lib -I /Users/craigscott/.conan/data/libpng/1.6.37/_/_/package/a468ffad8adea3fcab8dd371aecce5321635f9fc/include -L /Users/craigscott/.conan/data/libpng/1.6.37/_/_/package/a468ffad8adea3fcab8dd371aecce5321635f9fc/lib -I /Users/craigscott/.conan/data/bzip2/1.0.8/_/_/package/e26f883c3e136952d830bcdc838898582f2a8d80/include -L /Users/craigscott/.conan/data/bzip2/1.0.8/_/_/package/e26f883c3e136952d830bcdc838898582f2a8d80/lib -I /Users/craigscott/.conan/data/zlib/1.2.11/conan/stable/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/include -L /Users/craigscott/.conan/data/zlib/1.2.11/conan/stable/package/0aa7be2d0914b6f3128105e305c90b9cb0cae86d/lib -no-framework -platform macx-clang -L /Users/craigscott/Downloads/vulkansdk-macos-1.2.135.0/macOS/lib -I /Users/craigscott/Downloads/vulkansdk-macos-1.2.135.0/macOS/include
    

    I added last two args, but still was not able to find vulkan


  • Lifetime Qt Champion

    Did you do that from a clean state ?



  • I removed qt source folders and retried



  • @scott_craig said in Building Qt from source : Mac OS can't find vulkan:

    Trying source 1 (type makeSpec) of library vulkan ...
    vulkan/vulkan.h not found in [] and global paths.

    Trying source 1 (type makeSpec) of library vulkan ...
    vulkan/vulkan.h not found in [] and global paths.

    If i can figure out where this is looking, that will help, I'm not sure where it originates from



  • What is the file that calls

    vulkan/vulkan.h not found in [] and global paths


  • Lifetime Qt Champion

    The test definitions can be found here.



  • Thanks. I'm guessing by global paths it means $PATH? So it's search $PATH for vulkan/vulkan.h?


  • Lifetime Qt Champion

    @scott_craig said in Building Qt from source : Mac OS can't find vulkan:

    $PATH

    This is not used for header files. "global paths" probably means default directories to search for include files (like /usr/include).



  • @jsulm Is there certainty on this? So where does Qt expect vulkan files to be on MacOS? On linux and windows it seems to search the environment variables just fine.


  • Lifetime Qt Champion

    @scott_craig said in Building Qt from source : Mac OS can't find vulkan:

    where does Qt expect vulkan files to be on MacOS

    either in system wide include directories (like /usr/include) or in directories you specify using "-I PATH_TO_HEADER_FILES"


Log in to reply