Page 1 of 1

/usr/bin/ld: cannot find -lGL while compiling?

Posted: 07 Nov 2011, 14:36
by sellerman122
I am having a really strange issue compiling spring (83.0) on debian squeeze. About a week ago I was having some difficulties with openGL libraries but that is now fixed.

While spring is compiling it gets to about 73% and says:

/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make[2]: *** [spring-multithreaded] Error 1
make[1]: *** [rts/builds/multithreaded/CMakeFiles/engine-multithreaded.dir/all] Error 2
make: *** [all] Error 2

http://pastebin.com/jmvWPntn

I have ran sudo apt-get build-dep spring
as far as I know all dependencies are satisfied

any ideas what I should try next?

Re: /usr/bin/ld: cannot find -lGL while compiling?

Posted: 07 Nov 2011, 15:22
by dansan
sellerman122 wrote:/usr/bin/ld: cannot find -lGL
You should have a file /usr/lib/libGL.so that is prob a symlink to the right version of that library. Distros use that to point to different OpenGL-implemetations - Mesa or Nvidia or ATI, etc.
Check that it's the right one - you can prob. set it with some tool, or by reinstalling the appropriate gfx-driver.

Re: /usr/bin/ld: cannot find -lGL while compiling?

Posted: 08 Nov 2011, 03:08
by sellerman122
Thank you so much! creating a symlink in /usr/lib to libGL.so worked perfect!