pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

graphics/glut symbol problems



I'm having problems with Mesa glut package. Other packages that link to glut 
libraries fail to build with the following error:

configure:9478: checking for glutSwapBuffers in -lglut
configure:9509: gcc -o 
conftest -O2 -I/opt/pkg/include -I/usr/include -Wall -I/opt/pkg/include 
-I/usr/include -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/usr/lib -Wl,-R/usr/lib 
-L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib 
conftest.c -lglut
  -lSM -lICE -lXmu -lXi -lXext -lXmu -lGLU -lGL  -L/usr/X11R6/lib -lX11  -lXext 
-lm 
>&5
/opt/pkg.obj/graphics/gle/work.ultra10/.buildlink/lib/libglut.so: undefined 
reference to `glXGetProcAddressARB'

As far as I can see the undefined symbol is in /opt/pkg/lib/libGL.so shared 
library, so

# nm /opt/pkg/lib/libGL.so | grep glXGetProcAddressARB
00000000001e8008 t glXGetProcAddressARB

The above shows that the symbol is local in scope, and I think this is why 
glut cannot see it

Next, reading graphics/MesaLib/hacks.mk I see the following compiler flags, 
which might help to solve the problem:

.  if !empty(CC_VERSION:Mgcc-[4-9]*)
# Don't hide symbols for glut by default, it doesn't know how to unhide them.
.    if empty(PKGNAME:M*glut*)
PKG_HACKS+=             gcc-hidden-visibility
CFLAGS+=                -fvisibility=hidden
.    endif
.  endif

However, if I don't want to hide the symbols, then shouldn't the above 
be -fvisibility=default? Can anyone elaborate on this?


Home | Main Index | Thread Index | Old Index