[patch] broken SDL configure on MinGW after r4928 (my dependency patch) due MSYS bash bug

View: New views
4 Messages — Rating Filter:   Alert me  

[patch] broken SDL configure on MinGW after r4928 (my dependency patch) due MSYS bash bug

by Adam Strzelecki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually after my patch commited in r4928 MinGW configure seems to  
generate broken Makefile due MSYS bash bug. (Attaching cure/patch below)

The problem is that:

TEST=`echo 'one\\
two\\
three\\'`
echo "$TEST"

Should echo:
one\
two\
three\

Does it on Linux, Mac.. all UNIX but not on MSYS (MinGW) which outputs:
one\two\three\
(new lines removed, probably it doesn't like backslashes)
Probably this bug should be submitted to MSYS team, but not waiting  
till MSYS gets it fixed (they have very slow release cycles) here goes  
simple cure...

My patch simply replaces single quoted SED rules where we needed  
newlien injection with double quoted ones.

Tested on Mac, Linux & MinGW. Please review it ASAP coz this may be  
showstopper for everybody compiling with MinGW.
Very sorry for not testing it properly on MinGW before the previous  
patch went into SVN repo, but I expected MSYS bash will behave like  
any other bash, but it doesn't :(

Regards,
--
Adam Strzelecki



_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL-SVN-MinGW-single-quote-backshash-kills-newline-in-autoconf.patch (1K) Download Attachment

Re: [patch] broken SDL configure on MinGW after r4928 (my dependency patch) due MSYS bash bug

by Adam Strzelecki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bump, can we have this patch reviewed and maybe committed, as  
currently MinGW builds are broken without it :((

Regards,
--
Adam

> Actually after my patch commited in r4928 MinGW configure seems to  
> generate broken Makefile due MSYS bash bug. (Attaching cure/patch  
> below)
>
> The problem is that:
>
> TEST=`echo 'one\\
> two\\
> three\\'`
> echo "$TEST"
>
> Should echo:
> one\
> two\
> three\
>
> Does it on Linux, Mac.. all UNIX but not on MSYS (MinGW) which  
> outputs:
> one\two\three\
> (new lines removed, probably it doesn't like backslashes)
> Probably this bug should be submitted to MSYS team, but not waiting  
> till MSYS gets it fixed (they have very slow release cycles) here  
> goes simple cure...
>
> My patch simply replaces single quoted SED rules where we needed  
> newlien injection with double quoted ones.
>
> Tested on Mac, Linux & MinGW. Please review it ASAP coz this may be  
> showstopper for everybody compiling with MinGW.
> Very sorry for not testing it properly on MinGW before the previous  
> patch went into SVN repo, but I expected MSYS bash will behave like  
> any other bash, but it doesn't :(
>
> Regards,
> --
> Adam Strzelecki
>
> <SDL-SVN-MinGW-single-quote-backshash-kills-newline-in-autoconf.patch>

_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: [patch] broken SDL configure on MinGW after r4928 (my dependency patch) due MSYS bash bug

by Sam Lantinga-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is in, I've just been dragging my heels because all the
backslashes hurt my eyes. ;)

Thanks!

On Tue, Oct 27, 2009 at 3:36 PM, Adam Strzelecki <ono@...> wrote:

> Bump, can we have this patch reviewed and maybe committed, as currently
> MinGW builds are broken without it :((
>
> Regards,
> --
> Adam
>
>> Actually after my patch commited in r4928 MinGW configure seems to
>> generate broken Makefile due MSYS bash bug. (Attaching cure/patch below)
>>
>> The problem is that:
>>
>> TEST=`echo 'one\\
>> two\\
>> three\\'`
>> echo "$TEST"
>>
>> Should echo:
>> one\
>> two\
>> three\
>>
>> Does it on Linux, Mac.. all UNIX but not on MSYS (MinGW) which outputs:
>> one\two\three\
>> (new lines removed, probably it doesn't like backslashes)
>> Probably this bug should be submitted to MSYS team, but not waiting till
>> MSYS gets it fixed (they have very slow release cycles) here goes simple
>> cure...
>>
>> My patch simply replaces single quoted SED rules where we needed newlien
>> injection with double quoted ones.
>>
>> Tested on Mac, Linux & MinGW. Please review it ASAP coz this may be
>> showstopper for everybody compiling with MinGW.
>> Very sorry for not testing it properly on MinGW before the previous patch
>> went into SVN repo, but I expected MSYS bash will behave like any other
>> bash, but it doesn't :(
>>
>> Regards,
>> --
>> Adam Strzelecki
>>
>> <SDL-SVN-MinGW-single-quote-backshash-kills-newline-in-autoconf.patch>
>
> _______________________________________________
> SDL mailing list
> SDL@...
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



--
        -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: [patch] broken SDL configure on MinGW after r4928 (my dependency patch) due MSYS bash bug

by Adam Strzelecki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> This is in, I've just been dragging my heels because all the
> backslashes hurt my eyes. ;)

Thanks.

Yeah, this is pretty obscure. I thought about just replacing  
backquotes with $(...), which seems to do the job as well and not  
suffer eating linebreaks on MSYS, but I think this exists only in  
Bash, so it could break other Bourne shell compatible shells. Ended up  
with those nasty doublequotes then :)

If only there was a solution to somehow shorten "configure" time on  
MinGW too. This makes me tear my hair out every time I need to check  
the whole build process is working with MinGW :>

--
Adam
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org