Date: Wed, 26 Mar 2014 10:07:29 -0700 (PDT) From: Anton Shterenlikht <mexas@bris.ac.uk> To: freebsd-questions@freebsd.org, freebsd-x11@freebsd.org Subject: glut stuck in glutCreateWindow() - help [WAS: Re: glut example executables: no window, no error, no exit] Message-ID: <201403261707.s2QH7RHm047716@mech-cluster241.men.bris.ac.uk>
next in thread | raw e-mail | index | archive | help
>From mexas Wed Mar 26 14:30:30 2014 >To: freebsd-questions@freebsd.org, freebsd-x11@freebsd.org >Subject: glut example executables: no window, no error, no exit >Reply-To: mexas@bris.ac.uk > >The graphics/freeglut example don't >work on ia64 11-current. By that >I mean that none of the examples >seem to do anyting, e.g. > >$ /usr/local/share/examples/freeglut/callbackmaker > >sits doing nothing indefinitely: > >41596 0 I+ 0:00.03 /usr/local/share/examples/freeglut/callbackmaker > >It neither exits, nor aborts with any error. >No graphical window is open. > >I reported identical behaviour >for all mesa-demos executables: > >http://lists.freebsd.org/pipermail/freebsd-x11/2014-March/014395.html > >Can anybody please give a hint >on what might be going on? > >These demos in themselves are of >no interest to me. The real problem >is that science/paraview shows very >similar behaviour - doesn't open >graphical window, doesn't exit, >does't issue error. So I'm hoping >to get to the bottom of this issue. > >There are quite a lot of libs these >demos use: > >$ ldd /usr/local/share/examples/freeglut/callbackmaker >/usr/local/share/examples/freeglut/callbackmaker: > libglut.so.12 => /usr/local/lib/libglut.so.12 (0x120090000) > libm.so.5 => /lib/libm.so.5 (0x12010a000) > libusbhid.so.4 => /usr/lib/libusbhid.so.4 (0x12018a000) > libGL.so.1 => /usr/local/lib/libGL.so.1 (0x1201a0000) > libXi.so.6 => /usr/local/lib/libXi.so.6 (0x12033e000) > libXrandr.so.2 => /usr/local/lib/libXrandr.so.2 (0x120370000) > libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x120394000) > libXxf86vm.so.1 => /usr/local/lib/libXxf86vm.so.1 (0x1203b8000) > libXext.so.6 => /usr/local/lib/libXext.so.6 (0x1203d2000) > libX11.so.6 => /usr/local/lib/libX11.so.6 (0x120406000) > libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x12061c000) > libXau.so.6 => /usr/local/lib/libXau.so.6 (0x12065c000) > libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x120670000) > libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x120688000) > librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x12069a000) > libc.so.7 => /lib/libc.so.7 (0x1206b8000) > libXdamage.so.1 => /usr/local/lib/libXdamage.so.1 (0x12099a000) > libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x1209ae000) > libX11-xcb.so.1 => /usr/local/lib/libX11-xcb.so.1 (0x1209c8000) > libxcb-glx.so.0 => /usr/local/lib/libxcb-glx.so.0 (0x1209da000) > libxcb-dri2.so.0 => /usr/local/lib/libxcb-dri2.so.0 (0x120a0a000) > libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x120a20000) > libthr.so.3 => /lib/libthr.so.3 (0x120a46000) > >and I've no idea where to start looking. > >Many thanks > >Anton > > I've done some more debugging. Specifically I tried to build this simple opengl hello world code: https://github.com/jckarter/hello-gl Here's a fragment of the program: /* * Entry point */ int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); glutInitWindowSize(400, 300); fprintf(stderr, "chekpoint 1\n"); glutCreateWindow("Hello World"); fprintf(stderr, "chekpoint 2\n"); glutIdleFunc(&update_fade_factor); glutDisplayFunc(&render); glewInit(); if (!GLEW_VERSION_2_0) { fprintf(stderr, "OpenGL 2.0 not available\n"); return 1; } if (!make_resources()) { fprintf(stderr, "Failed to load resources\n"); return 1; } glutMainLoop(); return 0; } Note I added 2 checkpoints. When run, I get only to the first checkpoint: $ ./hello-gl-dummy chekpoint 1 ^C $ Then it gets stuck. When run in gdb, I get: TZAV> gdb ./hello-gl-dummy GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "ia64-marcel-freebsd"... (gdb) run Starting program: /tmp/hello-gl/hello-gl-dummy [New LWP 100089] [New Thread 121404400 (LWP 100089/hello-gl-dummy)] chekpoint 1 ^C Program received signal SIGINT, Interrupt. [Switching to Thread 121404400 (LWP 100089/hello-gl-dummy)] 0x0000000120570880 in poll () from /lib/libc.so.7 (gdb) bt #0 0x0000000120570880 in poll () from /lib/libc.so.7 #1 0x0000000000000000 in ?? () (gdb) Indicating that the program is stuck in poll(2). Does this help find the root cause of the problem? Thanks Anton
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403261707.s2QH7RHm047716>