pkgsrc-Users archive

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

Re: graphics/glut symbol problems



On Thu, 5 Jun 2008 09:42:56 +0100
raymond.meyer%rambler.ru@localhost wrote:

> # 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?

This came from pkgsrc-wip. It had -fvisibility=hidden for all Mesa
packages by default. I made it exclude glut because -fvisibility=hidden
broke glut completely.

Side note; the "fix" committed by tron looks bogus to me. Removing a
flag doesn't make any sense if it isn't added anwhere.

Perhaps something like this patch will work?

--- src/mesa/drivers/x11/glxapi.c.orig  2008-06-05
15:58:09.000000000 +0200 +++ src/mesa/drivers/x11/glxapi.c
2008-06-05 15:58:52.000000000 +0200 @@ -1358,7 +1358,7 @@
  * This function does not get dispatched through the dispatch table
  * since it's really a "meta" function.
  */
-__GLXextFuncPtr
+PUBLIC __GLXextFuncPtr
 glXGetProcAddressARB(const GLubyte *procName)
 {
    __GLXextFuncPtr f;


Home | Main Index | Thread Index | Old Index