Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RStudio make Build All error "sh: C:\Program: No such file or directory" #54

Closed
rebjoh opened this Issue Nov 5, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@rebjoh
Copy link

commented Nov 5, 2014

Hi Windows users,

This may be a potential issue for you now or the near future, so I want to share a possible solution to it. Once you have make for Windows successfully installed, and you try to run your first make file from the class activity, i.e.

all:
    echo Build all

clean:
    echo Clean all

using RStudio and/or the shell, I obtained the following error:

echo Build all
sh: C:\Program: No such file or directory
make: *** [all] Error 127
Exited with status 2.

SOLUTION: Always add SHELL=cmd.exe to the beginning of your make file, e.g.

SHELL=cmd.exe
all:
    echo Build all

clean:
    echo Clean all

We think it is an issue with the spaces in the path for sh.exe, whereas there are no spaces in the path for cmd.exe (compare where sh vs. where cmd in command prompt). Many thanks to Shaun and Bernhard for taking the time to find the solution to this!!!

@sjackman sjackman self-assigned this Nov 6, 2014

@sjackman

This comment has been minimized.

Copy link
Member

commented Nov 6, 2014

Thanks for posting the work around, Rebecca! I would love to figure out the solution for getting sh.exe working as well. I don't have a Windows machine to test on, but I'll do some Googling and see if I can figure out what's going on here.

@sjackman

This comment has been minimized.

Copy link
Member

commented Nov 6, 2014

This might be a bug in the particular make.exe that we're using from Make for Windows - GnuWin32.

There's another more recent make.exe maintained by msysGit. Here's the installer. Would someone with a Windows machine like to try uninstalling Make for Windows - GnuWin32 and trying this one instead? @daattali @rebjoh

@daattali

This comment has been minimized.

Copy link
Member

commented Nov 6, 2014

Using their make does indeed solve the echo problem. Although echo is the only thing I've noticed a problem with using the other make, the other problem I was having with Git Bash is still happening (will open an issue now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.