Alexpux / Qt-builds

Scripts for building Qt-5.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perl compiling issue, caused by dmake

TheGOro opened this issue · comments

I'm trying to build Qt (on a Win 7 x64 SP1) with the following command:

./buildall x64 --install-top=f:/msys/local64 --opengl-desktop --qt-version=5.1.0 --build-python --build-python

Note: I'm using mintty as terminal

When the script arrives the Perl section, it fails with the following error message:

dmake.exe:  Error: -- SHELL macro not defined
Error building PERL

No other logs are created....
As i see, dmake complaining about the SHELL variable -- which is setted as empty in the buildall script -- to fix this issue, i made a little change in the perl.sh

diff --git a/scenarios/perl.sh b/scenarios/perl.sh
index 86795d4..e7ce2fc 100644
--- a/scenarios/perl.sh
+++ b/scenarios/perl.sh
@@ -9,11 +9,15 @@ DEPENDS=(dmake)

 change_paths() {
    OLD_PATH=$PATH
+   OLD_SHELL=$SHELL
+   unset SHELL
    export PATH=$MINGW_PART_PATH:$WINDOWS_PART_PATH:$MSYS_PART_PATH
 }

 restore_paths() {
    export PATH=$OLD_PATH
+   export SHELL=$OLD_SHELL
+   unset OLD_SHELL
    unset OLD_PATH
 }

with these changes the dmake starts to build Perl and finishes properly.

I think we need unset SHELL in buildall script rather then set it empty.

Way better solution anyway. I just choose this modification, because i don't know what purpose this SHELL variable does it serve, and want to make less impact to the whole build system to avoid side effects.

I'd strongly un-recommend mintty for any proper software building exercises
due to:
https://code.google.com/p/mintty/issues/detail?id=56

ConsoleZ:
https://github.com/cbucher/console/wiki/Downloads

.. gives a much more compatible experience IMHO (and is great too).

On Thu, Aug 22, 2013 at 12:05 PM, Gabor Orosz notifications@github.comwrote:

Way better solution anyway. I just choose this modification, because i
don't know what purpose this SHELL variable does it serve, and want to
make less impact to the whole build system to avoid side effects.


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-23082433
.

Alexey can you distribute ConsoleZ with MSYS2 instead of Console2? And, tell me please, can you distribute mc(Midnight Commander) with MSYS2? That would be great!

Thanks!

@niXman, ConsoleZ already in MSYS2 archive in lib/Console2 folder. I try to add mc to MSYS2

@Alexpux Hmm.. Because of the directory name I thought it was Console2...

No. There are ConsoleZ.

@mingwandroid Does it have xterm-256 support too?

With ansicon I believe it is possible, see:

http://superuser.com/questions/357229/console2-putty-cygwin-ssh-xterm-256-integration

I usually just do "export TERM=xterm" and get 16 colours for git and tig, which is enough for me (I think any cmd.exe replacement that isn't backed by a real - hidden - Windows console window will just cause pain with IO redirection)

Oh, while we're making requests to Alexey for MSYS2 here ;-) can I vote for these 3 packages to be added (I compiled them myself and they were all trivial to build and they all worked well):

nano, vim, tig

I add TERM=xterm by default into /etc/profile in next MSYS2 snapshot.
Also I add nano-2.3.2 and tig-1.2 to MSYS2. About vim I need to think.
@niXman I try to build mc for MSYS2 but it need glib. I need investigate how many dependencies mc need to build. If it need many deps I don't do it.

@mingwandroid I gave him a chance but, it had even more issues than mintty. Home/end not working as intended, the ansicon patchwork is terrible and also not working...

ansicon works ok for me, but I do remember having trouble locating the latest version. I will provide another link once I find it.

For key bindings you can use this file (put it in your $HOME folder and remove .mingw from the filename):

http://mingw-and-ndk.googlecode.com/files/.inputrc.mingw

Sets:
and to start and end of line,
to delete,
and to backwards and forwards word (couldn't get <Ctrl-?> to work for this)
.. and turns the bell off

@niXman and @Alexpux, can you test these bindings and if they work for everyone, consider rolling the file into MSYS2? It's the most common complaint I get when trying to evangelize MSYS/MSYS2 ..

@TheGOro
.. at the end of the day the choice is between a console that can be used to build everything and one that can't, and after wasting time chasing bugs down that were because of mintty, I swore off it for ever (or at least until they fix it, long-term broken tools are kind of insane IMHO)

Damned markdown!

Sets:
Home and End to start and end of line,
Delete to delete,
Alt-Left and Alt-Right to backwards and forwards word (couldn't get Ctrl-? to work)

@mingwandroid, I just now checked this .inputrc, and all works as you said.
@Alexpux, can you replace .inputrc with the version provided by Ray in next MSYS2 snapshot?

@mingwandroid I tried this: http://adoxa.hostmyway.net/ansicon/
Your .inputrc is fine and meta keys like home and end works well. Thanks!
I'm still working on my ansicon issue...

This is issue about qt-builds. And I highly recommend add any requests for MSYS2 to MSYS2-TOOLS repository.

Yes, sorry Alexey.

On Fri, Aug 23, 2013 at 11:32 AM, Алексей notifications@github.com wrote:

This is issue about qt-builds. And I highly recommend add any requests for
MSYS2 to MSYS2-TOOLS repository.


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-23155651
.

As i see, the root cause of this problem is probably bash. If you start bash from cmd -- as most of these terminal 'emulation' like Console2/ConsoleZ, ConEmu do -- it process the ansi escape sequences themselves and limits the color capabilities to 8 (while windows command processor can handle up to 16 colors) and isatty C function returns 64 for stdin and stdout as result. If you run bash from mintty it's leaves the ansi sequences unprocessed and mintty able to process it properly, while isatty returns 0.