Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Building Qt3D 6.0.0

Building Qt3D 6.0.0

Scheduled Pinned Locked Moved Unsolved Qt 6
qt3dqt6build
8 Posts 4 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jakob Weiss
    wrote on 8 Jan 2021, 09:12 last edited by Jakob Weiss 2 May 2021, 12:19
    #1

    So, for some random reason Qt3D is no longer distributed in dll form with the qt installer and we have to build it ourselves.
    The maintenance tool states that Qt3D is to be built with conan, however no further instructions are provided as far as I can see.
    The supplied README in the source directory installed with the qt3d 6.0.0 package does not instill a lot of confidence in it by leading with

    Qt5 is a rapidly changing bleeding edge environment.  This branch is our initial
    support for it and thus is also rapidly changing and bleeding edge.
    
    This branch is experimental, and unsupported.  This information is provided for
    advanced use only.
    

    and it proceeds with obscure build instructions referencing a private repository, so no help there.

    trying to simply follow a standard conan build, after defining the QT_PATH environment variable, In the conan build step I get this error message:

    -- Configuring done
    CMake Error at C:/Qt/6.0.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:676 (add_dependencies):
      The dependency target "3DQuick_autogen" of target
      "3DQuick_automoc_json_extraction" does not exist.
    Call Stack (most recent call first):
      C:/Qt/6.0.0/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:711 (qt6_extract_metatypes)
      src/quick3d/quick3d/CMakeLists.txt:66 (qt6_qml_type_registration)
    

    Is there anyone who actually got this to work, and how?

    J 1 Reply Last reply 8 Jan 2021, 15:01
    2
    • J Jakob Weiss
      8 Jan 2021, 09:12

      So, for some random reason Qt3D is no longer distributed in dll form with the qt installer and we have to build it ourselves.
      The maintenance tool states that Qt3D is to be built with conan, however no further instructions are provided as far as I can see.
      The supplied README in the source directory installed with the qt3d 6.0.0 package does not instill a lot of confidence in it by leading with

      Qt5 is a rapidly changing bleeding edge environment.  This branch is our initial
      support for it and thus is also rapidly changing and bleeding edge.
      
      This branch is experimental, and unsupported.  This information is provided for
      advanced use only.
      

      and it proceeds with obscure build instructions referencing a private repository, so no help there.

      trying to simply follow a standard conan build, after defining the QT_PATH environment variable, In the conan build step I get this error message:

      -- Configuring done
      CMake Error at C:/Qt/6.0.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:676 (add_dependencies):
        The dependency target "3DQuick_autogen" of target
        "3DQuick_automoc_json_extraction" does not exist.
      Call Stack (most recent call first):
        C:/Qt/6.0.0/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:711 (qt6_extract_metatypes)
        src/quick3d/quick3d/CMakeLists.txt:66 (qt6_qml_type_registration)
      

      Is there anyone who actually got this to work, and how?

      J Offline
      J Offline
      JKSH
      Moderators
      wrote on 8 Jan 2021, 15:01 last edited by
      #2

      @Jakob-Weiss Perhaps there will be helpful to you:

      • https://www.qt.io/blog/qt-6-additional-libraries-via-package-manager
      • https://wiki.qt.io/Qt6_Add-on_src_package_build_using_Conan_package_manager

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      3
      • J Offline
        J Offline
        Jakob Weiss
        wrote on 11 Jan 2021, 12:22 last edited by
        #3

        Thank you for these links - given these seem to be the only information on how to build these libraries, they should definitely be easier to find than they are now.

        I tried installing with conan.exe install C:/Qt/AdditionalLibraries/Qt/qt3d-6.0.0/Src --build=missing --profile=C:/Qt/Tools/Conan/profiles/qt-6.0.0-msvc2019_64 -s build_type=Release -g cmake_paths -g=cmake -g deploy. I modified the reference because the qt/beta did not work for me and I didn't find any information on how to set up that conan user/reference. However, with this line conan runs successfully but only produces some text files in the output folder and definitely does not build anything. What am I missing?

        Full log:

        C:\dev\build\Qt3D> conan.exe install C:\Qt\AdditionalLibraries\Qt\qt3d-6.0.0\Src\ --build=missing --profile=C:/Qt/Tools/Conan/profiles/qt-6.0.0-msvc2019_64 -s build_type=Release -g cmake_paths -g=cmake -g deploy`
        Configuration:
        [settings]
        arch=x86_64
        build_type=Release
        compiler=Visual Studio
        compiler.runtime=MD
        compiler.version=16
        os=Windows
        [options]
        qt6=6.0.0
        [build_requires]
        [env]
        QT_PATH=C:/Qt\6.0.0/msvc2019_64
        conanfile.py (qt3d/6.0.0): Installing package
        Requirements
        Packages
        
        Installing (downloading, building) binaries...
        conanfile.py (qt3d/6.0.0): Generator deploy created deploy_manifest.txt
        conanfile.py (qt3d/6.0.0): Generator cmake_paths created conan_paths.cmake
        conanfile.py (qt3d/6.0.0): Generator cmake created conanbuildinfo.cmake
        conanfile.py (qt3d/6.0.0): Generator txt created conanbuildinfo.txt
        conanfile.py (qt3d/6.0.0): Generated conaninfo.txt
        conanfile.py (qt3d/6.0.0): Generated graphinfo
        
        J 1 Reply Last reply 11 Jan 2021, 13:13
        0
        • J Jakob Weiss
          11 Jan 2021, 12:22

          Thank you for these links - given these seem to be the only information on how to build these libraries, they should definitely be easier to find than they are now.

          I tried installing with conan.exe install C:/Qt/AdditionalLibraries/Qt/qt3d-6.0.0/Src --build=missing --profile=C:/Qt/Tools/Conan/profiles/qt-6.0.0-msvc2019_64 -s build_type=Release -g cmake_paths -g=cmake -g deploy. I modified the reference because the qt/beta did not work for me and I didn't find any information on how to set up that conan user/reference. However, with this line conan runs successfully but only produces some text files in the output folder and definitely does not build anything. What am I missing?

          Full log:

          C:\dev\build\Qt3D> conan.exe install C:\Qt\AdditionalLibraries\Qt\qt3d-6.0.0\Src\ --build=missing --profile=C:/Qt/Tools/Conan/profiles/qt-6.0.0-msvc2019_64 -s build_type=Release -g cmake_paths -g=cmake -g deploy`
          Configuration:
          [settings]
          arch=x86_64
          build_type=Release
          compiler=Visual Studio
          compiler.runtime=MD
          compiler.version=16
          os=Windows
          [options]
          qt6=6.0.0
          [build_requires]
          [env]
          QT_PATH=C:/Qt\6.0.0/msvc2019_64
          conanfile.py (qt3d/6.0.0): Installing package
          Requirements
          Packages
          
          Installing (downloading, building) binaries...
          conanfile.py (qt3d/6.0.0): Generator deploy created deploy_manifest.txt
          conanfile.py (qt3d/6.0.0): Generator cmake_paths created conan_paths.cmake
          conanfile.py (qt3d/6.0.0): Generator cmake created conanbuildinfo.cmake
          conanfile.py (qt3d/6.0.0): Generator txt created conanbuildinfo.txt
          conanfile.py (qt3d/6.0.0): Generated conaninfo.txt
          conanfile.py (qt3d/6.0.0): Generated graphinfo
          
          J Offline
          J Offline
          JKSH
          Moderators
          wrote on 11 Jan 2021, 13:13 last edited by
          #4

          @Jakob-Weiss I'm afraid I don't have experience building these Conan packages, so I'll defer to someone who has done it before

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • I Offline
            I Offline
            iMike
            wrote on 11 Jan 2021, 14:29 last edited by
            #5

            Hi!

            I've not tried it on Windows, but this works on my mac:

            conan install qt3d/6.0.0@qt/final --build=missing -s build_type=Release -g cmake_paths -g=cmake -g deploy --profile=/Users/Shared/Qt/Tools/Conan/profiles/qt-6.0.0-macx-clang
            

            The qt/beta from the documentation page should be qt/final

            Note that this is subject to the same platform requirements as when building the rest of Qt (in particular you need perl interpreter in your path).

            You can of course build it without conan doing something like:

            cd C:/Qt/AdditionalLibraries/Qt/qt3d-6.0.0/Src
            mkdir build
            cd build
            /path/to/qt/bin/qmake ..
            jom
            jom install
            

            Hope this helps!

            1 Reply Last reply
            3
            • J Offline
              J Offline
              Jakob Weiss
              wrote on 11 Jan 2021, 17:12 last edited by
              #6

              Thank you for the great suggestions! using the qt/final instead of qt/beta makes conan do something, however, then I'm back to the exact CMake error from my initial post regarding the 3DQuick_automoc_json_extraction target.

              I also tried out the variant using qmake/jom, but then I run into a different compilation error:

              C:\Qt\AdditionalLibraries\Qt\qt3d-6.0.0\Src\src\render\surfaces\vulkaninstance.cpp(51): error C2027: use of undefined type 'QVulkanInstance'
              C:\Qt\AdditionalLibraries\Qt\qt3d-6.0.0\Src\src\render\surfaces\vulkaninstance_p.h(60): note: see declaration of 'QVulkanInstance'
              

              These errors are intrinsically confusing (QVulkanInstance is obviously defined, it even says so) and I can't think of anything to fix it. I have the vulkan SDK installed and explicitly adding it to the qmake include paths doesn't help either...

              Y 1 Reply Last reply 17 Jan 2021, 08:22
              0
              • J Jakob Weiss
                11 Jan 2021, 17:12

                Thank you for the great suggestions! using the qt/final instead of qt/beta makes conan do something, however, then I'm back to the exact CMake error from my initial post regarding the 3DQuick_automoc_json_extraction target.

                I also tried out the variant using qmake/jom, but then I run into a different compilation error:

                C:\Qt\AdditionalLibraries\Qt\qt3d-6.0.0\Src\src\render\surfaces\vulkaninstance.cpp(51): error C2027: use of undefined type 'QVulkanInstance'
                C:\Qt\AdditionalLibraries\Qt\qt3d-6.0.0\Src\src\render\surfaces\vulkaninstance_p.h(60): note: see declaration of 'QVulkanInstance'
                

                These errors are intrinsically confusing (QVulkanInstance is obviously defined, it even says so) and I can't think of anything to fix it. I have the vulkan SDK installed and explicitly adding it to the qmake include paths doesn't help either...

                Y Offline
                Y Offline
                yiufai.cheng
                wrote on 17 Jan 2021, 08:22 last edited by
                #7

                @Jakob-Weiss

                For error C2027: use of undefined type 'QVulkanInstance', After look into the qvulkaninstance.h, you need to have vulkan header

                #if __has_include(<vulkan/vulkan.h>) || defined(Q_CLANG_QDOC)

                Solution:

                1. install the vulkan sdk (https://github.com/ARM-software/vulkan-sdk, I don't have to test this method)
                2. OR, Go to github, https://github.com/ARM-software/vulkan-sdk/tree/master/include/vulkan, copy two files into C:\Qt\6.0.0\msvc2019_64\include\vulkan
                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  Jakob Weiss
                  wrote on 19 Jan 2021, 17:32 last edited by
                  #8

                  thanks for trying to shed some light on this.

                  As I said, I have already installed the vulkan SDK (the "official" one from LunarG as I am trying to build for windows). I have even added the include directory directly in the *.pro file, and have observed that when opening the qt3d project with QtCreator, it can correctly resolve the vulkan libraries, so I think this is not the problem. I will try your suggestion of putting the vulkan headers directly in the qt directory and see if that gets me anywhere..

                  1 Reply Last reply
                  0

                  3/8

                  11 Jan 2021, 12:22

                  5 unread
                  • Login

                  • Login or register to search.
                  3 out of 8
                  • First post
                    3/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved