[Development] Failed to run configure.bat in qt/qt5 repository on Windows?

Cristian Adam cristian.adam at qt.io
Sat Aug 19 23:25:26 CEST 2023


Hi,

Not only the MinGW 12.2.0 choco package have the 106395 – [12 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72 (gnu.org)<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395> bug, but it can't actually configure Qt.

I've got the same failure:
  The syncqt process exited with code Exit code 0xc0000139

So choco is not the right way to install the needed MinGW compiler to build Qt.

I just updated my configure script to also download and extract a compatible compiler:

@echo off

set curdir=%cd%
cd c:\Qt
curl -L https://github.com/niXman/mingw-builds-binaries/releases/download/11.2.0-rt_v9-rev1/x86_64-11.2.0-release-posix-seh-rt_v9-rev1.7z > mingw.7z
cmake -E tar xf mingw.7z
cd %curdir%
set PATH=c:/Qt/mingw64/bin;%PATH%

..\repo\configure ^
  -release ^
  -nomake examples ^
  -nomake tests ^
  -developer-build ^
  -submodules qtbase,qt5compat,qtsvg,qtimageformats,qtshadertools,qtdeclarative,qttools,qtquicktimeline,qtquick3d,qtserialport ^
  -prefix c:/qt/6.5.2/my_mingw_64 ^
  -- -D CMAKE_IGNORE_PREFIX_PATH=c:/Strawberry/c -D CMAKE_PREFIX_PATH=c:/Projects/llvm-project/install-mingw

For some reason the path to the compiler needed to be short.

The above script is more of an example on how you can download and extract 7z with existing tools on Windows. You should also rebuild LLVM with this compiler.

Cheers,
Cristian

________________________________
From: Haowei Hsu <hwhsu1231 at gmail.com>
Sent: Saturday, August 19, 2023 19:59
To: Cristian Adam <cristian.adam at qt.io>
Cc: Qt development mailing list <development at qt-project.org>; Alexandru Croitor <alexandru.croitor at qt.io>
Subject: Re: [Development] Failed to run configure.bat in qt/qt5 repository on Windows?

Hello, Cristian.

Regarding building the Qt Documentation with the MinGW compiler, this time, I checkout to the 6.5.2 branch since you mentioned that:

You have used Qt 6.3, which suffers from this bug [QTBUG-109207] moc can't create output file when path is longer than 255 characters - Qt Bug Tracker<https://bugreports.qt.io/browse/QTBUG-109207> which got fixed in Qt 6.5.0.

However, I met another two problems (Oh My God~~~)

Problem 1

First of all, when I tried to run the following command:

  *   ..\..\configure.bat -release -developer-build -skip qtpositioning -- -DCMAKE_PREFIX_PATH="C:/Program Files/libclang" -DCMAKE_IGNORE_PREFIX_PATH=C:/Strawberry/c

This time, CMake reported that:

[image.png]

But I remember that Alexandru told me that:

Regarding the second case failure, you're trying to configure both qtpositioning and qtlocation.
I suggest you remove the sources of either one or the other, or pass -skip qtpositioning or -skip qtlocation to configure.

[image.png]

Problem 2

Therefore, I removed '-skip qtpositioning' and tried it again. However, this time, another error showed up:

[image.png]

The following commands are what I run:

  1.  git status
  2.  git checkout 6.5.2
  3.  git clean -xfdf && git submodule foreach --recursive git clean -xfdf
  4.  git submodule update --recursive
  5.  git status
  6.  where gcc
  7.  mkdir build\mingw && chdir build\mingw
  8.  ..\..\configure.bat -release -developer-build -skip qtpositioning -- -DCMAKE_PREFIX_PATH="C:/Program Files/libclang" -DCMAKE_IGNORE_PREFIX_PATH=C:/Strawberry/c
  9.  ..\..\configure.bat -release -developer-build -- -DCMAKE_PREFIX_PATH="C:/Program Files/libclang" -DCMAKE_IGNORE_PREFIX_PATH=C:/Strawberry/c
  10. chdir ..\..
  11. rmdir /s/q build
  12. mkdir build\mingw && chdir build\mingw
  13. ..\..\configure.bat -release -developer-build -- -DCMAKE_PREFIX_PATH="C:/Program Files/libclang" -DCMAKE_IGNORE_PREFIX_PATH=C:/Strawberry/c

You can see the attachment with the full log: log-failed-to-configure-6.5.2-branch.txt

---
Haowei Hsu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230819/8ecb37de/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 39548 bytes
Desc: image.png
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230819/8ecb37de/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 56784 bytes
Desc: image.png
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230819/8ecb37de/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 61623 bytes
Desc: image.png
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230819/8ecb37de/attachment-0005.png>


More information about the Development mailing list