Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to link Glmark2 with libGL on fresh Debian Jessie #18

Closed
aowenson opened this issue Mar 14, 2016 · 1 comment
Closed

Unable to link Glmark2 with libGL on fresh Debian Jessie #18

aowenson opened this issue Mar 14, 2016 · 1 comment

Comments

@aowenson
Copy link

So I have tried compiling Glmark2 for the first time on Debian Jessie which was freshly installed a week ago. All the libraries required by ./configure are installed and can be found by ./configure. However when waf performs the linking step after compilation it cannot find libGL ("cannot find -lGL). I can't work out from waf's help how to tell waf where to look for libraries during linking, and the only place I can think to ask for help is here.

The configure step completes fine:

user@host:/Code/glmark2$ ./waf configure --prefix=/local --with-flavors=x11-gl
Setting top to : /rr-home/ambo/Code/glmark2
Setting out to : /rr-home/ambo/Code/glmark2/build
Checking for 'gcc' (c compiler) : /usr/bin/gcc
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Checking for header stdlib.h : yes
Checking for header string.h : yes
Checking for header unistd.h : yes
Checking for header stdint.h : yes
Checking for header stdio.h : yes
Checking for header jpeglib.h : yes
Checking for library m : yes
Checking for library jpeg : yes
Checking for function memset : yes
Checking for function sqrt : yes
Checking for program pkg-config : /usr/bin/pkg-config
Checking for 'libpng12' >= 1.2 : yes
Checking for 'x11' : yes
Checking for 'gl' : yes
Checking for 'egl' : yes
Checking for 'glesv2' : yes
Checking for 'libdrm' : yes
Checking for 'gbm' : yes
Checking for 'mirclient' >= 0.13 : not found
Checking for 'wayland-client' : yes
Checking for 'wayland-egl' : yes
Prefix : /rr-home/ambo/local
Data path : /rr-home/ambo/local/share/glmark2
Including extras : No
Building flavors : ['x11-gl']
'configure' finished successfully (2.035s)

When I build, tasks 1 to 65 complete successfully (although the font colour for 65 is orange/brown not green if that signifies anything). Task 66 fails:

[66/66] cxxprogram: build/src/benchmark-collection.cpp.1.o build/src/benchmark.cpp.1.o build/src/gl-headers.cpp.1.o build/src/gl-visual-config.cpp.1.o build/src/image-reader.cpp.1.o build/src/main-loop.cpp.1.o build/src/main.cpp.1.o build/src/mesh.cpp.1.o build/src/model.cpp.1.o build/src/options.cpp.1.o build/src/scene-buffer.cpp.1.o build/src/scene-build.cpp.1.o build/src/scene-bump.cpp.1.o build/src/scene-clear.cpp.1.o build/src/scene-conditionals.cpp.1.o build/src/scene-default-options.cpp.1.o build/src/scene-desktop.cpp.1.o build/src/scene-effect-2d.cpp.1.o build/src/scene-function.cpp.1.o build/src/scene-grid.cpp.1.o build/src/scene-ideas/a.cc.1.o build/src/scene-ideas/d.cc.1.o build/src/scene-ideas/e.cc.1.o build/src/scene-ideas/i.cc.1.o build/src/scene-ideas/lamp.cc.1.o build/src/scene-ideas/logo.cc.1.o build/src/scene-ideas/m.cc.1.o build/src/scene-ideas/n.cc.1.o build/src/scene-ideas/o.cc.1.o build/src/scene-ideas/s.cc.1.o build/src/scene-ideas/splines.cc.1.o build/src/scene-ideas/t.cc.1.o build/src/scene-ideas/table.cc.1.o build/src/scene-ideas.cpp.1.o build/src/scene-jellyfish.cpp.1.o build/src/scene-loop.cpp.1.o build/src/scene-pulsar.cpp.1.o build/src/scene-refract.cpp.1.o build/src/scene-shading.cpp.1.o build/src/scene-shadow.cpp.1.o build/src/scene-terrain/base-renderer.cpp.1.o build/src/scene-terrain/blur-renderer.cpp.1.o build/src/scene-terrain/copy-renderer.cpp.1.o build/src/scene-terrain/luminance-renderer.cpp.1.o build/src/scene-terrain/normal-from-height-renderer.cpp.1.o build/src/scene-terrain/overlay-renderer.cpp.1.o build/src/scene-terrain/renderer-chain.cpp.1.o build/src/scene-terrain/simplex-noise-renderer.cpp.1.o build/src/scene-terrain/terrain-renderer.cpp.1.o build/src/scene-terrain/texture-renderer.cpp.1.o build/src/scene-terrain.cpp.1.o build/src/scene-texture.cpp.1.o build/src/scene.cpp.1.o build/src/text-renderer.cpp.1.o build/src/texture.cpp.1.o build/src/canvas-generic.cpp.1.o build/src/native-state-x11.cpp.1.o build/src/gl-state-glx.cpp.1.o -> build/src/glmark2
/usr/bin/ld: cannot find -lGL

Further proof that libGL is installed:

ldconfig -p | grep libGL.so
libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so.1
libGL.so.1 (libc6,x86-64) => /usr/lib/libGL.so.1

@aowenson
Copy link
Author

This was not an issue with how waf was setup for Glmark2. Instead it was an issue with how Debian installed libGL. For future visitors, the fix is to carefully check that the targets of symlinks for libGL actually exist. My issue was that a symlink pointed to libGL.so.1.2.0 which did not exist; the fix is to create a symlink from libGL.so.1.2.0 to a libGL.so* that does exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant