Description of problem:
Trying to cross-compile a Qt 5 based project for Windows using mingw. The build system of the project is cmake. Linking an executable fails with error:
make: *** No rule to make target `/usr/i686-w64-mingw32/sys-root/mingw/lib/libqtmain.a', needed by <the binary name>. Stop.
Version-Release number of selected component:
How reproducible: always
Steps to Reproduce:
1. have a Qt 5 based project using cmake
2. execute mingw32-cmake
3. execute make
Linking fails as described above
Linking should succeed
The problem seems to be that the build process looks for a file called libqtmain.a in /usr/i686-w64-mingw32/sys-root/mingw/lib directory. But the file provided by the mingw32-qt5-qtbase package is called libqt5main.a which I guess should be used instead.
The wrong path comes from the
file on line 76 which says:
I changed that line to use the libqt5main.a file and then the linking succeeded.
Do you have a minimal CMakeLists.txt which shows this behaviour?
Created attachment 890918 [details]
Test case for the bug
Running the test:
Extract the archive and cd to the directory it created
$> mingw32-cmake .
Thanks for the testcase!
I've prepared a new build (against Fedora 19) which should fix the problem (though I didn't fully test it yet): https://koji.fedoraproject.org/koji/taskinfo?taskID=6796108
Could you check if this resolves the issue for you?
(In reply to Erik van Pienbroek from comment #3)
> I've prepared a new build (against Fedora 19) which should fix the problem
> Could you check if this resolves the issue for you?
This seems to fix the issue.
mingw-qt5-qtbase-5.2.1-3.fc19 has been submitted as an update for Fedora 19.
mingw-qt5-qtbase-5.2.1-3.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mingw-qt5-qtbase-5.2.1-3.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
mingw-qt5-qtbase-5.2.1-3.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
mingw-qt5-qtbase-5.2.1-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.