Re: [PPL-devel] static initialization interferes with OpenGL

Hi Roberto,
I am using PPL v0.9.16 from one of the Fedora 8 repositories (fedora extras?). I am attaching a short C++ program to print out the OpenGL version. It requires GLUT.
When I comment out the inclusion of ppl.hh the code runs. I built the executable with the command:
g++ glversion.cpp -o glversion -lppl -lglut -lGLU -lGL
Thanks, Manoj
Roberto Bagnara wrote:
Manoj Rajagopalan wrote:
This looks like a bug to me. I'm working on a Intel Core 2 Duo / Fedora 8 laptop.
In any application that uses OpenGL, simply including ppl.hh causes the program to hang. Running GDB and interrupting it shows an error in the OpenGL library (libGL.so). This is strange but I don't know why it is happening. I am not encountering any error in non-OpenGL programs using Parma.
My OpenGL driver is the NVIDIA driver from Livna.
Has anyone encountered something like this before?
Hi Manoj,
which version of the PPL are you using? Can you provide us with a short testcase so that we try to reproduce the problem? All the best,
Roberto

Manoj Rajagopalan wrote:
I am using PPL v0.9.16 from one of the Fedora 8 repositories (fedora extras?). I am attaching a short C++ program to print out the OpenGL version. It requires GLUT.
Hello Manoj,
I think you forgot to attach the program. All the best,
Roberto

Manoj Rajagopalan wrote:
I am using PPL v0.9.16 from one of the Fedora 8 repositories (fedora extras?). I am attaching a short C++ program to print out the OpenGL version. It requires GLUT.
When I comment out the inclusion of ppl.hh the code runs. I built the executable with the command:
g++ glversion.cpp -o glversion -lppl -lglut -lGLU -lGL
Dear Manoj,
thanks for the testcase. I have tried it on a Fedora 8 machine with
$ rpm -q freeglut-devel mesa-libGL-devel mesa-libGLU-devel ppl freeglut-devel-2.4.0-11.fc8 mesa-libGL-devel-7.0.2-3.fc8 mesa-libGLU-devel-7.0.2-3.fc8 ppl-0.9-16.fc8
but did not succeed in reproducing the behavior you are observing. I have even moved the inclusion of ppl.hh before the inclusions for GLUT (to check if a macro defined in ppl.hh was colliding with something else), I have tried with different optimization levels, but I get the output
$ glversion GL Version = 1.2 Mesa 7.0.3
when invoking `glversion' locally, while I get the output
$ glversion freeglut (glversion): Unable to create direct context rendering for window '' This may hurt performance. GL Version = 1.4 (2.1.1 NVIDIA 100.14.19)
executing it remotely from a machine using the NVIDIA driver.
If you run the program in gdb and put a breakpoint to main(), then single-step it, can you see where it hangs?
Alternatively, you could set up a temporary account for me on the machine that exhibit this behavior. All the best,
Roberto

Hi Roberto,
I am guessing there is some static or extern declaration that clashes with what is in NVIDIA's driver. I have emailed linux-bugs@nvidia.com asking if I can email some their header files to you for you to see if you can spot some clashing variables.
BTW, I have the following nvidia packages installed on my Fedora 8 system:
kmod-nvidia-169.12-7.lvn8 xorg-x11-drv-nvidia-devel-169.12-1.lvn8 kmod-nvidia-2.6.24.5-85.fc8-169.12-7.lvn8 kmod-nvidia-2.6.24.4-64.fc8-169.12-6.lvn8 xorg-x11-drv-nvidia-libs-169.12-1.lvn8 xorg-x11-drv-nvidia-169.12-1.lvn8
cheers! Manoj
Roberto Bagnara wrote:
Manoj Rajagopalan wrote:
I am using PPL v0.9.16 from one of the Fedora 8 repositories (fedora extras?). I am attaching a short C++ program to print out the OpenGL version. It requires GLUT.
When I comment out the inclusion of ppl.hh the code runs. I built the executable with the command:
g++ glversion.cpp -o glversion -lppl -lglut -lGLU -lGL
Dear Manoj,
thanks for the testcase. I have tried it on a Fedora 8 machine with
$ rpm -q freeglut-devel mesa-libGL-devel mesa-libGLU-devel ppl freeglut-devel-2.4.0-11.fc8 mesa-libGL-devel-7.0.2-3.fc8 mesa-libGLU-devel-7.0.2-3.fc8 ppl-0.9-16.fc8
but did not succeed in reproducing the behavior you are observing. I have even moved the inclusion of ppl.hh before the inclusions for GLUT (to check if a macro defined in ppl.hh was colliding with something else), I have tried with different optimization levels, but I get the output
$ glversion GL Version = 1.2 Mesa 7.0.3
when invoking `glversion' locally, while I get the output
$ glversion freeglut (glversion): Unable to create direct context rendering for window '' This may hurt performance. GL Version = 1.4 (2.1.1 NVIDIA 100.14.19)
executing it remotely from a machine using the NVIDIA driver.
If you run the program in gdb and put a breakpoint to main(), then single-step it, can you see where it hangs?
Alternatively, you could set up a temporary account for me on the machine that exhibit this behavior. All the best,
Roberto

Manoj Rajagopalan wrote:
I am guessing there is some static or extern declaration that clashes with what is in NVIDIA's driver. I have emailed linux-bugs@nvidia.com asking if I can email some their header files to you for you to see if you can spot some clashing variables.
Dear Manoj,
OK, I can check the header files.
BTW, I have the following nvidia packages installed on my Fedora 8 system:
kmod-nvidia-169.12-7.lvn8 xorg-x11-drv-nvidia-devel-169.12-1.lvn8 kmod-nvidia-2.6.24.5-85.fc8-169.12-7.lvn8 kmod-nvidia-2.6.24.4-64.fc8-169.12-6.lvn8 xorg-x11-drv-nvidia-libs-169.12-1.lvn8 xorg-x11-drv-nvidia-169.12-1.lvn8
I don't have the NVIDIA packages installed. Still, I have tried again your program on Fedora 8 and nothing bad happens:
$ cat glversion.cpp #include <ppl.hh>
extern "C" { #include "GL/gl.h" #include "GL/glut.h" #include <stdio.h> }
int main(int argc, char *argv[]) { glutInit(&argc, argv); glutCreateWindow(""); printf("GL Version = %s\n", (char*)glGetString(GL_VERSION)); return 0; }
$ g++ -W -Wall -o glversion glversion.cpp -lglut -lppl $ ldd glversion linux-gate.so.1 => (0x00110000) libglut.so.3 => /usr/lib/libglut.so.3 (0x00995000) libppl.so.6 => /usr/lib/libppl.so.6 (0x00699000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04668000) libm.so.6 => /lib/libm.so.6 (0x00c58000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00a95000) libc.so.6 => /lib/libc.so.6 (0x00afd000) libGL.so.1 => /usr/lib/libGL.so.1 (0x02bb4000) libGLU.so.1 => /usr/lib/libGLU.so.1 (0x02c81000) libXext.so.6 => /usr/lib/libXext.so.6 (0x0020a000) libX11.so.6 => /usr/lib/libX11.so.6 (0x0021a000) libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00ab5000) libgmpxx.so.4 => /usr/lib/libgmpxx.so.4 (0x00693000) libgmp.so.3 => /usr/lib/libgmp.so.3 (0x007f1000) /lib/ld-linux.so.2 (0x00ade000) libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00a90000) libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00ad5000) libpthread.so.0 => /lib/libpthread.so.0 (0x00c8a000) libdl.so.2 => /lib/libdl.so.2 (0x00c83000) libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00db4000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00da7000) libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x00aca000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00d7d000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00dac000) $ rpm -qf /usr/lib/libppl.so.6 ppl-0.9-16.fc8 $ ./glversion GL Version = 1.2 Mesa 7.0.3
All the best,
Roberto
participants (2)
-
Manoj Rajagopalan
-
Roberto Bagnara