wtf: Error on Build?
Bug Report
Summary
Ran Go Get and ran make and ran into error
What is the current behaviour?
When running make, errors out with ╍╍ g s g s wtf make install │ which wtf | xargs rm || true go install -ldflags="-X main.version=v0.0.4_`git rev-parse --abbrev-ref HEAD` -X main.date=2018-06-02T15:28:42+0100" which wtf make: *** [install] Error 1
Go version is go version go1.10.2 darwin/amd64
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 34 (18 by maintainers)
@International @askl56
Well, looks good but this change is not required. First we take a look if the gopath is set.
If this return empty we have to set the go path first before installing.
Installation
Installing
wtfappears simple. You can follow the instructions there. After you set your go path we will clone this repository usinggo.Note we are not using git clone here because this could lead to unexpected things like in this case.
Step: 1
cloning:
go get -u github.com/senorprogrammer/wtfStep: 2
changing directories:
cd $GOPATH/src/github.com/senorprogrammer/wtfStep: 3
installing
make installStep: 4
testing
make runMisc
If this problem still occur, please paste the output of
go run wtf.go. In the most cases, the dependencies are missing.Regards,
deltax
Edit: 1
Looks like that go doesn’t support that you have your code outside, read here.
This commit on
masternow checks for theGOPATH. If not set, attempts to set it.Got an error as well. Seems it’s just a PATH issue as mentioned above. Make sure you have
GOPATHin yourPATH, and$GOPATH/bin.First trying to install it:
As you can see there’s no wtf in my path. Checking the bin dir of my GOPATH shows that the binary exists.
Permissions are correct and everything, so it seems it just a matter of adding it to the PATH. I use zsh so I update my PATH in ~/.zshrc.
Restart terminal and it works.
Maybe add a simple check in the Makefile to verify that they have the GOPATH and binary folder setup before they install?
I finally have a Linux install to test this against and yeah,
make installis pretty broken there. Unless you’re usingzshit really doesn’t like theshellbits of theinstallcommand (amongst other things). Will sort that out.Not really sure what
shellis supposed to be, and it seems that the Makefile is relying on the presence of some environment variables ( maybe zsh or some other shell extensions ). The following change works on my machine: