Dio
Dio

Reputation: 21

Installing glfw3 on ubuntu 13.04 - make error

I downloaded glfw 3.0.2 and trying to install it onto Ubuntu 13.04. (Running Amd radeon drivers 13.08 beta - if that is any relevance.)

I followed the readme and installed xorg-dev and libglu1-mesa-dev. I then run 'cmake .' and then 'make' and get these errors:

$ make

Scanning dependencies of target glfw
[  2%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o
[  4%] Building C object src/CMakeFiles/glfw.dir/context.c.o
[  6%] Building C object src/CMakeFiles/glfw.dir/gamma.c.o
[  8%] Building C object src/CMakeFiles/glfw.dir/init.c.o
[ 10%] Building C object src/CMakeFiles/glfw.dir/input.c.o
[ 12%] Building C object src/CMakeFiles/glfw.dir/joystick.c.o
[ 14%] Building C object src/CMakeFiles/glfw.dir/monitor.c.o
[ 16%] Building C object src/CMakeFiles/glfw.dir/time.c.o
[ 18%] Building C object src/CMakeFiles/glfw.dir/window.c.o
[ 20%] Building C object src/CMakeFiles/glfw.dir/x11_clipboard.c.o
[ 22%] Building C object src/CMakeFiles/glfw.dir/x11_gamma.c.o
[ 24%] Building C object src/CMakeFiles/glfw.dir/x11_init.c.o
[ 26%] Building C object src/CMakeFiles/glfw.dir/x11_joystick.c.o
[ 28%] Building C object src/CMakeFiles/glfw.dir/x11_monitor.c.o
[ 30%] Building C object src/CMakeFiles/glfw.dir/x11_time.c.o
[ 32%] Building C object src/CMakeFiles/glfw.dir/x11_window.c.o
[ 34%] Building C object src/CMakeFiles/glfw.dir/x11_unicode.c.o
[ 36%] Building C object src/CMakeFiles/glfw.dir/glx_context.c.o
/home/dean/Downloads/glfw-3.0.2/src/glx_context.c: In function ‘_glfwPlatformGetProcAddress’:
/home/dean/Downloads/glfw-3.0.2/src/glx_context.c:598:5: warning: pointer targets in passing argument 2 of ‘dlsym’ differ in signedness [-Wpointer-sign]
In file included from /home/dean/Downloads/glfw-3.0.2/src/glx_platform.h:41:0,
             from /home/dean/Downloads/glfw-3.0.2/src/x11_platform.h:52,
             from /home/dean/Downloads/glfw-3.0.2/src/internal.h:69,
             from /home/dean/Downloads/glfw-3.0.2/src/glx_context.c:28:
/usr/include/dlfcn.h:65:14: note: expected ‘const char * __restrict__’ but argument is of type ‘const GLubyte *’
Linking C static library libglfw3.a
[ 36%] Built target glfw
Scanning dependencies of target boing
[ 38%] Building C object examples/CMakeFiles/boing.dir/boing.c.o
make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so', needed by `examples/boing'. Stop.
make[1]: *** [examples/CMakeFiles/boing.dir/all] Error 2
make: *** [all] Error 2
$

Any assistance?

Upvotes: 2

Views: 2570

Answers (3)

xmoex
xmoex

Reputation: 2702

For proprietary drivers see update & warning below

Try reinstalling libgl1-mesa-dev and libgl1-mesa-glx wich renews the libGL.so symlink without manual interference.

sudo apt-get install --reinstall libgl1-mesa-dev libgl1-mesa-glx

This worked for: Debian Wheezy

Update & Warning:

Turn's out the reinstallation of libgl1-mesa-dev and libgl1-mesa-glx renewed - as expected - the libGL.so symlink, but also broke my proprietary nvidia driver installation. After reinstalling the driver everything's fine. So in that case, it might be a good idea to just reinstall your proprietary driver.

Upvotes: 0

Sheharyar
Sheharyar

Reputation: 75820

This is what worked for me (Using Ubuntu 13.10):

$ sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so

This should work, but if you get an error like this:

ln: failed to create symbolic link ‘/usr/lib/x86_64-linux-gnu/libGL.so’: File exists

Try deleting the symlink or renaming it to something else and re-trying the above command. In my case it was pointing to an unknown file libGL.so.1.2.0.

Upvotes: 1

Michał Walenciak
Michał Walenciak

Reputation: 4369

check if /usr/lib/x86_64-linux-gnu/libGL.so exists. If no, use "apt-file search libGL.so" to find out in which package this file lies. Then install this package.

You may also try to make a symlink, as this file should be a symlink to some other .so file like libGL.so.x.y, where x and y are version numbers.

Upvotes: 1

Related Questions