go-gl / gl

Go bindings for OpenGL (generated via glow)
MIT License
1.07k stars 74 forks source link

go get fails in Debian Jessie: /usr/bin/ld: cannot find -lGl #25

Closed stephenwithav closed 8 years ago

stephenwithav commented 9 years ago

Prior to this, I fixed an include file GL/glx.h not found by apt-get installing mesa-common-dev.

$ go get github.com/go-gl/gl/v{3.2,3.3,4.1,4.4,4.5}-{core,compatibility}/gl
# github.com/go-gl/gl/v3.2-core/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v3.3-core/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v4.1-core/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v3.3-compatibility/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v3.2-compatibility/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v4.4-core/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v4.1-compatibility/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v4.5-core/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v4.4-compatibility/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/go-gl/gl/v4.5-compatibility/gl
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
dmitshur commented 9 years ago

Do you have libgl1-mesa-dev installed?

stephenwithav commented 9 years ago

apt-file search libGL.so to the rescue!

apt-get install libgl1-mesa-dev fixed the problem.

stephenwithav commented 9 years ago

Good catch, shurcool--thanks!

dmitshur commented 9 years ago

We should mention this in the README. Right now it lists only one thing (A cgo compiler (typically gcc)) as a dependency, while this issue shows that isn't true.

stephenwithav commented 9 years ago

Do you to update the README or should I send a PR?

stephenwithav commented 9 years ago

I sent a PR, #26 so I could test the web editor.