0

I have a one problem when I try compile a program in OpenGL 4. The trouble is the next:

X Error of failed request:  BadAlloc (insufficient resources for operation)
   Major opcode of failed request:  136 (GLX)
   Minor opcode of failed request:  34 ()
   Serial number of failed request:  40
   Current serial number in output stream:  41

I'm use Debian Wheezy.

The Code is The OpenGL Book http://openglbook-samples.googlecode.com/svn/trunk/Chapter%201/

Why is this?.

What can be the possible solutions?

The information you need, please ask for it.

Thanks very much for your answers.

Cristian
  • 1,480
  • 5
  • 32
  • 65
  • How are you compiling? Can you show some more surrounding output? –  Nov 13 '12 at 10:18
  • Yes, I'm compiling the following way: `gcc -o chapter Chapter1.c -lGL -lglut` The ouput is the same above, no show more – Cristian Nov 14 '12 at 00:32
  • A quick Google suggests to look at [this](http://ubuntuforums.org/showthread.php?t=1762103). –  Nov 14 '12 at 07:29
  • Thanks,but not Works. Other options?. – Cristian Nov 14 '12 at 17:09
  • Not really. Perhaps the answere [here](http://stackoverflow.com/a/10061248/707650) helps? –  Nov 15 '12 at 10:38
  • How I know that is the opcode correct?, should exactly `(0x00007f9d4bdf5000)` or with wich I should compare the opcode? . This is the answer when I run the command `ldd` show the following: `libGL.so.1 => /usr/lib/i386-linux-gnu/libGL.so.1 (0xb7681000)` – Cristian Nov 15 '12 at 22:08
  • And you are on a 32bit system? –  Nov 16 '12 at 10:10
  • yes, there is a problem?, why?. – Cristian Nov 16 '12 at 14:04
  • If you were on 64bit, that would definitely be the incorrect library. Now, I'm not sure. I do find it odd that that the library lives in a subdirectory `i386-linux-gnu`, and not just in `/usr/lib/` (or `/usr/lib32/`). See if you can find more `libGL` libraries on your system. And if you have an NVidia graphics card, probably make sure to use those libraries instead. –  Nov 16 '12 at 15:56
  • when I run the command: `find /usr/lib/ -iname "libGL.so.1" -exec ls -latd {} \;` The ouput is the folowing: `/usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1 -> libGL.so.1.2 /usr/lib/i386-linux-gnu/nvidia/current/libGL.so.1 -> libGL.so.304.48 /usr/lib/i386-linux-gnu/nvidia/libGL.so.1 -> /etc/alternatives/nvidia--libGL.so.1-i386-linux-gnu /usr/lib/i386-linux-gnu/libGL.so.1 -> /etc/alternatives/glx--libGL.so.1-i386-linux-gnu` **how to use libraries Nvidia?** – Cristian Nov 17 '12 at 03:13
  • To compile with libraries in a different directory: `gcc -o chapter Chapter1.c -lGL -lglut -L/usr/lib/i386-linux-gnu/nvidia`. When running the program, make sure your library path is set to that directory as well: `export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/nvidia` in bash. The amount of found libraries is kind-of scary... –  Nov 17 '12 at 18:03

0 Answers0