dimanche 1 mars 2015

qmake-generated Makefile for win32-g++ platform contains unix commands

I'm trying to build a cross-compiler with Qt 5.4.1 to generate Raspberry Pi executables from a Windows 8.1 64-bit machine.


I'm using mingw64 and a gcc 4.9 cross-compiler for the Pi on the Windows machine and I am using the Qt 5.4.1 source. PATH points to the mingw64 binaries, the gcc 4.9 cross-compiler binaries, perl binaries, and %windir%\system32.


I use the following command to build the Qt cross-compiler:



configure.bat -platform win32-g++ -opengl es2 -device linux-rasp-pi-g++ \
-device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot \dev\qtxc\sysroot \
-opensource -confirm-license -release -make libs -prefix d:\dev\qtxc \
-platform win32-g++ -xplatform linux-arm-gnueabi-g++


Everything works fine until the very end when I get a few error messages containing Unix commands (again, I'm on a Windows machine in a Windows command prompt):



Running configuration tests...
process_begin: CreateProcess(NULL, rm -f arch.obj, ...) failed.
make (e=2): The file cannot be found
(...)


Then when I look at the generated Makefile, I can see that it erroneously defines Unix commands instead of Windows commands:



# Makefile for building: qt
# Generated by qmake (3.0) (Qt 5.4.1)
# Project: qt.pro
# Template: subdirs
# Command: D:\dev\qtxc\qtbase\bin\qmake -o Makefile qt.pro

MAKEFILE = Makefile

first: make_first
QMAKE = D:\dev\qtxc\qtbase\bin\qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
(...)


Then, of course, when I try to run mingw32-make as instructed in the output from the configure command, I get error messages related to the Unix commands that don't exist in Windows:



module-qtbase-qmake_all: FORCE
@test -d qtbase\ || mkdir -p qtbase\
cd qtbase\ && $(QMAKE) D:\dev\qtxc\qtbase\qtbase.pro -o Makefile
cd qtbase\ && $(MAKE) -f Makefile qmake_all


(@test doesn't work in Windows, of course).


I have tried modifying the qtbase\mkspecs\win32-g++\qmake.conf file to remove the Unix conditional definitions (seems like nonsense to have those in the win32 file anyway), forcing the definition of QMAKE_SH or QMAKE_OS_WIN32, to no avail.


Any suggestions?


Aucun commentaire:

Enregistrer un commentaire