views:

34

answers:

1

I was porting a C++ program from Solaris Sparc to Solaris x86. The program utilizes OpenGL library and the compilation is performed in a Sun Ultra27 workstation with the default GCC (3.4.3) and OpenGL library come with the machine.

However, the following OpenGL call couldn't found while linking:

Undefined symbol                    first referenced in file
sunOglCurPrimTablePtr               ../../lib/libgltt.so
sunOglCurrentContext                ../../lib/libgltt.so

which, both sunOglCurPrimTablePtr and sunOglCurrentContext should be available in the default OpenGL library /usr/lib/libGL.so (links to /usr/X11/lib/NVIDIA/libGL.so.1). But I couldn't find anything from it:

> nm /usr/lib/libGL.so
/usr/lib/libGL.so:

Searching on web, SUN or Nvidia didn't lead to any helpful resource. Any clue or helps? Thanks!

A: 

It turned out that certain standard OpenGL API would be translated into SUN's internal functions. By defining SUN_OGL_NO_VERTEX_MACRO compilation flag, the program wouldn't refer to sunOgl* symbol anymore and the issue resolved.

The information is found at http://java423.vicp.net:8652/infoserver.central/data/syshbk/collections/TECHNICALINSTRUCTION/1-61-210284-1.html, item 9:

Without the SUN_OGL_NO_VERTEX_MACRO compilation flag, all calls to glVertex*(), glNormal*(), glColor*(), glIndex*() and glTexCoord*() will be translated into internal, performance-enhanced routines. These function calls will NOT show up when dbx() is used, or when performing SLI-related interposing of OpenGL for Solaris applications.

The OpenGL libraries came with SUN Solaris Sparc contains SUN internal routines. But they are not existed in the OpenGL libraris in Solaris x86/x64 (which is provided by NVIDIA). I am not sure where exactly is the "translation" occurred, but our issue resolved! :)

yowkee