tags:

views:

98

answers:

2

I am trying to use opengl to render objects. Although the simple tutorial example http://www.videotutorialsrock.com/opengl_tutorial/get_opengl_setup_linux/text.phpcompiles without error when I attempt to execute the program it crashes i.e. the dreaded segmentation fault.

System

Suse Linux 11.2 64 bit

g++ (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839] Eclipse IDE Build id: 20100218-1602

according to yast 64bit freeglut and freeglut-devel are installed:

090301-3.1 libglut.so.3()(64bit) mesaglut freeglut = 090301-3.1 freeglut(x86-64) = 090301-3.1

Is this a 64 bit vs 32 bit issue? I have had the same example program working under suse 11.1 32bit.

Any help would be appreciated

A: 

Okay .Car has been pushed back up the hill and loose nut tightened.

Below is output from gdb:

~/workspaceNew/cubetest/Default> gdb GNU gdb (GDB) SUSE (6.8.91.20090930-2.4) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-suse-linux". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/...

(gdb) run ./cubetest Starting program: /home/mark/workspaceNew/cubetest/Default/cubetest ./cubetest

Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2

Try: zypper install -C "debuginfo(build-id)=591af1afa33f255704fb6a60859b93d00e205302"

Missing separate debuginfo for /usr/lib64/libglut.so.3

Try: zypper install -C "debuginfo(build-id)=768ca903dcb7f43b3a9f4cdc368d9469e44c14f7"

Missing separate debuginfo for /usr/lib64/libGLU.so.1

Try: zypper install -C "debuginfo(build-id)=a76155345771ffa204fc8a1cf63b3eca7ce1ae86"

Missing separate debuginfo for /usr/lib64/libstdc++.so.6

Try: zypper install -C "debuginfo(build-id)=62220ad5c8941afb5d332c0c47d32f8beec8ac50"

Missing separate debuginfo for /lib64/libm.so.6

Try: zypper install -C "debuginfo(build-id)=57fc1891d8d9f419fb8c7fc06a8285563b53a47e"

Missing separate debuginfo for /lib64/libgcc_s.so.1

Try: zypper install -C "debuginfo(build-id)=0206e11fa8ca0db0633073adcbf1349a7871e1dc"

Missing separate debuginfo for /lib64/libc.so.6

Try: zypper install -C "debuginfo(build-id)=b5ded0f18b9b11c5cd6b26387426ead562c332f8"

Missing separate debuginfo for /usr/lib64/libGL.so.1

Try: zypper install -C "debuginfo(build-id)=cb5a2f35ed226cb1c92f063d03b204ec24b100a6"

Missing separate debuginfo for /usr/lib64/libX11.so.6

Try: zypper install -C "debuginfo(build-id)=5fa84adc30db95abcbaea20ed7ec1c8dd94dfff2"

Missing separate debuginfo for /usr/lib64/libXxf86vm.so.1

Try: zypper install -C "debuginfo(build-id)=4ffef26febce96a31b2d5df10538bb6dba112e3b"

Missing separate debuginfo for /usr/lib64/libXext.so.6

Try: zypper install -C "debuginfo(build-id)=79d5f89d13f43ff26518ec8dd46fecfad911f968"

Missing separate debuginfo for /usr/lib64/libXdamage.so.1

Try: zypper install -C "debuginfo(build-id)=650d88fdf900daadd8ba1c9134c21b4e68b560bc"

Missing separate debuginfo for /usr/lib64/libXfixes.so.3

Try: zypper install -C "debuginfo(build-id)=6495446f04c2f9a4fa3021f7322d6f12c4017305"

Missing separate debuginfo for /usr/lib64/libdrm.so.2

Try: zypper install -C "debuginfo(build-id)=dc7d692fb4a36fa25fc513b2e36a614f5e4efc48"

Missing separate debuginfo for /lib64/libpthread.so.0

Try: zypper install -C "debuginfo(build-id)=7bcbabc9da24424f1f5ef7be77b575fd3d796288"

[Thread debugging using libthread_db enabled]

Missing separate debuginfo for /lib64/libdl.so.2

Try: zypper install -C "debuginfo(build-id)=44e66ebae672563bd496f290e08d316bc3bf0ac7"

Missing separate debuginfo for /usr/lib64/libxcb.so.1

Try: zypper install -C "debuginfo(build-id)=54a77c10d44b40080d6d8e65d277ccb7ab2a5b4a"

Missing separate debuginfo for /lib64/librt.so.1

Try: zypper install -C "debuginfo(build-id)=c663e79551b37d4c0c9bc93b252b917bfdedb150"

Missing separate debuginfo for /usr/lib64/libXau.so. Try: zypper install -C "debuginfo(build-id)=72341bb9d8a1ad2ca2bbced007f3a785121aac28"

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7bbeaf7 in fgOpenWindow () from /usr/lib64/libglut.so.3

(gdb) bt

0 0x00007ffff7bbeaf7 in fgOpenWindow () from /usr/lib64/libglut.so.3

1 0x00007ffff7bbd0fc in fgCreateWindow () from

/usr/lib64/libglut.so.3

2 0x00007ffff7bbe3d2 in glutCreateWindow () from

/usr/lib64/libglut.so.3

3 0x0000000000402c45 in main (argc=2, argv=)

at ../cube/main.cpp:191

mark g
A: 

Well, all I can say is that the example compiles and runs on Ubuntu 10.04 x64. I did have to add -lGLU to LIBS in the makefile, but since it already compiles for you, I guess that's not very helpful.

Your debug info does not provide a lot of insight; try installing -dbg packages for the relevant libraries.

dep