1

Last time I tried to compile kernel for my device that runs android, I faced strange issues, shown here with the following errors:

/cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 5: $'\r': command not found
cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 12: $'\r': command not found
/cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 59: warning: here-document at line 24 delimited by end-of-file (wanted `EOF')
cmsource/kernel/samsung/msm7x30-common/scripts/mkmakefile: line 60: syntax error: unexpected end of file

The mkmakefile is bash script as you know

I tried to solve the compilation errors but I couldn't figure it out.

I suspecting from this: I made a various changes in git in one week ago like the following changes:

git config --global core.autocrlf input
git config --global core.whitespace trailing-space,space-before-tab,inden
git config --global core.autocrlf true

I saw the following post while I was searching on net: the post on stackoverflow

I must say that I downloaded kernel source with using git clone

So it seems to me there is a relationship between setting git crlf, line ending settings and kernel compilation errors caused by scripts

Can anyone shed the lights on this?

Community
  • 1
  • 1
sir mordred
  • 161
  • 1
  • 13

1 Answers1

1

The issue with git config --global core.autocrlf true is that it is a global setting which can affect all your files, including ones whose eol (end-of-line) characters should not be changed
(I found it problematic in the past).

Try first:

 git config --global core.autocrlf false

And clone again your repo to see if the issue persists.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250