Web lists-archives.com

Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts




Am 09.06.2017 um 18:56 schrieb Soegtrop, Michael:

Maybe my situation gets clear when I describe what my use case is: I
maintain the scripts which build the Windows installers for Coq - a
proof assistant with a GTK based UI. This starts building a MinGW
OCaml compiler from sources.

You're doing this via Cygwin, i.e. on a Windows machine, where MinGW is a _native_ toolchain. That begs the question: why are you doing a cross build in the first place?

Cross building generally means that _no_ programs built for the target host may ever be run by the build scripts, because they simply won't work. Any attempt to do so is either a severe bug in the existing build setup, or the consequence of trying to coerce a build script that just cannot handle cross-building into doing it anyway.

So you shouldn't even be getting to any place where the output of a cross-target (i.e. MinGW) executable is run on the build host, and its output piped into a build platform (i.e. Cygwin) tool.

That means what you're trying to argue here is that an evident short-coming of some build setups should be fixed by breaking Cygwin pipes' mode of operation for everyone. Sorry, but I don't see that happening.

Cross building on Linux would be much more complicated, because on
Linux I would no matter what need 3 OCaml variants but also 2 Coq
variants, because I need to compile the Coq libraries, so I need to
run Coq on the build host as well. With cygwin I can call the MinGW
variants.

Indeed. That is a lucky _exception_ to what you can do in a cross build. But you have to pay a price for this unprecedented luxury. The price is that you have to massage the output of those MinGW programs to follow Cygwin rules, or change the way those MinGW programs are built to make them follow the rules by themselves.

I don't see another way than having sed strip away the CRs. It
doesn't make sense to build programs intended to be run under plain
Windows such that they do not produce CRs.

I believe it makes much more sense than you think. Hardly any Windows tool worth using actually _needs_ those CRs in the first place.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple