Web lists-archives.com

Re: [Mingw-users] Unable to run x86-mingw32-build.sh on ubuntu

On 28 July 2017 at 05:32, Paul Hentschel <hpmachining@xxxxxxxxxxx> wrote:
>When I run x86-mingw32-build.sh I get an error:
>$ sh x86-mingw32-build.sh i586-pc-mingw32
>x86-mingw32-build.sh: 130: /[XXX]/x86-mingw32-build-1.0/x86-mingw32-build.sh.functions:
>Syntax error: Bad function name

Check and see if /bin/sh is a symbolic link to dash instead of bash. If it is, try changing
it to point to bash instead.


This is indeed the case - /bin/sh does (correctly, apparently) point to dash.
And taking into account that 
The Debian policy manual has long mandated that "shell scripts specifying '/bin/sh' as interpreter must only use POSIX features"(https://wiki.ubuntu.com/DashAsBinSh
then IMO, because the mingw32 script seems to break the rules, changing where /bin/sh points is The Wrong Fix(R).
To me it makes sense to change the mingw32 scripts to use bash, rather than risking any of my other scripts behaving unexpectedly. You see, I do not intend for my computer to become a single-use cross-compiler; I want a general purpose computer that will continue working with my existing applications.

So, I will change x86-mingw32-build.sh & x86-mingw32-build.sh.version to start '#!/bin/bash' rather than '#!/bin/sh' and see how it goes.
If you know of problems taking this approach, please advise, so I can consider building a separate environment to do the cross compiling. 
Then again, if I'm going to create another environment, I may as well just use Windows itself and save having to cross-compile (which somewhat defeats the purpose of what mingw32 is trying to achieve). 

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
MinGW-users mailing list

This list observes the Etiquette found at
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe