Please nominate your Qt Champions for 2021!

Qt 5.0.1 on Windows XP - building ANGLE fails with "file not found" on flex/bison

  • All,
    getting some problems in making things work.

    I'm not new to Windows & co. but this is driving me crazy.
    I didn't had problems in installing/building QT on linux and Mac OS - just followed the docs and looked for info when problems popped out (just had to upgrade CLang on the Mac...)

    The problem is:

    • can't make the OpenGL-based examples work;
    • trying to rebuild QT fails on ANGLE;

    Hints, help, suggestions are much appreciated.

    Note: I'm doing this primarily to learn Qt, I can go on without ANGLE and OpenGL but I like to understand and solve problems rather than bypassing them.

    Environment is XP SP3 on a VirtualBox VM.

    Installed in this order:

    • .Net 4.0 + Win SDK 7

    • DirectX SDK (June 2010)

    • security updates for XP SP3

    • Active PERL, Python, Ruby (all added to PATH) using the links provided in QT5 Windows Requirements

    Installed Qt 5.0.1 for MinGW, selected to install everything (sources & tools).

    I found that no gnuwin32/bin folder was present, so downloaded and installed Bison, Flex, GPerf.
    Installation folder is C:\Program Files\GnuWin32

    Ran configure -opensource -debug-and-release -opengl es2 -angle

    Make stops on the subitem in the ANGLE project with a "system did not find the file specified" on the CreateProcess call for flex.
    Trying to troubleshoot the problem, I loaded the ANGLE project in QtCreator.
    Building subprojects like preprocessor or translator always failed the same way ("system did not find ..." when calling flex or bison).

    I tried to interpret the addGNUPath function in config.pri and tried to copy GnuWin32\bin from its original location to different subfolders in the Qt5.0.1\src tree, but didn't help.

    It seems that either I missed some steps in telling where flex and bison are.

    Best regards & thanks.

  • From "Qt for Windows Requirements":

    QtWebKit and ANGLE depend on some extra tools from the GnuWin32 Project which are provided for your convenience in the gnuwin32/bin folder:

    • Bison
    • GPerf
    • Flex

    The folder should be added to the PATH.

    If the gnuwin32/bin is missing in your source tarball (it is certainly there in mine) and you have installed your own tools then you still need to do the last step for your separate bison, gperf, and flex folders so the make system can find them. For example:
    set PATH=C:\path\to\flex\bin;C:\path\to\bison\bin;C:\path\to\gperf\bin;%PATH%

  • Yes, I added the C:\Program Files\GnuWin32\bin folder to PATH just after installing the tools.

    The sources come from qt-windows-opensource-5.0.1-mingw47_32-x86-offline.exe.
    I will try to download a separate source archive and try again.


  • The combined SDK bundle installer doesn't, unfortunately, install the tools that are in the 'standalone' source bundles.

  • Brought in the gnuwin32 tools from the source package.

    Also added ICU (forgot to install).

    Fails to build somewhere else (too tired now to troubleshoot, will give another try ASAP and will report the details).

    Never had such problems in rebuilding QT 5 for MAC (after a CLang update) or kUbuntu.


  • Ok, building WITHOUT ICU (-no-icu) works fine.

    Building WITH ICU (-icu -I c:...\icu\include -L c:...\icu\lib) stops this way:

    g++ -shared -mthreads -Wl,--out-implib,C:\Qt\Qt5.0.1\5.0.1\Src\qtbase\lib\libQt5
    Cored.a -o ....\lib\Qt5Cored.dll object_script.Qt5Cored.Debug -lole32 -luuid -
    lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -LC:/Qt/Qt5.0.1/icu/bin .obj\de
    bug_shared\Qt5Cored_resource_res.o -lz -licuin -licuuc
    -w64-mingw32/bin/ld.exe: cannot find -licuin
    -w64-mingw32/bin/ld.exe: cannot find -licuuc
    collect2.exe: error: ld returned 1 exit status
    Makefile.Debug:586: recipe for target '....\lib\Qt5Cored.dll' failed
    mingw32-make[3]: *** [....\lib\Qt5Cored.dll] Error 1

    Note that icuin.lib and icuuc.lib are present in the lib path I specified., but it seems that the parameters/options are taken in as filenames.

Log in to reply