[Mono-dev] Known issue with xbuild and line-feeds in Cygwin?

Bob Summerwill bob at summerwill.net
Tue Aug 26 18:28:08 UTC 2014


Thanks for the link, Marius.

The resolution for this particular case turned out to be trying to invoke
MSBuild.exe from within Cygwin with a Linux-style path to the SLN, not
related to line-endings.    Seems like that sed was fixing problems in an
older version of xbuild and wasn't needed anymore.   The real bug was just
in the same place, but different :-)

FIXED.


Cheers,
Bob


On Tue, Aug 26, 2014 at 11:10 AM, Marius Ungureanu <
marius.ungureanu at xamarin.com> wrote:

> http://chess.eecs.berkeley.edu/softdevel/faq/5.html
>
> This should solve your cygwin issues. Make the shell ignore CR.
>
>
> Bob Summerwill <bob at summerwill.net> wrote:
>
>
> I have inherited a shell script with a horrible line of sed in it which OS
> X doesn't like, to deal with line-end issues in xbuild under Cygwin ...
>
>
> # Check if we are running under Windows(cygwin) OR *nix, and use xbuild OR
> MSBuild.exe accordingly
> set isRunningCygwin=`uname | grep CYGWIN`
> if ( $isRunningCygwin == '' ) then
>     # This LINUX machine should have Mono and friends (xbuild) installed
>     set builder=`which xbuild`
> else
>     # This WINDOWS machine should have .Net Framework installed
>     set builder=`find /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0*
> -name MSBuild.exe`
> endif
>
> if ($builder == '') then
>     echo "Unable to find 'xbuild' (Linux) OR 'MSBuild.exe' (Windows) to
> build Solution, bailing!"
>     exit -1
> endif
>
> # Switch directories to get around silly MSBuild vs Cygwin issues
> cd ../LucyServer
> sed -i '/^$/d' ${LucyServerSolution}
> $builder ${LucyServerSolution} /verbosity:quiet /p:Configuration=Release
> cd ../Scripts
>
>
> Is this something which is familiar to other xbuild users?
>
> I  _think_ that the sed is trying to replace Windows-style line-endings in
> the SLN with Linux-style line-endings, though that shouldn't be necessary.
>
> I think there is a bug report in here, when I can figure out exactly what
> is going wrong.
>
> On Mac OSX the sed line barfs and fails.    Without the sed line the
> Cygwin build just silently doesn't build anything.
>
>
> Cheers,
> Bob
>
>
> --
> bob at summerwill.net
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


-- 
bob at summerwill.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140826/5f13cfa1/attachment.html>


More information about the Mono-devel-list mailing list