go-gl/example

Build errors on Mac OS 10.11

Closed this issue · 9 comments

7273 errors generated.
:(

What are the errors? Can you post the entire output?

Maybe the problem was the same as mine when I wanted to run the project for the first time (and I haven't used Go in a long time...).

OS X El Capitan Verision 10.11.3

What I did was inpired by "Test your installation" in https://golang.org/doc/install

➜  ~  go get -u github.com/go-gl/examples/glfw31-gl41core-cube
➜  ~  go install github.com/go-gl/examples/glfw31-gl41core-cube
➜  ~  ./go/bin/glfw31-gl41core-cube
OpenGL version 4.1 NVIDIA-10.8.14 310.42.15f01
panic: open square.png: no such file or directory

goroutine 1 [running, locked to thread]:
main.main()
    /Users/krzysztofkula/go/src/github.com/go-gl/examples/glfw31-gl41core-cube/cube.go:84 +0x913

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1

Now I have copied the image square.png to the go/bin/ directory.

➜  ~  cd go/bin
➜  bin  ls
glfw31-gl41core-cube square.png
➜  bin  ./glfw31-gl41core-cube
OpenGL version 4.1 NVIDIA-10.8.14 310.42.15f01

And it works.

@krzychukula, the binary looks for the "square.png" file in the current working directory. It assumes you're inside the glfw31-gl41core-cube folder, where that file is located.

@shurcooL I know, but while examples lack info for the newbies it may be the error many encounter. Maybe @phbcanada got the same error?

Maybe @phbcanada got the same error?

Maybe, but "7273 errors generated" sounds more like something else. His report is not very detailed.

examples lack info for the newbies it may be the error many encounter.

@krzychukula, I agree that it's not very clear and it might be a common pitfall. We can definitely improve to do better. I've created #50 to track that.

Go.txt

Sorry guys, took me a while to get back to this. Output attached.

What version of OS X are you running? Maybe it's out of date?

What version of Xcode or Xcode command line utilities?

As the title says, Mac OS 10.11 El Capitan. Xcode version 7.0.1

Sorry for forgetting to get back to this.

It looks to me that there must've been something misconfigured or poorly installed on that setup. I've installed the examples on multiple macs with El Capitan and Xcode 7+ and never ran into that.

I don't think it's a bug/problem in this repository or GLFW, so I'll close the issue.

Hopefully, if you try to install it again now, things should work without issues.