﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
312	Path separators broken in qmake.conf when compiling via rpmbuild	Alex Taylor		"This is an informational ticket, as Qt4 is no longer maintained. 

I ran into this trying to run a Qt4 compile under rpmbuild. 

{{{
""e:/usr/share/qt4/mkspecs/os2-g++""\runmapsym.cmd mapsym qe.map qe.sym
/@unixroot/usr/bin/sh.exe: 1: e:/usr/share/qt4/mkspecs/os2-g++runmapsym.cmd: not
 found
make: *** [qe.exe] Error 127
error: Bad exit status from /@unixroot/var/tmp/rpm-tmp.dU9en5 (%build)
}}}

The problem is that \usr\share\qt4\mkspecs\os2-g++\qmake.conf defines
{{{
ilink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)\\runmapsym.cmd \
    mapsym $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
wlink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)\\runmapsym.cmd \
    $(QMAKESPECDIR)\\wmapsym.cmd $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
}}}

which works fine when run from a normal CMD prompt, but the ""\\"" breaks when run under the Unix shell used by rpmbuild. 

Another problem is that the DEL_FILE variable resolves to the ""del"" command which, again, works under CMD but not in rpmbuild. In this case, there's a conditional check for the variable QMAKE_SH which is supposed to handle this, but it seems that QMAKE_SH is never true.

I have addressed both of these problems by modifying qmake.conf as follows:

1. Add the line:
QMAKE_SH = $$(QMAKE_SHELL)

2. Replace the mapsym lines with the following:
{{{
!isEmpty(QMAKE_SH) {
    ilink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)/runmapsym.cmd \
        mapsym $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
    wlink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)/runmapsym.cmd \
        $(QMAKESPECDIR)/wmapsym.cmd $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
} else {
    ilink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)\\runmapsym.cmd \
        mapsym $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
    wlink:QMAKE_RUN_MAPSYM  = $(QMAKESPECDIR)\\runmapsym.cmd \
        $(QMAKESPECDIR)\\wmapsym.cmd $$QMAKE_MAP_FILE $$QMAKE_SYM_FILE
}
}}}

3. Define QMAKE_SHELL=[path\]sh.exe in the environment.

I will attach the modified qmake.conf here, for the benefit of anyone who encounters this issue in the future."	defect	new	minor		qmake	4.7.3	low		qmake shell rpmbuild	
