This is the mail archive of the
mailing list for the Cygwin project.
Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts
I just had to debug & fix a problem from the sed behavior change that
has little to do with MinGW.
I'm running a native version of Emacs and have makefiles, lots of
scripts, and various commands in my makefiles for extracting
dependencies. The commands use sed, gawk, ..., and started creating
bad dependency files because of carriage returns showing up in the
last field when filtering with sed & gawk.
It took a while to track down, especially because the command was
working properly when run directly in a cygwin terminal running bash,
but gave different behavior when make ran the command from inside of
I could imagine this causing all sorts of trouble for people in general.
On Fri, Jun 9, 2017 at 6:28 PM, Soegtrop, Michael
> Dear Hans-Bernhard,
>> 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?
> I simply couldn't find another way to build 50 configure / make style libraries and tools on Windows. If there is a method I haven't heard of, please let me know. MSYS and MSYS2 couldn't build a single of these libraries or tools without huge patches while doing the same on cygwin used to work out of the box.
>> 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.
> I think it is quite common to build MinGW tools on cygwin and then run these MinGW tools from cygwin, e.g. for regression testing and to process their output in cygwin e.g. to get a test verdict.
>> 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.
> I think that arguing that one should not run MinGW programs from cygwin because they are entirely different operating systems and that a build system which does this has inherent short-comings is somehow neglecting reality. Why shouldn’t one do this is the only problem are CRs?
> I also didn't ask to mess up Cygwin's pipe system. All I ask for is that tools which are documented as text processing tools like sed have an environment option to be MinGW friendly. I think people who are using sed for binary files should use the -b option - if only to document that they are doing this intentionally.
>> > 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.
> That is true - just, as I said many times, all these tools are out of my control and I do not want to tell people to open streams used for text output with "wb" just to get around pure Windows artefacts. Many people on this list said that the maintainers of such SW have every right to reject such change requests and I agree. Please think about what you are asking me here to do: filing 200 fairly useless change requests against 50 Linux centric tool and libraries. Sorry, I am not going to do this. I rather beg here to be MinGW friendly.
> Best regards,
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de
> Managing Directors: Christin Eisenschmid, Christian Lamprechter
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
Harvey J. Stein
Selected papers and presentations available at: http://ssrn.com/author=732372
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple