`make` error while building the latest (as of today) version of Julia

build

#1

I want to build Julia on my own. I cloned the latest Julia repo from git and installed the required dependencies. On running make, I get the following error:

robert@robhoenig:~/git/julia$ make
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make: /home/robert/git/julia/contrib/relative_path.sh: Command not found
/bin/sh: 1: /home/robert/git/julia/contrib/relative_path.sh: not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/contrib/relative_path.sh: Command not found
make[1]: /home/robert/git/julia/deps/tools/jldownload: Command not found
/home/robert/git/julia/deps/suitesparse.mk:28: recipe for target '/home/robert/git/julia/deps/srccache/SuiteSparse-4.4.5.tar.gz' failed
make[1]: *** [/home/robert/git/julia/deps/srccache/SuiteSparse-4.4.5.tar.gz] Error 127
Makefile:60: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2
robert@robhoenig:~/git/julia$ ls -l /home/robert/git/julia//contrib/relative_path.sh 
-rwxrwxr-x 1 robert robert 981 Feb 23 19:42 /home/robert/git/julia//contrib/relative_path.sh

I find this particularly strange because the file /home/robert/git/julia//contrib/relative_path.sh does in fact exist and is marked as executable.


#2

That’s weird indeed. What happens if you try to run the script with e.g. /home/robert/git/julia/contrib/relative_path.sh /home/robert /home/robert/test? Also, what’s your OS?


#3

Thanks for leading me on the right path @nalimilan! My OS is

robert@robhoenig:~/git/julia$ lsb_release -a
LSB Version:	core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial

After trying to manually execute relative_path.sh, I got an error message saying

/bin/bash^M: bad interpreter

For some reason, git had core.autocrlf set to true - meaning that on cloning, all line endings where converted to crlf. This caused the ^M on my Linux machine and also a bunch of other funny errors.

For reference, I now converted the repo back to lf with

git ls-files | xargs dos2unix

make is building now. Fingers crossed :slight_smile: