Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, June 2007
Qt 4.3.0 + MSYS shell


Message 1 in thread

Hi,

According to "What's new in Qt 4.3.0" ( and
http://labs.trolltech.com/blogs/2007/01/30/qtmsys ) the support for the
MSYS environment has been improved.

Now I'm trying to build Qwt ( http://qwt.sourceforge.net ) in this
environment and again I'm running into backslash problems:

> $ qmake
> $ make
> cd src/ && c:\Qt\4.3.0\bin\qmake.exe src.pro -win32 -o Makefile
> /bin/sh.exe: c:Qt4.3.0binqmake.exe: command not found
> make: *** [src//Makefile] Error 127

Unfortunately the workaround ( export MINGW_IN_SHELL=1; qmake; make -i ),
that worked with earlier Qt4 releases, is gone with the Qt 4.3.0 changes.

From the blog I got the impression, that all I have to do is qmake/make
(like on regular UNIX systems), but obviously I missed something ?

Uwe

--
 [ signature omitted ] 

Message 2 in thread

On Saturday 09 June 2007, Uwe Rathmann wrote:
> According to "What's new in Qt 4.3.0" ( and
> http://labs.trolltech.com/blogs/2007/01/30/qtmsys ) the support for the
> MSYS environment has been improved.

> From the blog I got the impression, that all I have to do is qmake/make
> (like on regular UNIX systems), but obviously I missed something ?

I had some exchange on that topic with Trolltech support: it only works with 
mingw32-make, not with make. Unfortunately that also means that not all 
make-features are present (like correct handling of Ctrl-C and parallel 
builds with -j<n>).


	Konrad

Attachment:

Attachment: pgpRc8W4XK8Gn.pgp
Description: PGP signature


Message 3 in thread

Konrad Rosenbaum wrote:

> I had some exchange on that topic with Trolltech support: it only works
> with mingw32-make, not with make. Unfortunately that also means that not
> all make-features are present (like correct handling of Ctrl-C and
> parallel builds with -j<n>).

Unfortunately "mingw32-make" doesn't give me better results:

| $ mingw32-make
| cd src/ && c:\Qt\4.3.0\bin\qmake.exe src.pro -win32 -o Makefile
| /usr/bin/sh: c:Qt4.3.0binqmake.exe: command not found
| c:\MinGW\bin\mingw32-make.exe: *** [src//Makefile] Error 127

Uwe

--
 [ signature omitted ] 

Message 4 in thread

Hi,

> | $ mingw32-make
> | cd src/ && c:\Qt\4.3.0\bin\qmake.exe src.pro -win32 -o Makefile
> | /usr/bin/sh: c:Qt4.3.0binqmake.exe: command not found
> | c:\MinGW\bin\mingw32-make.exe: *** [src//Makefile] Error 127

Mmmh... Someone got the inverse problem (slashes under Microsoft's shell 
instead of backslahses under MSYS):
	http://lists.trolltech.com/qt-interest/2007-06/msg00077.html
As far as I know Qt itself builds without problem under MSYS, but it seems 
there are still some issues left. It looks like it won't be easy to support 
both the Microsoft shell and MSYS.

How has Qt been installed?

You'll be disappointed, but all I can suggest right now is contacting 
Trolltech support or reporting the problem here:
	http://trolltech.com/bugreport-form

--
 [ signature omitted ] 

Message 5 in thread

Hi Dimitri,

> How has Qt been installed?

I executed qt-win-opensource-4.3.0-mingw.exe on a clean system.
 
> You'll be disappointed, ...

Indeed, instead of an improved MSYS support the MINGW_IN_SHELL workaround is
gone too. Now the instructions how to install Qwt doesn't work anymore and
I can't give any others. 

Of course I can edit the generated Makefiles manually, but this can't be the
solution, I recommend in the Qwt INSTALL file. 

> but all I can suggest right now is contacting 
> Trolltech support or reporting the problem here:
> http://trolltech.com/bugreport-form

Thought this problem is much too basic to be not on my side. But of course I
will report to the support.

Thanks,
Uwe



--
 [ signature omitted ] 

Message 6 in thread

Uwe Rathmann wrote:
> Hi Dimitri,
> 
>> How has Qt been installed?
> 
> I executed qt-win-opensource-4.3.0-mingw.exe on a clean system.
>  

I just compiled qt-win-opensource-4.3.0.zip and qwt-5.0.1 using MSYS 
with no problems at all. Then I realized you are using the binary :) So, 
I also tried qt-win-opensource-4.3.0-mingw.exe, set the installation 
directory in the path and did a "qmake -r" in qwt-5.0.1 and things 
compiled just fine.

To help debug what the problem might be: Note that the following 
sequence won't work:
1. Run qmake
2. Put MSYS in the PATH
3. Compile (won't work. Do qmake -r again so qmake now detects MSYS in 
the PATH and it should compile fine).

>> You'll be disappointed, ...
> 
> Indeed, instead of an improved MSYS support the MINGW_IN_SHELL workaround is
> gone too. Now the instructions how to install Qwt doesn't work anymore and
> I can't give any others. 
> 

Though MINGW_IN_SHELL is not documented AFAIK, it should be set to 1 as 
before (mkspecs/win32-g++/qmake.conf sets it). In addition, QMAKE_SH is 
set to the path to sh.

Girish

P.S. Nice Qwt dials :)

--
 [ signature omitted ] 

Message 7 in thread

Hi Girish,

> To help debug what the problem might be: Note that the following
> sequence won't work:
> 1. Run qmake
> 2. Put MSYS in the PATH
> 3. Compile (won't work. Do qmake -r again so qmake now detects MSYS in
> the PATH and it should compile fine).

I did the steps 1+3 only: my MSYS shell already starts with a usable path,
that only needs to be extended by the Qt installation directory.

I see 3 candidates, that could be responsible for the difference between our
installations:

a) Is step 2 necessary ( of course done before 1 ) and what is it ?
b) I only did "qmake", not "qmake -r" ?
c) I remember, that at the end of the MSYS installation, there was a check
for the MinGW installation, that failed. I didn't pay attention to it -
guess some misspelling on my side.

Unfortunately I don't have access to a Windows system this week. If you have
some more minutes left, maybe you could try to identify the trap I was
running into ?

Uwe

PS: I posted a support request for this topic, that can silently be ignored.

--
 [ signature omitted ] 

Message 8 in thread

Hi,

Uwe Rathmann wrote:
> Hi Girish,
> 
>> To help debug what the problem might be: Note that the following
>> sequence won't work:
>> 1. Run qmake
>> 2. Put MSYS in the PATH
>> 3. Compile (won't work. Do qmake -r again so qmake now detects MSYS in
>> the PATH and it should compile fine).
> 
> I did the steps 1+3 only: my MSYS shell already starts with a usable path,
> that only needs to be extended by the Qt installation directory.
> 
> I see 3 candidates, that could be responsible for the difference between our
> installations:
> 
> a) Is step 2 necessary ( of course done before 1 ) and what is it ?

It is not necessary, if you already had it in your PATH. I was just 
trying to point out that if MSYS comes in or goes out of the picture 
after Makefile has been created, it is necessary to run qmake again.

> b) I only did "qmake", not "qmake -r" ?

Ok, this is the problem. I am able to reproduce what you see by doing 
just "qmake" instead of "qmake -r". "qmake -r" recurses into each of the 
subdirectories and runs qmake in those subdirs. A simple qmake will only 
run qmake on the SUBDIR template and create a Makefile.

I am guessing you are used to just doing "qmake" and this worked before? 
  I am not sure if it is supposed to work, I will look into this. For 
now, use "qmake -r".

Girish

--
 [ signature omitted ] 

Message 9 in thread

Hi Girish,

> Ok, this is the problem. I am able to reproduce what you see by doing
> just "qmake" instead of "qmake -r". "qmake -r" recurses into each of the
> subdirectories and runs qmake in those subdirs. A simple qmake will only
> run qmake on the SUBDIR template and create a Makefile.
> 
> I am guessing you are used to just doing "qmake" and this worked before?

No, not without the MINGW_IN_SHELL=1 hack. But on all Unix systems and in
the Windows Shell it works this way and is IMHO the "natural" way to use
qmake ( qmake -help will show you that the "-r" options is not even
documented ).

> I am not sure if it is supposed to work, ...

Isn't qmake supposed to work the same in all environments ?

> I will look into this. For now, use "qmake -r".

Could you add the bug to the TaskTracker ? This might prevent others from
running into it.

Thanks,
Uwe

--
 [ signature omitted ] 

Message 10 in thread

Uwe Rathmann wrote:
> Hi Girish,
> 
>> Ok, this is the problem. I am able to reproduce what you see by doing
>> just "qmake" instead of "qmake -r". "qmake -r" recurses into each of the
>> subdirectories and runs qmake in those subdirs. A simple qmake will only
>> run qmake on the SUBDIR template and create a Makefile.
>>
>> I am guessing you are used to just doing "qmake" and this worked before?
> 
> No, not without the MINGW_IN_SHELL=1 hack. But on all Unix systems and in
> the Windows Shell it works this way and is IMHO the "natural" way to use
> qmake ( qmake -help will show you that the "-r" options is not even
> documented ).
> 

-r and -recursive are one and the same (-recursive is documented).

>> I will look into this. For now, use "qmake -r".
> 
> Could you add the bug to the TaskTracker ? This might prevent others from
> running into it.
> 

Task 166541. The root of the problem is the QMAKE variable in the 
Makefile has bad separators.

Thanks for reporting,
Girish

--
 [ signature omitted ] 

Message 11 in thread

Uwe Rathmann wrote:
> Konrad Rosenbaum wrote:
>
>> I had some exchange on that topic with Trolltech support: it only works
>> with mingw32-make, not with make. Unfortunately that also means that not
>> all make-features are present (like correct handling of Ctrl-C and
>> parallel builds with -j<n>).
>
> Unfortunately "mingw32-make" doesn't give me better results:
>
>| $ mingw32-make
>| cd src/ && c:\Qt\4.3.0\bin\qmake.exe src.pro -win32 -o Makefile
>| /usr/bin/sh: c:Qt4.3.0binqmake.exe: command not found
>| c:\MinGW\bin\mingw32-make.exe: *** [src//Makefile] Error 127

I've never seen this before but I use qt4.3.0 and msys. I don't know if
it makes a difference but I created an alias for mingw32-make.

From a bash command line:

alias make='mingw32-make'

I can't get to my machine right now to see what happens without the
alias. I created the original alias after the 30th time I typed make
instead of mingw32-make. Since it helped I added it to /etc/profile and
life has been good since.

It makes sense that you can either create an alias or add info into the
makefile to tell make the appropriate name is make.

--
 [ signature omitted ]