Hello everyone,
I hit a sore point here.
I couldn't get hold of aCC and aC+ (once upon a time, HP offered it for free. If anyone could hook me up, I'd appreciate).
So I went the GCC way.
I'm trying to build my benchmark tool on HP-UX and I hit the following error:
Code:
/opt/graphics/OpenGL/include/GL/gpHpInt.h:31: error: thread-local storage not supported for this target
After researching further, I found out that GCC is not compatible with some of the HP libraries. This is sad. I found the following online in a forum:
Code:
The gl.h header file includes glHpInt.h, which uses macros to make faster calls to OpenGL functions. The macros call through an array of function pointers that is declared as thread local storage.
gcc can't cope with the __thread storage type. You can avoid the entire macro mechanism and use normal function calls by using "-D__glHpInt_h__" to ifdef away the body of
glHpInt.h.
I managed to bypass that by using -D"__glHpInt_h__" on gcc, but then, I may be missing some of the performance enhancements, and that's the whole point of our workstations. =)))
I want to use HP's older GLUT exactly because of the performance enhancements.
But anyway, my main goal is just to get ANYTHING running at this point.
I hit a second sore point. On the Mac and on Linux, I don't need to use -lX11 and -lXext to build. I think all requirements are part of the native GL, GLU and GLUT libraries.
However, the functionality seems to be missing on HP-UX. I get the whole list of unsatisfied symbols:
XInternAtom
XPeekEvent
XDrawSTring
etc etc etc
However, I can't find x11 and xext:
Code:
# /usr/local/bin/gcc ./bench.c -o ./bench -D"__glHpInt_h__" -I/opt/graphics/OpenGL/include -I/usr/include/X -I/opt/graphics/OpenGL/contrib/libglut -I/opt/graphics/OpenGL/include -L/opt/graphics/OpenGL/lib -lGL -lGLU -lm -L/usr/lib/X11R6 -L/usr/lib -L/opt/graphics/OpenGL/lib -L/opt/graphics/OpenGL/contrib/libglut -lglut
collect2: ld terminated with signal 10 [Bus error], core dumped
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (/var/tmp//ccrW4xG5.o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
XInternAtom (code)
XPeekEvent (code)
XVisualIDFromVisual (code)
XFillRectangle (code)
XDrawString (code)
XInstallColormap (code)
XCreateFontCursor (code)
XSynchronize (code)
XStoreColors (code)
XSetWMProperties (code)
XFreeColormap (code)
XUngrabServer (code)
XConfigureWindow (code)
XSetCloseDownMode (code)
XLoadQueryFont (code)
XCloseDisplay (code)
XOpenDisplay (code)
XTranslateCoordinates (code)
XUngrabPointer (code)
XNextEvent (code)
XResizeWindow (code)
XCreatePixmap (code)
XFlush (code)
XGetVisualInfo (code)
XEventsQueued (code)
XKillClient (code)
XSetWMProtocols (code)
XGrabServer (code)
XWithdrawWindow (code)
XGetWindowProperty (code)
XCreateColormap (code)
XQueryExtension (code)
XSync (code)
XGetRGBColormaps (code)
XDisplayString (code)
XParseGeometry (code)
XDestroyWindow (code)
XAllocStandardColormap (code)
XPending (code)
XStoreColor (code)
XDestroySubwindows (code)
XRaiseWindow (code)
XSelectInput (code)
XCreateGC (code)
XLookupKeysym (code)
XSetWindowColormap (code)
XFreeColors (code)
XFillPolygon (code)
XQueryColors (code)
XDeleteProperty (code)
XGrabPointer (code)
XUnmapWindow (code)
XIconifyWindow (code)
XAllocColorCells (code)
XMapWindow (code)
XCreateWindow (code)
XSetWMColormapWindows (code)
XDrawLines (code)
XChangeProperty (code)
XRefreshKeyboardMapping (code)
XFree (code)
XChangeWindowAttributes (code)
XSetRGBColormaps (code)
XAllocColor (code)
XDisplayName (code)
XTextWidth (code)
XAllocWMHints (code)
XFreePixmap (code)
XLookupString (code)
and with x11 and xext
Code:
# /usr/local/bin/gcc ./pandemic.c -o ./pandemic -D_HPUX_SOURCE -D"__glHpInt_h__" -I/opt/graphics/OpenGL/include -I/usr/include/X -I/opt/graphics/OpenGL/contrib/libglut -I/opt/graphics/OpenGL/include -L/opt/graphics/OpenGL/lib -lGL -lGLU -lm -L/usr/lib/X11R6 -L/usr/lib -L/opt/graphics/OpenGL/lib -L/opt/graphics/OpenGL/contrib/libglut -lglut -lXext
/usr/ccs/bin/ld: Can't find library for -lXext
collect2: ld returned 1 exit status
Tips?
Thanks, as always.
Some investigation:
GCC complains that I am missing things like XCreateWindow, but the local libGLw.a provides XtCreateWindow. When GCC complains of missing XCreateColormap, I have on the system createColormap.
I'm beyond confused. =\