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

Building with make on Windows #3676

Closed
djdv opened this issue Feb 12, 2017 · 8 comments
Closed

Building with make on Windows #3676

djdv opened this issue Feb 12, 2017 · 8 comments
Assignees

Comments

@djdv
Copy link
Contributor

djdv commented Feb 12, 2017

Version information:

N/A

Type:

Bug

Priority:

P3

Description:

This pull has broken building on Windows for me.
#3504
I haven't investigated it yet but it's spitting out this

C:\tmp\src\github.com\ipfs\go-ipfs>make install
/bin/sh: Files/Python: No such file or directory
bin/check_go_version 1.7
/bin/sh: Files/Python: No such file or directory
make: *** [mk/golang.mk:45: check_go_version] Error 127

I've been using msys2's version of GNU make to build the same way for a while via

cd %GOPATH%\src\github.com\ipfs\go-ipfs
gx i --global
make install

Reverting to a commit before that one works fine with make. I can install manually with go install still.

make issue 2

@whyrusleeping
Copy link
Member

@djdv Thanks for reporting, very quick turnaround on the issue reporting :)

@Kubuxu We've got some issues here.

@Kubuxu
Copy link
Member

Kubuxu commented Feb 12, 2017

Can you run with make --trace build and paste the output? Also try installing Python as it seems to request it, no idea why, I don't use it.

@mateon1
Copy link
Contributor

mateon1 commented Feb 12, 2017

@Kubuxu It's a quoting issue, involving (at least) $PATH

For me it's

/bin/sh: Files/ImageMagick-7.0.4-Q16:/c/Program: No such file or directory
/bin/sh: Files/ImageMagick-7.0.4-Q16:/c/Program: No such file or directory
make: *** [Rules.mk:110: help] Error 127

which is $PATH from the first space, to the second.

@djdv
Copy link
Contributor Author

djdv commented Feb 12, 2017

It seems to think check_go_version doesn't exist, but it does. Also Python is installed on this system, I was wondering why it's asking for that myself.

C:\tmp\src\github.com\ipfs\go-ipfs>make build
/bin/sh: Files/Python: No such file or directory
bin/check_go_version 1.7
/bin/sh: Files/Python: No such file or directory
make: *** [mk/golang.mk:45: check_go_version] Error 127

C:\tmp\src\github.com\ipfs\go-ipfs>make --trace build
/bin/sh: Files/Python: No such file or directory
mk/golang.mk:45: target 'check_go_version' does not exist
bin/check_go_version 1.7
/bin/sh: Files/Python: No such file or directory
make: *** [mk/golang.mk:45: check_go_version] Error 127

C:\tmp\src\github.com\ipfs\go-ipfs>ls -lh bin\check_go_version
-rwxr-xr-x 1 Dominic Dominic 1.1K Nov  2 04:04 'bin\check_go_version'

C:\tmp\src\github.com\ipfs\go-ipfs>which python
/c/Program Files/Python 3.5/python

@mateon1
Copy link
Contributor

mateon1 commented Feb 12, 2017

@djdv It seems that Python might be the first thing on your $PATH, making making the Files/Python slice the thing from the first to the second space. Probably the second argument to something

@mateon1
Copy link
Contributor

mateon1 commented Feb 12, 2017

Applying this patch fixes the issue:

diff --git a/Makefile b/Makefile
index 2ac4d09..9f5e509 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # General tools

-SHELL=PATH=$(PATH) /bin/sh
+SHELL=PATH='$(PATH)' /bin/sh

 PROTOC = protoc --gogo_out=. --proto_path=.:/usr/local/opt/protobuf/include:$(dir $@) $<

@Kubuxu
Copy link
Member

Kubuxu commented Feb 12, 2017

@mateon1 thanks for finding it <3

@djdv
Copy link
Contributor Author

djdv commented Feb 12, 2017

Works on my machine. Thanks for the quick assistance @mateon1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants