-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cross-compile Qt build tools: qmake.exe, rcc.exe... #950
Comments
Just want to second the need for this feature. I mostly need this to work with a mxe compiled qt5 (including webkit) on a windows dev machine. |
Qt's From comment on host toolchain plugin
You could try using the host toolchain on a windows machine to configure a minimal qt. The |
Zapping through some code it seems qmake gets built inside the qtbase module which has a seperate configure and produces Makefiles with qmake targets. I'm not very familiar with the internals of cross-compiling unfortunately and if we already do this stuff, excuse my ignorance :) If not, it might be possible to adapt some of this to build a qmake.exe? |
Ok, so far this kindof works:
I have yet to check if it works with the qt5 version build through mxe - most probably the paths wont fit |
starting point for mxe#950, builds `qmake.exe`, `rcc.exe`, etc
See #1431 |
Cool, i'll test that next week and how it all comes together when using it as a fully functional qt build usable on the host machine. |
Ha! I imagine "fully functional" will be the hard part (and this wasn't exactly easy) ;) |
Qt test program is working - #1436 |
|
Hi, finally had time to test this and stumbled upon:
See pastebin (http://pastebin.com/YnhDLKQY) I find it confusing since i cant see any -lpthread in the linker call. As a note my settings.mk contains |
I haven't tested with posix/dw2, what's the output of |
I see, qt host tools are built statically but there's no |
Dumpspec: pastebin (http://pastebin.com/Hm4ABWyp) Anything i can do to help? |
See #1479, tested with posix/dw2 on i686-w64-mingw32.shared and Win7 32. |
Thanks for the quick fix! I got it compiled now. I could even test it successfully with some of my smaller projects. I just added a new kit in qt creator on my host win dev pc with the built qmake.exe and g++.exe and everything was correctly compiled. Im doing some more tests but so far - great job :) |
Thanks, that's good to hear. Note that building on windows can be incredibly slow, I've never found a reason for this so let us know if you find anything. |
Dont know if this related to the slowness or just a misconfiguration myself, i just noticed that the file sizes are way bigger than usual. Some kind of optimization or stripping missing? Compared to mingw 4.9.2 bundled with Qt binaries even the libgcc dll 586KB vs 118KB |
Sidequestion: What config do i need to add to the gcc_host.mk to get a i686-w64-mingw32.shared-windres.exe compiled. The compiler is complaining thats missing when compiling windows resource files into a qt compiled exe. my host tools complain:
|
Interesting size differences, thanks. I'll have a look.
|
Hm, so i see the qt provided mingw also doesnt provide a prefixed windres.exe just the normal. I then renamed my existing windres.exe into a prefixed one and it seems to have worked. Is there a misconfiguration in gcc or the binutils that he expects a prefixed one? |
The qmake specs probably are looking for prefixed ones, try this: diff --git a/plugins/examples/host-toolchain/binutils-host.mk b/plugins/examples/host-toolchain/binutils-host.mk
index bed45ea..8f096c0 100644
--- a/plugins/examples/host-toolchain/binutils-host.mk
+++ b/plugins/examples/host-toolchain/binutils-host.mk
@@ -19,9 +19,13 @@ define $(PKG)_BUILD
$(subst --disable-werror,\
--disable-werror \
--prefix='$(PREFIX)/$(TARGET)' \
+ --program-prefix='$(TARGET)-' \
--host='$(TARGET)',\
$(binutils_BUILD))
+ # install unprefixed versions also
+ $(MAKE) -C '$(1)/binutils' -j 1 install-binPROGRAMS program_transform_name=
+
# tools seem to be duplicates of '$(PREFIX)/$(TARGET)'
rm -rf '$(PREFIX)/$(TARGET)/$(TARGET)'
endef |
See #1480. I think it's better to keep using the prefixed versions, eventually I'd rather have no unprefixed ones so multiple variants can be used side-by-side. |
See http://lists.nongnu.org/archive/html/mingw-cross-env-list/2015-10/msg00016.html
The text was updated successfully, but these errors were encountered: