From: Bryan W. <bre...@gm...> - 2017-07-27 22:24:55
|
On 28 July 2017 at 05:32, Paul Hentschel <hpm...@ch...> 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. > > Paul > > 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). Brewmanz |