openwall / openwall/john

Consider working around Git on Windows' use of CRLF vs. bash scripts

Open
#4,736 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

portability
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

When I try to run ./configure on the /john/src file in Cygwin on my Windows 10 device, I get the following error:

$ ./configure
./configure: line 16: $'\r': command not found
./configure: line 31: syntax error near unexpected token newline' '/configure: line 31: ;;

When I looked at the /src file I found this disclaimer starting on line 17211:

On cygwin, bash can eat \r inside `` if the user requested igncr.

But we know of no other shell where ac_cr would be empty at this

point, so we can use a bashism as a fallback.

Is there a workaround I can use?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the ./configure failure in Cygwin on Windows and inspect the generated /src file around line 17211, where the issue notes bash and carriage-return handling. Check how Git's CRLF checkout behavior affects the bash script; done means ./configure runs without the reported \r command and syntax errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, git
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.