I'm having various problems with SGUG RSE gcc and Xlibs/libGL.
I am unable to link code with libGL and compiled X11 code will segfault with usr/sgug/lib32 in LD_LIBRARYN32_PATH
All attempts with SGUG gcc were run in sgugshell. The freeware gcc was run in default shell.
I can compile a simple glut example with freeware gcc using this command:
/usr/freeware/bin/gcc glut.c -lglut -lGL -lGLU -lXext -lX11 -lXmu -lm
But if I try the same with SGUG gcc:
/usr/sgug/bin/gcc glut.c -lglut -lGL -lGLU -lXext -lX11 -lXmu -lm
I end up with this error:
/usr/sgug/bin/ld: note: 'glColor3f' is defined in DSO //usr/lib32/libGLcore.so so try adding it to the linker command line
//usr/lib32/libGLcore.so: could not read symbols: Invalid operation
And after adding libGLcore I get this:
/usr/lib32/../lib32/libGL.so: undefined reference to `XSGIMiscQueryExtension'
/usr/lib32/../lib32/libGL.so: undefined reference to `_XSGISetSpecialDestroyHandler'
/usr/lib32/../lib32/libGL.so: undefined reference to `_XSGISetSpecialDestroyInterest'
/usr/lib32/../lib32/libGLcore.so: undefined reference to `gl_INTERPRET_END'
collect2: error: ld returned 1 exit status
It seems that XSGIMiscQueryExtension is a part of IRIX libXext but not in SGUG libXext?
But I don’t know what’s going on with gl_INTERPRET_END?
Another problem I had was with my own compile of SDL2.0.12.
I've patched SDL2.0.12 with the sgipatch in SGUG RSE git 0.0.7 and placed the lib in /usr/lib32.
I can compile a SDL2 example with
/usr/sgug/bin/gcc sdl.c -lSDL2-2.0 -lm
But when running in sgugshell I get this segfault:
Program received signal SIGSEGV, Segmentation fault.
0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
(gdb) bt
#0 0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
#1 0x04105290 in XQueryExtension () from /usr/sgug/lib32/libX11.so.6
#2 0x040f5b30 in XInitExtension () from /usr/sgug/lib32/libX11.so.6
#3 0x040b3640 in XextAddDisplay () from /usr/sgug/lib32/libXext.so
#4 0x042c152Program received signal SIGSEGV, Segmentation fault.
0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
(gdb) bt
#0 0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
#1 0x04105290 in XQueryExtension () from /usr/sgug/lib32/libX11.so.6
#2 0x040f5b30 in XInitExtension () from /usr/sgug/lib32/libX11.so.6
#3 0x040b3640 in XextAddDisplay () from /usr/sgug/lib32/libXext.so
#4 0x042c1528 in XineramaQueryExtension ()
from /usr/sgug/lib32/libXinerama.so.1
#5 0x6018913c in CheckXinerama () from /usr/lib32/libSDL2-2.0.so.0
#6 0x60189354 in X11_InitModes () from /usr/lib32/libSDL2-2.0.so.0
#7 0x6018de88 in X11_VideoInit () from /usr/lib32/libSDL2-2.0.so.0
#8 0x60144bb4 in SDL_VideoInit_REAL () from /usr/lib32/libSDL2-2.0.so.0
#9 0x5ffec9c0 in SDL_InitSubSystem_REAL () from /usr/lib32/libSDL2-2.0.so.0
#10 0x5ffecca8 in SDL_Init_REAL () from /usr/lib32/libSDL2-2.0.so.0
#11 0x60007aa4 in SDL_Init_DEFAULT () from /usr/lib32/libSDL2-2.0.so.0
#12 0x6001f070 in SDL_Init () from /usr/lib32/libSDL2-2.0.so.0
#13 0x10003798 in main (argc=1, argv=0x7ffb7f44) at rayc.c:538
8 in XineramaQueryExtension ()
from /usr/sgug/lib32/libXinerama.so.1
#5 0x6018913c in CheckXinerama () from /usr/lib32/libSDL2-2.0.so.0
#6 0x60189354 in X11_InitModes () from /usr/lib32/libSDL2-2.0.so.0
#7 0x6018de88 in X11_VideoInit () from /usr/lib32/libSDL2-2.0.so.0
#8 0x60144bb4 in SDL_VideoInit_REAL () from /usr/lib32/libSDL2-2.0.so.0
#9 0x5ffec9c0 in SDL_InitSubSystem_REAL () from /usr/lib32/libSDL2-2.0.so.0
#10 0x5ffecca8 in SDL_Init_REAL () from /usr/lib32/libSDL2-2.0.so.0
#11 0x60007aa4 in SDL_Init_DEFAULT () from /usr/lib32/libSDL2-2.0.so.0
#12 0x6001f070 in SDL_Init () from /usr/lib32/libSDL2-2.0.so.0
#13 0x10003798 in main (argc=1, argv=0x7ffb7f44) at sdl.c:538
If I remove /usr/sgug/lib32 from LD_LIBRARYN32_PATH it will run fine.
Is my install broken or am I missing something?
I am unable to link code with libGL and compiled X11 code will segfault with usr/sgug/lib32 in LD_LIBRARYN32_PATH
All attempts with SGUG gcc were run in sgugshell. The freeware gcc was run in default shell.
I can compile a simple glut example with freeware gcc using this command:
/usr/freeware/bin/gcc glut.c -lglut -lGL -lGLU -lXext -lX11 -lXmu -lm
But if I try the same with SGUG gcc:
/usr/sgug/bin/gcc glut.c -lglut -lGL -lGLU -lXext -lX11 -lXmu -lm
I end up with this error:
/usr/sgug/bin/ld: note: 'glColor3f' is defined in DSO //usr/lib32/libGLcore.so so try adding it to the linker command line
//usr/lib32/libGLcore.so: could not read symbols: Invalid operation
And after adding libGLcore I get this:
/usr/lib32/../lib32/libGL.so: undefined reference to `XSGIMiscQueryExtension'
/usr/lib32/../lib32/libGL.so: undefined reference to `_XSGISetSpecialDestroyHandler'
/usr/lib32/../lib32/libGL.so: undefined reference to `_XSGISetSpecialDestroyInterest'
/usr/lib32/../lib32/libGLcore.so: undefined reference to `gl_INTERPRET_END'
collect2: error: ld returned 1 exit status
It seems that XSGIMiscQueryExtension is a part of IRIX libXext but not in SGUG libXext?
But I don’t know what’s going on with gl_INTERPRET_END?
Another problem I had was with my own compile of SDL2.0.12.
I've patched SDL2.0.12 with the sgipatch in SGUG RSE git 0.0.7 and placed the lib in /usr/lib32.
I can compile a SDL2 example with
/usr/sgug/bin/gcc sdl.c -lSDL2-2.0 -lm
But when running in sgugshell I get this segfault:
Program received signal SIGSEGV, Segmentation fault.
0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
(gdb) bt
#0 0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
#1 0x04105290 in XQueryExtension () from /usr/sgug/lib32/libX11.so.6
#2 0x040f5b30 in XInitExtension () from /usr/sgug/lib32/libX11.so.6
#3 0x040b3640 in XextAddDisplay () from /usr/sgug/lib32/libXext.so
#4 0x042c152Program received signal SIGSEGV, Segmentation fault.
0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
(gdb) bt
#0 0x041131ac in _XSend () from /usr/sgug/lib32/libX11.so.6
#1 0x04105290 in XQueryExtension () from /usr/sgug/lib32/libX11.so.6
#2 0x040f5b30 in XInitExtension () from /usr/sgug/lib32/libX11.so.6
#3 0x040b3640 in XextAddDisplay () from /usr/sgug/lib32/libXext.so
#4 0x042c1528 in XineramaQueryExtension ()
from /usr/sgug/lib32/libXinerama.so.1
#5 0x6018913c in CheckXinerama () from /usr/lib32/libSDL2-2.0.so.0
#6 0x60189354 in X11_InitModes () from /usr/lib32/libSDL2-2.0.so.0
#7 0x6018de88 in X11_VideoInit () from /usr/lib32/libSDL2-2.0.so.0
#8 0x60144bb4 in SDL_VideoInit_REAL () from /usr/lib32/libSDL2-2.0.so.0
#9 0x5ffec9c0 in SDL_InitSubSystem_REAL () from /usr/lib32/libSDL2-2.0.so.0
#10 0x5ffecca8 in SDL_Init_REAL () from /usr/lib32/libSDL2-2.0.so.0
#11 0x60007aa4 in SDL_Init_DEFAULT () from /usr/lib32/libSDL2-2.0.so.0
#12 0x6001f070 in SDL_Init () from /usr/lib32/libSDL2-2.0.so.0
#13 0x10003798 in main (argc=1, argv=0x7ffb7f44) at rayc.c:538
8 in XineramaQueryExtension ()
from /usr/sgug/lib32/libXinerama.so.1
#5 0x6018913c in CheckXinerama () from /usr/lib32/libSDL2-2.0.so.0
#6 0x60189354 in X11_InitModes () from /usr/lib32/libSDL2-2.0.so.0
#7 0x6018de88 in X11_VideoInit () from /usr/lib32/libSDL2-2.0.so.0
#8 0x60144bb4 in SDL_VideoInit_REAL () from /usr/lib32/libSDL2-2.0.so.0
#9 0x5ffec9c0 in SDL_InitSubSystem_REAL () from /usr/lib32/libSDL2-2.0.so.0
#10 0x5ffecca8 in SDL_Init_REAL () from /usr/lib32/libSDL2-2.0.so.0
#11 0x60007aa4 in SDL_Init_DEFAULT () from /usr/lib32/libSDL2-2.0.so.0
#12 0x6001f070 in SDL_Init () from /usr/lib32/libSDL2-2.0.so.0
#13 0x10003798 in main (argc=1, argv=0x7ffb7f44) at sdl.c:538
If I remove /usr/sgug/lib32 from LD_LIBRARYN32_PATH it will run fine.
Is my install broken or am I missing something?