make fails 'No such file or directory' using Vagrant

236 views
Skip to first unread message

Sam Lee

unread,
Feb 29, 2016, 10:35:29 AM2/29/16
to Terraform
Hello,

Trying to compile terraform so I can start to develop my own provider, and can't get make to build the project.

I'm sure to be missing a simple step.

my laptop running Win7

$ git version
git version 2.7.2.windows.1


My steps
[on Win7]  launch git bash
[on Win7]  cd terraform
[on Win7]  vagrant up
[on Win7]  vagrant ssh
[on Vagrant]  cd /opt/gopath/src/github.com/hashicorp
[on Vagrant]  make

vagrant@terraform:/opt/gopath/src/github.com/hashicorp/terraform$ make
: No such file or directory
make: *** [fmtcheck] Error 127
vagrant@terraform:/opt/gopath/src/github.com/hashicorp/terraform$


vagrant@terraform:/opt/gopath/src/github.com/hashicorp/terraform$ dir
BUILDING.md    communicator       contrib          examples  make.bat   scripts        version.go
builtin        config             CONTRIBUTING.md  flatmap   Makefile   state          website
CHANGELOG.md   config.go          dag              Godeps    panic.go   terraform
checkpoint.go  config_test.go     deps             helper    plugin     test-fixtures
command        config_unix.go     digraph          LICENSE   README.md  Vagrantfile
commands.go    config_windows.go  dot              main.go   rpc        vendor


Thanks,
Sam

Sam Lee

unread,
Feb 29, 2016, 12:49:00 PM2/29/16
to Terraform
I figured it out.


Basically because I cloned using git running on Windows, all the text files (including the script files .sh) came with <CR><LF> instead of <LF>.

My fix was to delete my original terraform cloned directory and run this command before git clone

git config --global core.autocrlf false

Reply all
Reply to author
Forward
0 new messages