Challenge for change sh from mingw to Cygwin


#1

Hello. I build under Windows application from source code under Cygwin and have uknown errors:

/bin/sh …/…/libtool --tag=CC --mode=link gcc -g -O2 -O2 -g -W -Wall -o liblow-level.la imap/libimap.la imf/libimf.la maildir/libmaildir.la mbox/libmbox.la mh/libmh.la mime/libmime.la nntp/libnntp.la pop3/libpop3.la smtp/libsmtp.la feed/libfeed.la

make[6]: Leaving directory ‘/cygdrive/c/Code/libetpan/src/low-level’
make[5]: Leaving directory ‘/cygdrive/c/Code/libetpan/src/low-level’
make[4]: Leaving directory ‘/cygdrive/c/Code/libetpan/src/low-level’
make[3]: Leaving directory ‘/cygdrive/c/Code/libetpan/src’
make[2]: Leaving directory ‘/cygdrive/c/Code/libetpan/src’
make[1]: Leaving directory ‘/cygdrive/c/Code/libetpan’

imap/libimap.la: line 6: '\r': command not found imap/libimap.la: line 9: ‘\r’: command not found
imap/libimap.la: line 12: '\r': command not found imap/libimap.la: line 15: ‘\r’: command not found

link to build:
https://travis-ci.org/homdx/test-win-build/builds/494471930

I probe “find” and convert this la files with dos2unix under Cygwin. But situation are repeated.


https://travis-ci.org/homdx/test-win-build/builds/494747761

Then I setup Cygwin on my VM and start shell (bash) from Windows and build, Error are absend.
Compiled without error.

I probe searh, where is sh:

  • echo old sh path $PATH && export PATH=/usr/bin:/bin:/c/tools/cygwin/bin && sh echo new sh path $PATH

log from build:
-rwxr-xr-x 2 travis None 739859 Jan 27 2017 /bin/sh
sh: /usr/bin/sh.exe /cygdrive/c/program files/git/usr/bin/sh.exe /usr/share/man/man1/sh.1.gz
updated sh
-rwxr-xr-x 2 travis None 739859 Jan 27 2017 /bin/sh
sh: /usr/bin/sh.exe /cygdrive/c/program files/git/usr/bin/sh.exe /usr/share/man/man1/sh.1.gz

(sea log and commit)
https://travis-ci.org/homdx/test-travis-deploy/builds/494951033

How change defaullt /bin/sh from mingw to /bin/sh cygwin?

Thanks