I can't build any version of qt because of assimp
-
I do everything according to the Build qt6 from git manual. Firstly, when running init_repository ninja says path too long. I set long paths in the registry (I use Windows 11), and also changed the setting in the policy (gpedit.msc), but this did not give results. The last time I tried to build 6.8.0 qt, but also could not. (Initially wanted 6.9.0) and earlier I built 6.9.0 and 6.7.2, but after reinstalling Windows I had to build again.
I could not solve the problem with path too long, and tried to build all this. He almost got it all together, but stopped at a mistake:
[13329/13732] Linking CXX shared module qtbase\plugins\assetimporters\assimp.dll FAILED: qtbase/plugins/assetimporters/assimp.dll C:\Windows\system32\cmd.exe /C "cd . && C:\Users\blood\Documents\programming\cpp\msys2\mingw64\bin\c++.exe -DNDEBUG -O2 -Wl,--no-undefined -Wl,--version-script,C:/dev/qt5/build/qtquick3d/src/plugins/assetimporters/assimp/AssimpImporterPlugin.version -shared -o qtbase\plugins\assetimporters\assimp.dll -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\AssimpImporterPlugin.rsp && cd ." C:/Users/blood/Documents/programming/cpp/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: qtquick3d/src/plugins/assetimporters/assimp/CMakeFiles/AssimpImporterPlugin.dir/__/__/__/3rdparty/assimp/src/code/Common/DefaultIOStream.cpp.obj:DefaultIOStream.cpp:(.text+0x161): undefined reference to `__imp__fstat32' collect2.exe: error: ld returned 1 exit status [13342/13732] Building CXX object qtmultimedia/src/resonan...ird_party/SADIE_hrtf_database/generated/hrtf_assets.cc.obj ninja: build stopped: subcommand failed.
The errors were with assimp, in quick3d and qt3d, in the 3rdparty/assimp/src folders. I decided to download a later version of assimp from github, 5.4.3 and 5.4.0, but none of this gave results. It can't find the __imp__fstat32 symbol.
I don't know what to do anymore, so I decided to write here
On the previous system this was not the case (I also used Windows 11 before)
About the tools:
I use mingw 14.2.0 downloaded via msys2.
cmake version 4.0.0-rc2.
git 2.48.1.windows.1
ninja version 1.12.0configure error:
Qt is now configured for building. Just run 'cmake --build . --parallel' Once everything is built, you must run 'cmake --install .' Qt will be installed into 'C:/Qt' To configure and build other Qt modules, you can use the following convenience script: C:/Qt/bin/qt-configure-module.bat If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory Alternatively, you can add the --fresh flag to your CMake flags. -- Configuring done (106.5s) CMake Error: Running 'C:/Users/blood/Documents/programming/cpp/ninja/ninja.exe' '-C' 'C:/dev/qt5/build' '-t' 'restat' 'build.ninja' -- Generating done (38.9s) failed with: name too long CMake Generate step failed. Build files cannot be regenerated correctly. CMake Error at C:/dev/qt5/qtbase/cmake/QtProcessConfigureArgs.cmake:1131 (message): CMake exited with code 1. CMake Error at C:/dev/qt5/cmake/QtIRProcessHelpers.cmake:173 (message): C:\dev\qt5/qtbase/configure.bat -top-level -prefix C:/Qt/ exited with status: 1 Call Stack (most recent call first): C:/dev/qt5/cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error) C:/dev/qt5/cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure) C:/dev/qt5/cmake/QtTopLevelConfigureScript.cmake:17 (qt_tl_run_main_script)
build error:
[13329/13732] Linking CXX shared module qtbase\plugins\assetimporters\assimp.dll FAILED: qtbase/plugins/assetimporters/assimp.dll C:\Windows\system32\cmd.exe /C "cd . && C:\Users\blood\Documents\programming\cpp\msys2\mingw64\bin\c++.exe -DNDEBUG -O2 -Wl,--no-undefined -Wl,--version-script,C:/dev/qt5/build/qtquick3d/src/plugins/assetimporters/assimp/AssimpImporterPlugin.version -shared -o qtbase\plugins\assetimporters\assimp.dll -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\AssimpImporterPlugin.rsp && cd ." C:/Users/blood/Documents/programming/cpp/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: qtquick3d/src/plugins/assetimporters/assimp/CMakeFiles/AssimpImporterPlugin.dir/__/__/__/3rdparty/assimp/src/code/Common/DefaultIOStream.cpp.obj:DefaultIOStream.cpp:(.text+0x161): undefined reference to `__imp__fstat32' collect2.exe: error: ld returned 1 exit status [13342/13732] Building CXX object qtmultimedia/src/resonan...ird_party/SADIE_hrtf_database/generated/hrtf_assets.cc.obj ninja: build stopped: subcommand failed.
-
I do everything according to the Build qt6 from git manual. Firstly, when running init_repository ninja says path too long. I set long paths in the registry (I use Windows 11), and also changed the setting in the policy (gpedit.msc), but this did not give results. The last time I tried to build 6.8.0 qt, but also could not. (Initially wanted 6.9.0) and earlier I built 6.9.0 and 6.7.2, but after reinstalling Windows I had to build again.
I could not solve the problem with path too long, and tried to build all this. He almost got it all together, but stopped at a mistake:
[13329/13732] Linking CXX shared module qtbase\plugins\assetimporters\assimp.dll FAILED: qtbase/plugins/assetimporters/assimp.dll C:\Windows\system32\cmd.exe /C "cd . && C:\Users\blood\Documents\programming\cpp\msys2\mingw64\bin\c++.exe -DNDEBUG -O2 -Wl,--no-undefined -Wl,--version-script,C:/dev/qt5/build/qtquick3d/src/plugins/assetimporters/assimp/AssimpImporterPlugin.version -shared -o qtbase\plugins\assetimporters\assimp.dll -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\AssimpImporterPlugin.rsp && cd ." C:/Users/blood/Documents/programming/cpp/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: qtquick3d/src/plugins/assetimporters/assimp/CMakeFiles/AssimpImporterPlugin.dir/__/__/__/3rdparty/assimp/src/code/Common/DefaultIOStream.cpp.obj:DefaultIOStream.cpp:(.text+0x161): undefined reference to `__imp__fstat32' collect2.exe: error: ld returned 1 exit status [13342/13732] Building CXX object qtmultimedia/src/resonan...ird_party/SADIE_hrtf_database/generated/hrtf_assets.cc.obj ninja: build stopped: subcommand failed.
The errors were with assimp, in quick3d and qt3d, in the 3rdparty/assimp/src folders. I decided to download a later version of assimp from github, 5.4.3 and 5.4.0, but none of this gave results. It can't find the __imp__fstat32 symbol.
I don't know what to do anymore, so I decided to write here
On the previous system this was not the case (I also used Windows 11 before)
About the tools:
I use mingw 14.2.0 downloaded via msys2.
cmake version 4.0.0-rc2.
git 2.48.1.windows.1
ninja version 1.12.0configure error:
Qt is now configured for building. Just run 'cmake --build . --parallel' Once everything is built, you must run 'cmake --install .' Qt will be installed into 'C:/Qt' To configure and build other Qt modules, you can use the following convenience script: C:/Qt/bin/qt-configure-module.bat If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory Alternatively, you can add the --fresh flag to your CMake flags. -- Configuring done (106.5s) CMake Error: Running 'C:/Users/blood/Documents/programming/cpp/ninja/ninja.exe' '-C' 'C:/dev/qt5/build' '-t' 'restat' 'build.ninja' -- Generating done (38.9s) failed with: name too long CMake Generate step failed. Build files cannot be regenerated correctly. CMake Error at C:/dev/qt5/qtbase/cmake/QtProcessConfigureArgs.cmake:1131 (message): CMake exited with code 1. CMake Error at C:/dev/qt5/cmake/QtIRProcessHelpers.cmake:173 (message): C:\dev\qt5/qtbase/configure.bat -top-level -prefix C:/Qt/ exited with status: 1 Call Stack (most recent call first): C:/dev/qt5/cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error) C:/dev/qt5/cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure) C:/dev/qt5/cmake/QtTopLevelConfigureScript.cmake:17 (qt_tl_run_main_script)
build error:
[13329/13732] Linking CXX shared module qtbase\plugins\assetimporters\assimp.dll FAILED: qtbase/plugins/assetimporters/assimp.dll C:\Windows\system32\cmd.exe /C "cd . && C:\Users\blood\Documents\programming\cpp\msys2\mingw64\bin\c++.exe -DNDEBUG -O2 -Wl,--no-undefined -Wl,--version-script,C:/dev/qt5/build/qtquick3d/src/plugins/assetimporters/assimp/AssimpImporterPlugin.version -shared -o qtbase\plugins\assetimporters\assimp.dll -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\AssimpImporterPlugin.rsp && cd ." C:/Users/blood/Documents/programming/cpp/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: qtquick3d/src/plugins/assetimporters/assimp/CMakeFiles/AssimpImporterPlugin.dir/__/__/__/3rdparty/assimp/src/code/Common/DefaultIOStream.cpp.obj:DefaultIOStream.cpp:(.text+0x161): undefined reference to `__imp__fstat32' collect2.exe: error: ld returned 1 exit status [13342/13732] Building CXX object qtmultimedia/src/resonan...ird_party/SADIE_hrtf_database/generated/hrtf_assets.cc.obj ninja: build stopped: subcommand failed.
@qtenjoyer said in I can't build any version of qt because of assimp:
mingw 14.2.0 downloaded via msys2.
Please use the minge version provided by the Qt installer. Esp. don't use msys in any way.
-
Hi All. I have been facing the same problem of "qtenjoyer", so I tried to use "C:\Qt\Qt5.12.12\5.12.12\mingw73_64" instead of msys2 but the configure.bat script ends with ERRORS as below. Is it maybe related to a too old version of QT5?
WARNING: The Clang-based lupdate parser will not be available. Suitable LLVM and Clang C++ libraries have not been found. >> You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.
WARNING: QtPdf won't be built. The following configure errors were found:- GCC version must be at least 10.0
??* Missing C++20 compiler support.
WARNING: QtWebEngine won't be built. The following configure errors were found: - Build requires Windows 11 SDK at least version 10.0.26100.0
- GCC version must be at least 10.0
- GNU compiler is not supported.
- Tool flex is required.
- Tool bison is required.
- Tool gperf is required.
- 64-bit Node.js 14.9 version or later is required.
- Missing C++20 compiler support.
ERROR: x86 intrinsics support missing. Check your compiler settings.
- GCC version must be at least 10.0
-
Hi All. I have been facing the same problem of "qtenjoyer", so I tried to use "C:\Qt\Qt5.12.12\5.12.12\mingw73_64" instead of msys2 but the configure.bat script ends with ERRORS as below. Is it maybe related to a too old version of QT5?
WARNING: The Clang-based lupdate parser will not be available. Suitable LLVM and Clang C++ libraries have not been found. >> You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.
WARNING: QtPdf won't be built. The following configure errors were found:- GCC version must be at least 10.0
??* Missing C++20 compiler support.
WARNING: QtWebEngine won't be built. The following configure errors were found: - Build requires Windows 11 SDK at least version 10.0.26100.0
- GCC version must be at least 10.0
- GNU compiler is not supported.
- Tool flex is required.
- Tool bison is required.
- Tool gperf is required.
- 64-bit Node.js 14.9 version or later is required.
- Missing C++20 compiler support.
ERROR: x86 intrinsics support missing. Check your compiler settings.
@Alec_Star What MinGW version do you use? (no, C:\Qt\Qt5.12.12\5.12.12\mingw73_64 is not the installation location of the MinGW compiler, it is in the tools subfolder).
- GCC version must be at least 10.0
-
Sorry, you are right. That was just my terminal point of commands.
The version is the one installed with Qt5.12.12 installer.C:\Tmp\qt6-build>mingw32-make --version
GNU Make 4.2.1
Built for x86_64-w64-mingw32
C:\Tmp\qt6-build>gcc --version
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0
C:\Tmp\qt6-build>g++ --version
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0 -
Sorry, you are right. That was just my terminal point of commands.
The version is the one installed with Qt5.12.12 installer.C:\Tmp\qt6-build>mingw32-make --version
GNU Make 4.2.1
Built for x86_64-w64-mingw32
C:\Tmp\qt6-build>gcc --version
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0
C:\Tmp\qt6-build>g++ --version
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0@Alec_Star This is a very old MinGW version.
How did you install it?
You should simply install MinGW using Qt Online Installer or Qt Maintenance Tool. -
@jsulm I simply installed by the offline qt package "qt-opensource-windows-x86-5.12.12.exe".
Maybe it is a too old version (2018) to compile qt6?@Alec_Star Why would you use a package from Qt 5.12 to build Qt6?
-
@jsulm I simply installed by the offline qt package "qt-opensource-windows-x86-5.12.12.exe".
Maybe it is a too old version (2018) to compile qt6?@Alec_Star Yeas, you should install more recent MinGW. If you don't need Qt5.15 uninstall it and install Qt6 including MinGW.
-
@Alec_Star Why would you use a package from Qt 5.12 to build Qt6?
-
@JonB Well, just because I had that one already installed and i did a try. Anyway, thanks I will give a try with a newer version of qt6.
@Alec_Star For the record, Qt supplies a MinGW version, use the one which comes with whichever Qt version you are building.
-
@Alec_Star For the record, Qt supplies a MinGW version, use the one which comes with whichever Qt version you are building.