Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Build Qt 5.15.3 for Windows has fatal error alloca.h: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

Build Qt 5.15.3 for Windows has fatal error alloca.h: No such file or directory

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 1.6k Views 1 Watching
  • 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.
  • Den-OneD Offline
    Den-OneD Offline
    Den-One
    wrote on last edited by
    #1

    Hi everyone.

    I used mingw from Qt 6.2 to build 5.15, if I'm not mistaken (i have tryed many mingw to build qt). It names "mingw810_32". I added all the folders with exe files to operation system variables: bin, \i686-w64-mingw32\bin.
    Also, LLVM, OpenSSL-Win32, GnuWin32, and %SystemRoot%\system32 were attached.

    As you can see, I mixed up useful and needless things together, hoping to get a result. It may has some inconsistencies. Anyway, configuration succeeded.

    That's my config reques:

    config debug-and-release -platform win32-g++ -c++std c++2a -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-angle -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix C:\qt_building\qt-5.15.3-builded
    

    After that I use mingw32-make to build qtbase module.

    mingw32-make module-qtbase
    

    So, looks like I'm moving to the right way, 'cause build shows fatal error and stops only after an hour of processing.

    Talking about errors, I found this text in config.log :

    loaded result for config test config.qtbase.tests.alloca_h
    + cd /d C:\qt_building\qt-everywhere-src-5.15.3\config.tests\alloca_h && C:\qt_building\qt-everywhere-src-5.15.3\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" C:/qt_building/qt-everywhere-src-5.15.3/config.tests/alloca_h
    + cd /d C:\qt_building\qt-everywhere-src-5.15.3\config.tests\alloca_h && set MAKEFLAGS=& mingw32-make
    > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\qt_building\qt-everywhere-src-5.15.3\qtbase\mkspecs\win32-g++  -o main.o main.cpp
    > main.cpp:2:10: fatal error: alloca.h: No such file or directory
    >  #include <alloca.h>
    >           ^~~~~~~~~~
    > compilation terminated.
    > mingw32-make: *** [Makefile:172: main.o] Error 1
    test config.qtbase.tests.alloca_h FAILED
    

    As you can see, it shows some errors, connected with lost files during... the testing? Is it OK that I wrote "-nomake-tests" and tests happening? Or are these kind of tests have different origin?

    These errors looks like something the same, so I just list in order all the files names.

    > main.cpp:2:10: fatal error: zstd.h: No such file or directory
    > main.cpp:2:10: fatal error: sys/eventfd.h: No such file or directory
    > main.cpp:2:10: fatal error: sys/inotify.h: No such file or directory
    > main.cpp:4:10: fatal error: sys/socket.h: No such file or directory
    > main.cpp:3:10: fatal error: sys/socket.h: No such file or directory
    > main.cpp:3:10: fatal error: sys/socket.h: No such file or directory
    > main.cpp:5:12: fatal error: linux/input.h: No such file or directory
    > main.cpp:2:10: fatal error: linux/fb.h: No such file or directory
    > main.cpp:2:10: fatal error: sybfront.h: No such file or directory
    > main.cpp:2:10: fatal error: flite/flite.h: No such file or directory
    

    There is another type of error. That's a full version one of them:

    test config.qtdeclarative_qml.tests.qml-python gave result C:\Python27\python.exe
    loaded result for config test config.qtdeclarative_quick.tests.d3d12
    + cd /d C:\qt_building\qt-everywhere-src-5.15.3\config.tests\d3d12 && C:\qt_building\qt-everywhere-src-5.15.3\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" C:/qt_building/qt-everywhere-src-5.15.3/qtdeclarative/config.tests/d3d12
    + cd /d C:\qt_building\qt-everywhere-src-5.15.3\config.tests\d3d12 && set MAKEFLAGS=& mingw32-make
    > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -IC:\qt_building\qt-everywhere-src-5.15.3\qtdeclarative\config.tests\d3d12 -I. -IC:\qt_building\qt-everywhere-src-5.15.3\qtbase\mkspecs\win32-g++  -o d3d12.o C:\qt_building\qt-everywhere-src-5.15.3\qtdeclarative\config.tests\d3d12\d3d12.cpp
    > C:\qt_building\qt-everywhere-src-5.15.3\qtdeclarative\config.tests\d3d12\d3d12.cpp:40:10: fatal error: d3d12.h: No such file or directory
    >  #include <d3d12.h>
    >           ^~~~~~~~~
    > compilation terminated.
    > mingw32-make: *** [Makefile:174: d3d12.o] Error 1
    test config.qtdeclarative_quick.tests.d3d12 FAILED
    loaded result for library config.qtquick3d_assetimporters.libraries.quick3d-assimp
    Trying source 0 (type pkgConfig) of library quick3d-assimp ...
    pkg-config use disabled globally.
      => source produced no result.
    Trying source 1 (type inline) of library quick3d-assimp ...
    

    And that's a list of them:

    > C:\qt_building\qt-everywhere-src-5.15.3\qtquick3d\config.tests\assimp\main.cpp:29:10: fatal error: assimp/cimport.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtgamepad\config.tests\sdl\main.cpp:37:10: fatal error: SDL.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qt3d\config.tests\assimp\main.cpp:29:10: fatal error: assimp/cimport.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qt3d\config.tests\fbx\main.cpp:29:10: fatal error: fbxsdk.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtconnectivity\config.tests\bluez\main.cpp:29:10: fatal error: bluetooth/bluetooth.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtconnectivity\config.tests\winrt_bt\main.cpp:30:10: fatal error: windows.devices.enumeration.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtlocation\config.tests\winrt\main.cpp:30:10: fatal error: windows.system.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtmultimedia\config.tests\gstreamer\main.cpp:31:10: fatal error: gst/gst.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtmultimedia\config.tests\openal\main.cpp:32:10: fatal error: AL/al.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtmultimedia\config.tests\wasapi\main.cpp:32:10: fatal error: windows.devices.enumeration.h: No such file or directory
    > C:\qt_building\qt-everywhere-src-5.15.3\qtmultimedia\config.tests\wmsdk\main.cpp:29:10: fatal error: wmsdk.h: No such file or directory
    

    Please, tell me, if I forget to send some crucial information to show it over. I hope to get your help.
    Thank you for reading and replying.

    1 Reply Last reply
    0
    • Den-OneD Offline
      Den-OneD Offline
      Den-One
      wrote on last edited by
      #8

      I guess it's impossible to build Qt 5.15.3 from source files.
      I applied all these things to 5.15.2 and everything was builded. So maybe that's the reason why Qt 5.15.3 isn't share officially via Qt Maintenance Tool.

      jsulmJ 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Where did you get MinGW from ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • Den-OneD Offline
          Den-OneD Offline
          Den-One
          wrote on last edited by Den-One
          #3

          @SGaist , thank you for reply.
          I downloaded current MinGW from here: https://sourceforge.net/projects/mingw-w64/files/
          Do you soppouse that it doesn't suit to build Qt?

          My bad, I thought it's Qt MinGW.

          jsulmJ 1 Reply Last reply
          0
          • Den-OneD Den-One

            @SGaist , thank you for reply.
            I downloaded current MinGW from here: https://sourceforge.net/projects/mingw-w64/files/
            Do you soppouse that it doesn't suit to build Qt?

            My bad, I thought it's Qt MinGW.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @Den-One said in Build Qt 5.15.3 for Windows has fatal error alloca.h: No such file or directory:

            Do you soppouse that it doesn't suit to build Qt?

            You should use MinGW provided via Qt Installer

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2
            • Den-OneD Offline
              Den-OneD Offline
              Den-One
              wrote on last edited by Den-One
              #5

              Hello @jsulm.
              As far as I know Qt installer doesnt't supply Qt 5.15.3. For version 5, the highest one is 5.15.2.
              I downloaded "MinGW 8.1.0 32-bit" of 5.15.2 using Qt Maintenance Tool.

              There is no "mingw32-make" inside. Configure request can't start without it. Could you point me out what I do wrong, please?
              Should I change configure request somehow?

              + cd qtbase
              + C:\qt_building\qt-everywhere-src-5.15.3\qtbase\configure.bat -top-level -static -debug-and-release -platform win32-g++ -c++std c++2a -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-angle -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix C:\qt_building\qt-5.15.3-builded
              Bootstrapping qmake ...
              "mingw32-make" is not recognized as an internal or external command, operable program or batch file.
              
              jsulmJ 1 Reply Last reply
              0
              • Den-OneD Den-One

                Hello @jsulm.
                As far as I know Qt installer doesnt't supply Qt 5.15.3. For version 5, the highest one is 5.15.2.
                I downloaded "MinGW 8.1.0 32-bit" of 5.15.2 using Qt Maintenance Tool.

                There is no "mingw32-make" inside. Configure request can't start without it. Could you point me out what I do wrong, please?
                Should I change configure request somehow?

                + cd qtbase
                + C:\qt_building\qt-everywhere-src-5.15.3\qtbase\configure.bat -top-level -static -debug-and-release -platform win32-g++ -c++std c++2a -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-angle -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix C:\qt_building\qt-5.15.3-builded
                Bootstrapping qmake ...
                "mingw32-make" is not recognized as an internal or external command, operable program or batch file.
                
                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @Den-One I think you should build in the MinGW terminal which initialises the build environment. It should be in the start menu in Windows and also somewhere in the MinGW installation.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                Den-OneD 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Den-One I think you should build in the MinGW terminal which initialises the build environment. It should be in the start menu in Windows and also somewhere in the MinGW installation.

                  Den-OneD Offline
                  Den-OneD Offline
                  Den-One
                  wrote on last edited by
                  #7

                  @jsulm I messed up MinGW from folder with Qt version number and MinGW from Tools folder.

                  I added these paths to the system variable PATH:

                  %SystemRoot%
                  %SystemRoot%\system32
                  %SystemRoot%\system32\Wbem
                  %SystemRoot%\system32\WindowsPowerShell\v1.0
                  %SystemRoot%\system32\OpenSSH\
                  C:\Ruby31\bin
                  C:\Program Files\Git\cmd
                  D:\Strawberry\c\bin
                  D:\Strawberry\perl\site\bin
                  D:\Strawberry\perl\bin
                  C:\Program Files (x86)\LLVM
                  C:\Qt-tools-inst\mingw810_32\bin
                  C:\Qt-tools-inst\mingw810_32\include
                  C:\Qt-tools-inst\mingw810_32\i686-w64-mingw32\bin
                  C:\Qt-tools-inst\mingw810_32\i686-w64-mingw32\include
                  C:\Qt-tools-inst\OpenSSL\Win_x86\bin
                  C:\Python27
                  C:\Python27\Scripts
                  

                  I use MinGW 8.1.0 32-bit to build this Qt version.

                  Now I get this error:

                  C:\qt_building\qt-everywhere-src-5.15.3>configure debug-and-release -platform win32-g++ -c++std c++2a -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-angle -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix C:\qt_building\qt-5.15.3-builded
                  + cd qtbase
                  + C:\qt_building\qt-everywhere-src-5.15.3\qtbase\configure.bat -top-level debug-and-release -platform win32-g++ -c++std c++2a -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-angle -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix C:\qt_building\qt-5.15.3-builded
                  Bootstrapping qmake ...
                  g++ -c -o qmakebuiltins.o -DUNICODE -DMINGW_HAS_SECURE_API=1 -std=c++11 -ffunction-sections -g  -IC:Fko/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/generators -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/src/3rdparty/tinycbor/src -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/generators/unix -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/generators/win32 -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/generators/mac -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/include -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/include/QtCore -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/include/QtCore/5.15.3 -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/include/QtCore/5.15.3/QtCore -I../src/corelib/global -IC:/qt_building/qt-everywhere-src-5.15.3/qtbase/mkspecs/win32-g++ -DQT_VERSION_STR=\"5.15.3\" -DQT_VERSION_MAJOR=5  -DQT_VERSION_MINOR=15  -DQT_VERSION_PATCH=3  -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp: In member function 'QByteArray QMakeEvaluator::getCommandOutput(const QString&, int*) const':
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp:76:18: error: '_popen' was not declared in this scope; did you mean '_lopen'?
                     76 | #define QT_POPEN _popen
                        |                  ^~~~~~
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp:540:22: note: in expansion of macro 'QT_POPEN'
                    540 |     if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ")
                        |                      ^~~~~~~~
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp:78:19: error: '_pclose' was not declared in this scope; did you mean '_lclose'?
                     78 | #define QT_PCLOSE _pclose
                        |                   ^~~~~~~
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp:550:18: note: in expansion of macro 'QT_PCLOSE'
                    550 |         int ec = QT_PCLOSE(proc);
                        |                  ^~~~~~~~~
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp: In member function 'QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinExpand(const QMakeInternal::QMakeBuiltin&, const ProKey&, const ProStringList&, ProStringList&)':
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp:1240:25: error: 'KEY_WOW64_32KEY' was not declared in this scope
                   1240 |                 flags = KEY_WOW64_32KEY;
                        |                         ^~~~~~~~~~~~~~~
                  C:/qt_building/qt-everywhere-src-5.15.3/qtbase/qmake/library/qmakebuiltins.cpp:1243:25: error: 'KEY_WOW64_64KEY' was not declared in this scope
                   1243 |                 flags = KEY_WOW64_64KEY;
                        |                         ^~~~~~~~~~~~~~~
                  Makefile:259: recipe for target 'qmakebuiltins.o' failed
                  mingw32-make: *** [qmakebuiltins.o] Error 1
                  

                  What should I do with it?

                  1 Reply Last reply
                  0
                  • Den-OneD Offline
                    Den-OneD Offline
                    Den-One
                    wrote on last edited by
                    #8

                    I guess it's impossible to build Qt 5.15.3 from source files.
                    I applied all these things to 5.15.2 and everything was builded. So maybe that's the reason why Qt 5.15.3 isn't share officially via Qt Maintenance Tool.

                    jsulmJ 1 Reply Last reply
                    0
                    • Den-OneD Den-One

                      I guess it's impossible to build Qt 5.15.3 from source files.
                      I applied all these things to 5.15.2 and everything was builded. So maybe that's the reason why Qt 5.15.3 isn't share officially via Qt Maintenance Tool.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #9

                      @Den-One said in Build Qt 5.15.3 for Windows has fatal error alloca.h: No such file or directory:

                      So maybe that's the reason why Qt 5.15.3 isn't share officially via Qt Maintenance Tool

                      No. The reason is that Qt versions > 5.15.2 are commercial only.
                      It is for sure possible to build Qt > 5.15.2 - Qt Company provides those builds to commercial users.
                      You can ask Qt developers on their mailing list, maybe they can help you.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • Christian EhrlicherC Offline
                        Christian EhrlicherC Offline
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        And when you're trying to compile 5.15. by your own you should use the latest one: https://download.qt.io/official_releases/qt/5.15/5.15.7/

                        C:/qt_building/

                        This looks strange - the dir separators are wrong. Make sure to not have sh.exe in your PATH (your git path looks like it could be there)

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        1 Reply Last reply
                        0

                        • Login

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