[Gambas-user] Gambas and NVidia
Brian Snipes
bsnipes at ...21...
Sat Mar 15 18:58:05 CET 2003
I run Gentoo 1.4rc2 with QT 3.1.0, KDE 3.1, XFree 4.3.0 and NVidia
drivers v3123. On my system Gambas wouldn't run at all. It would
segfault (see previous post for traces). The NVidia problems that some
people got me thinking and I decided to try a utility that is available
on Gentoo called 'opengl-update' that lets you switch between the OpenGL
implementations for NVidia and XFree86. To make a long story short when
I choose the XFree86 GL version I don't get the gambas segfault only
with the NVidia GL. The KDE GL screensavers and the OpenGL games run
fine with either one. I am not replacing NVidia as my Xserver driver -
only the OpenGL pieces.
The following is the help note from the utility and also the text of the
utility itself.
Brian
-----------------
opengl-update -h
usage: opengl-update <GL implementation>
note:
This utility switch between OpenGL implementations. Currently
there
are two supported implementations, namely "xfree" and "nvidia",
the
implementations for XFree86 and the NVidia drivers respectively.
examples:
opengl-update xfree
This will setup things to use libGL.so from XFree86
opengl-update nvidia
This will setup things to use libGL.so from the NVidia drivers.
-------------------
#!/bin/bash
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or
later
# Author: Martin Schlemmer <azarah at ...89...>
# $Header:
/home/cvsroot/gentoo-x86/x11-base/opengl-update/files/opengl-update-1.5,v 1.1 2002/12/31 21:19:22 azarah Exp $
source /etc/init.d/functions.sh
if [ `id -u` -ne 0 ]
then
eerror "${0}: must be root."
exit 1
fi
usage() {
cat << FOO
usage: opengl-update <GL implementation>
note:
This utility switch between OpenGL implementations. Currently
there
are two supported implementations, namely "xfree" and "nvidia",
the
implementations for XFree86 and the NVidia drivers respectively.
examples:
opengl-update xfree
This will setup things to use libGL.so from XFree86
opengl-update nvidia
This will setup things to use libGL.so from the NVidia drivers.
FOO
exit 1
}
if [ "$#" -ne 1 -a "$#" -ne 2 ] || [ "$#" -eq 2 -a "$1" != "--use-old" ]
then
usage
fi
GL_IMPLEM=""
# Only use specified implementation if it is not already selected.
if [ "$1" = "--use-old" ]
then
shift
if [ -f /etc/env.d/09opengl ]
then
source /etc/env.d/09opengl
if [ -n "${LDPATH}" ]
then
GL_IMPLEM="${LDPATH/\/usr\/lib\/opengl\/}"
GL_IMPLEM="${GL_IMPLEM/\/lib}"
unset LDPATH
fi
fi
if [ -z "${GL_IMPLEM}" ]
then
GL_IMPLEM="$1"
fi
else
GL_IMPLEM="$1"
fi
if [ ! -d /usr/lib/opengl/${GL_IMPLEM} ]
then
usage
else
ebegin "Switching to ${GL_IMPLEM} OpenGL interface"
#setup the $LDPATH
echo "LDPATH=/usr/lib/opengl/${GL_IMPLEM}/lib" >/etc/env.d/09opengl
/usr/sbin/env-update &>/dev/null
#setup the /usr/lib/libGL.so symlink
if [ -e /usr/lib/libGL.so ]
then
rm -f /usr/lib/libGL.so
fi
if [ -e /usr/lib/libGL.so.1 ]
then
rm -f /usr/lib/libGL.so.1
fi
realname="$(readlink /usr/lib/opengl/${GL_IMPLEM}/lib/libGL.so)"
ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
/usr/lib/libGL.so
ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
/usr/lib/libGL.so.1
#setup the /usr/X11R6/lib/libMesaGL.so symlink
if [ -e /usr/X11R6/lib/libMesaGL.so ]
then
rm -f /usr/X11R6/lib/libMesaGL.so
fi
realname="$(readlink /usr/lib/opengl/${GL_IMPLEM}/lib/libGL.so)"
ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
/usr/X11R6/lib/libMesaGL.so
#setup the /usr/lib/libGLcore.so symlink
if [ -e /usr/lib/libGLcore.so ]
then
rm -f /usr/lib/libGLcore.so
fi
if [ -e /usr/lib/libGLcore.so.1 ]
then
rm -f /usr/lib/libGLcore.so.1
fi
if [ -e /usr/lib/opengl/${GL_IMPLEM}/lib/libGLcore.so ]
then
realname="$(readlink /usr/lib/opengl/${GL_IMPLEM}/lib/libGLcore.so)"
ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
/usr/lib/libGLcore.so
ln -sf /usr/lib/opengl/${GL_IMPLEM}/lib/${realname} \
/usr/lib/libGLcore.so.1
fi
#setup the /usr/X11R6/lib/modules/extensions/libglx.so symlink
if [ -e /usr/X11R6/lib/modules/extensions/libglx.so ]
then
rm -f /usr/X11R6/lib/modules/extensions/libglx.so
fi
if [ -e /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.so ]
then
ln -sf /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.so \
/usr/X11R6/lib/modules/extensions/libglx.so
fi
#setup the /usr/X11R6/lib/modules/extensions/libglx.a symlink
if [ -e /usr/X11R6/lib/modules/extensions/libglx.a ]
then
rm -f /usr/X11R6/lib/modules/extensions/libglx.a
fi
if [ -e /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.a ]
then
ln -sf /usr/lib/opengl/${GL_IMPLEM}/extensions/libglx.a \
/usr/X11R6/lib/modules/extensions/libglx.a
fi
#setup the includes
for x in gl.h glx.h glxtokens.h
do
if [ -e /usr/X11R6/include/GL/${x} ]
then
rm -f /usr/X11R6/include/GL/${x}
fi
ln -sf /usr/lib/opengl/${GL_IMPLEM}/include/${x} \
/usr/X11R6/include/GL/${x}
done
eend 0
fi
# vim:ts=4
More information about the User
mailing list