gomakefilecompiler-errorscompilationethereum

Compilation fails: No such file or directory (but it DOES exist!)


I'm trying to compile the Ethereum Go client. Following the instructions I simply run make geth, but that fails:

$ make geth
build/env.sh go run build/ci.go install ./cmd/geth
make: build/env.sh: No such file or directory
make: *** [geth] Error 1

As far as I understand from this error it complaints that either build/env.sh or build/ci.go doesn't exist. So I checked out the build folder, but they both seem to be there:

$ ls -l build
total 648
drwxr-xr-x  3 kramer65  staff     102 Feb 13 13:45 _vendor
-rw-r--r--  1 kramer65  staff    2892 Feb 13 13:45 ci-notes.md
-rw-r--r--  1 kramer65  staff   30516 Feb 13 13:45 ci.go             <===
-rw-r--r--  1 kramer65  staff     123 Feb 13 13:45 deb.changelog
... some other files here
-rw-r--r--  1 kramer65  staff     379 Feb 13 13:45 deb.rules
-rwxr-xr-x  1 kramer65  staff     721 Feb 13 13:45 env.sh            <===
-rw-r--r--  1 kramer65  staff    1722 Feb 13 13:45 mvn.pom
... and some more files here

I checked whether go is installed and which version it is:

$ which go
/usr/local/bin/go
$ go version
go version go1.7.5 darwin/amd64

So go seems to be fine.

Does anybody have any idea how I can debug/solve this? All tips are welcome!


Solution

  • OK, never mind, I found it. The problem was that line endings where in DOS style.

    So to recursively convert line endings to Unix I ran:

    find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix
    

    and then tried building again. That fixed it.