How would I compile this project?

Hey guys,
I was wondering how I would compile this GitHub project i’ve basically been studying, I’ve watched GO tutorials but they haven’t taught me anything on how I would use it for this kind of project.

Project Link:

Thank You!
- Chucky

EDIT:
When I want to build, “go build” in the source code directory…It shows this.

> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master>go build
> chat.go:20:2: cannot find package “github.com/go-gl/glfw/v3.1/glfw” in any of:
> C:\Go\src\github.com\go-gl\glfw\v3.1\glfw (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\go-gl\glfw\v3.1\glfw (from $GOPATH)
> audio.go:26:2: cannot find package “github.com/go-gl/mathgl/mgl32” in any of:
> C:\Go\src\github.com\go-gl\mathgl\mgl32 (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\go-gl\mathgl\mgl32 (from $GOPATH)
> audio.go:27:2: cannot find package “github.com/thinkofdeath/steven/audio” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\audio (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\audio (from $GOPATH)
> assets.go:25:2: cannot find package “github.com/thinkofdeath/steven/console” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\console (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\console (from $GOPATH)
> model.go:29:2: cannot find package “github.com/thinkofdeath/steven/encoding/json” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\encoding\json (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\encoding\json (from $GOPATH)
> blockentity.go:21:2: cannot find package “github.com/thinkofdeath/steven/encoding/nbt” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\encoding\nbt (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\encoding\nbt (from $GOPATH)
> blockentity.go:22:2: cannot find package “github.com/thinkofdeath/steven/entitysys” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\entitysys (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\entitysys (from $GOPATH)
> audio.go:29:2: cannot find package “github.com/thinkofdeath/steven/format” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\format (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\format (from $GOPATH)
> uilogo.go:27:2: cannot find package “github.com/thinkofdeath/steven/native” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\native (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\native (from $GOPATH)
> chat.go:22:2: cannot find package “github.com/thinkofdeath/steven/protocol” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\protocol (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\protocol (from $GOPATH)
> network.go:23:2: cannot find package “github.com/thinkofdeath/steven/protocol/mojang” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\protocol\mojang (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\protocol\mojang (from $GOPATH)
> block.go:27:2: cannot find package “github.com/thinkofdeath/steven/render” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\render (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\render (from $GOPATH)
> blockliquid.go:21:2: cannot find package “github.com/thinkofdeath/steven/render/builder” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\render\builder (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\render\builder (from $GOPATH)
> desktop.go:25:2: cannot find package “github.com/thinkofdeath/steven/render/gl” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\render\gl (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\render\gl (from $GOPATH)
> audio.go:30:2: cannot find package “github.com/thinkofdeath/steven/resource” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\resource (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\resource (from $GOPATH)
> resourcepacks.go:25:2: cannot find package “github.com/thinkofdeath/steven/resource/locale” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\resource\locale (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\resource\locale (from $GOPATH)
> chunk.go:26:2: cannot find package “github.com/thinkofdeath/steven/type/bit” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\type\bit (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\type\bit (from $GOPATH)
> blockimpl.go:23:2: cannot find package “github.com/thinkofdeath/steven/type/direction” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\type\direction (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\type\direction (from $GOPATH)
> blocksnapshot.go:21:2: cannot find package “github.com/thinkofdeath/steven/type/nibble” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\type\nibble (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\type\nibble (from $GOPATH)
> block.go:28:2: cannot find package “github.com/thinkofdeath/steven/type/vmath” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\type\vmath (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\type\vmath (from $GOPATH)
> blocksign.go:22:2: cannot find package “github.com/thinkofdeath/steven/ui” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\ui (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\ui (from $GOPATH)
> client.go:31:2: cannot find package “github.com/thinkofdeath/steven/ui/scene” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\ui\scene (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\ui\scene (from $GOPATH)
> blocksnapshot.go:22:2: cannot find package “github.com/thinkofdeath/steven/world/biome” in any of:
> C:\Go\src\github.com\thinkofdeath\steven\world\biome (from $GOROOT)
> C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\thinkofdeath\steven\world\biome (from $GOPATH)

If the build instructions in the README do not work, I’d suggest contacting the owner of this repo.

EDIT: For the records, this reply had been posted before the question was edited to include the go build errors.

To be honest, I’m not sure how to get the build instructions in the README to work. I have also been having trouble contacting the owner of the repo…!

At which point does the build fail? Do you get an error message?

As stupid as it sounds, I haven’t started building because I don’t know how. I’m a noob, yes but I’ve been researching so hard and there is no information / tutorials that have helped me for this situation.
Thanks,
Chucky. @christophberger

So you are new to Go? Ok, then in a nutshell:

  • Download Go from here and follow the instructions here to install Go. Run go version to see if the installation was successful.
  • Ensure to set the environment variable GOPATH as instructed by the install doc. This is important to make the Go toolchain work.
  • Optionally add $GOPATH to your $PATH so that you can run a Go binary like any other command.
  • Ensure you have csfml installed as the README says. A Web search reveals that this is a C library, according to this page that also has further instructions: http://www.sfml-dev.org/download/csfml/
  • Now run go get github.com/thinkofdeath/steven/cmd/steven, and Go should then download, compile, and install Steven to $GOPATH/bin.

Everything I type that has GO in it, prompts me with a yes or no administrator rights box, I click yes, shows another CMD box for literally half a second and disappears.

Uh, yeah, I know I’m doing something that’s probably so obvious for you, and I apologize but i’m so confused with this. It’s not noob friendly at all!

To me this is anything but obvious. I assume you are on a Windows machine - the “administrator rights box” would indicate that. I work with OSX and Linux only, and I have not come across that behavior yet.

The only idea I have would be to open an Administrator cmd prompt and try go version from there (so that the go command would run under an Admin account with sufficient rights). This could get you rid of the admin rights box although this does not answer why this box comes up in the first place.

That seems to have fixed it! Thanks. go version go1.6.3 windows/amd64,
Although, when I look at tutorials, it shows that the command would be for example:
go run main.go, In this case, it’s a whole folder as the source code. How would I go by compiling that?

Thank you so much,

  • Chucky

go run only compiles and run the specific file you pass to it.
go build builds a whole folder and places the binary in that folder.
go install builds a whole folder and places the binary in %GOPATH%\bin.

So either go build or go install would be what you are looking for, depending on where you want to get the binary.

I highly recommend reading through the go command documentation to learn more about all the available options.

Ah! Makes more sense. I have edited the “thread”, “post” with the latest problem I have encountered.

Thanks You!

  • Chucky

cannot find package “blah” in any of:
“C:\Go\src\blah” (from $GOROOT)

This is OK for any non-standard “blah” package; there are no 3rd party packages in %GOROOT%.

cannot find package “github.com/go-gl/glfw/v3.1/glfw” in any of:
C:\Users\ann\Desktop\Steven GO\steven-master\steven-go-master\src\github.com\go-gl\glfw\v3.1\glfw (from $GOPATH)

This means that the package github.com/go-gl/glfw/v3.1/glfw is not available in %GOPATH%\src.

Didn’t go get already download and install everything?
The point is, go get downloads the package and all its dependencies, so you should already have all those missing packages in your %GOPATH\src folder.

I’d suggest to retry go get with the -v flag to see what exactly is being downloaded.

I knew I did something wrong to make it do this! Sorry.

The message from the screenshot says that git is missing. You need to install the Git client as go get depends on it.

I do have Git. I have had it for a while…this is what happens.

Looks like there is still some issue with permissions. Your current account seems not authorized to either access the file C:\go\bin\go(.exe) or to start the go process. You will want to check the account permissions as well as the permission and ownership settings of C:\go\bin\go.

“C:\WINDOWS\system32>go get github.com/thinkofdeath/steven/cmd/steven
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/thinkofdeath/steven/cmd/steven: exec: “git”: executable file not found in %PATH%”

I’m getting that again, but I DO have git installed. I don’t understand why it’s doing this.

You could try typing

git

into the command prompt, and verify if this also results in a “not found” error, or if git runs fine.

And your recent screenshot indicates that you are using bash (or some of your tools does - maybe even Go itself). Perhaps the bash environment does not have git in its path.

I must say I have not touched a Windows system since months, and I really cannot tell from a distance what is going wrong here. Looks like running Go on Windows is a tad more complex than on OSX or Linux.
What I do remember from my Windows times is that having a non-Admin account can cause trouble around installing new software every now and then.

A request to the forum community: Can someone who uses Go on Windows chime in and share some thoughts?

Hm, It does say that it’s not found.

“C:\WINDOWS\system32>git
’git’ is not recognized as an internal or external command,
operable program or batch file.”

Odd…

Looks like either a git problem or a Windows %PATH% problem then…