LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-08-2014, 12:02 AM   #1
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware
Posts: 749

Rep: Reputation: 77
failed to load driver: swrast


I just hate AMD now. Anyways, finally got the fglrx driver installed but it is not working correctly.

Code:
pedro@slack:~$ fgl_glxgears
Using GLX_SGIX_pbuffer
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
9291 frames in 5.0 seconds = 1858.200 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 64086 requests (64086 known processed) with 0 events remaining.
Code:
pedro@slack:~$ LIBGL_DEBUG=verbose fgl_glxgears
Using GLX_SGIX_pbuffer
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/xorg/modules/dri/swrast_dri.so
libGL error: failed to load driver: swrast
10154 frames in 5.0 seconds = 2030.800 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 99549 requests (99549 known processed) with 0 events remaining.
Code:
pedro@slack:~$ glxinfo | grep render
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
OpenGL renderer string: AMD Radeon HD 6670
Running this:
Code:
# /usr/lib64/fglrx/switchlibGL amd
# /usr/lib64/fglrx/switchlibglx amd
"Fixes" the problem, but it always comes back. What is going on?

After running both commands:
Code:
pedro@slack:~$ glxinfo | grep render           
direct rendering: Yes
OpenGL renderer string: AMD Radeon HD 6670
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render, 
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render,
And everything else is fine. But as I said it comes back.

EDIT: I am using kernel 3.13.6 and fglrx beta (stable didn't work). The zip file reports fglrx version 14.2 but the built package is "fglrx-13.35.1005-x86_64-1"

Last edited by moisespedro; 03-13-2014 at 11:42 AM.
 
Old 03-08-2014, 12:23 AM   #2
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware
Posts: 749

Original Poster
Rep: Reputation: 77
I think I've found the solution here, didn't try Reaper's one, instead I've tried this. Won't mark as solved now tho.

EDIT: It is not a good solution, Steam, for example, is now broken. And running it using terminal reports the same error "libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details."

Last edited by moisespedro; 03-08-2014 at 12:37 AM.
 
Old 03-08-2014, 03:32 AM   #3
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,874
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Which exact video card do you have?
 
Old 03-08-2014, 08:29 AM   #4
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware
Posts: 749

Original Poster
Rep: Reputation: 77
Radeon 6670
 
Old 03-10-2014, 01:37 AM   #5
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,874
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Radeon 6670 should be covered by the radeonsi driver and fglrx drivers.

If I might suggest it, I would first remove fglrx drivers and then reinstall LibMesa and all required libraries affected by the fglrx driver, and then try to reinstall the proprietary driver again. Before reinstalling I would install the latest xorg drivers, LibMesa, libdrm, and kernel, test with the free driver, and then if needed install the proprietary driver.
 
Old 03-10-2014, 08:34 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by ReaperX7 View Post
Radeon 6670 should be covered by the radeonsi driver and fglrx drivers.
The HD6670 will not be handled by the radeonsi drivers, those are for GCN cards (HD7xxx and newer), it will use the r600g/radeon drivers. Anyways, the proprietary drivers are horrible, the radeon drivers should be good enough nowadays for HD6xxx cards (I use them for my HD6870 without any problems), if you use the latest version (libdrm 2.4.52, LLVM 3.4, Mesa 10.1, xf86-video-ati 7.3).
Quote:
Before reinstalling I would install the latest xorg drivers, LibMesa, libdrm, and kernel, test with the free driver, and then if needed install the proprietary driver.
Exactly what I would do (or better, exactly what I did and it worked out quite well for me to keep the free drivers).
 
Old 03-11-2014, 06:48 PM   #7
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware
Posts: 749

Original Poster
Rep: Reputation: 77
Ok, I did rebuild everything. Only one problem: xf86-video-ati. I can't figure out a way to make x11.SlackBuild to rebuild it, I tried rebuilding it manually and it gave me an error message. "glamor not found". So I went to here and I am now rebuilding mesa with the required options. Do I really need glamor? And how do I rebuild xf86-video-ati.
 
Old 03-11-2014, 07:02 PM   #8
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware
Posts: 749

Original Poster
Rep: Reputation: 77
I can't start XFCE either

Xfce4-session: error while loading shared libraries: libEGL.so.1: cannot open shared object file: No such file or directory

EDIT: I downgraded mesa to the stock version and now I am trying to rebuild with this instructions . What is odd is that now it is asking for driproto3 (it wasn't before). Just need to rebuild this and xf86-video-ati and I am done.

EDIT2: This is how my mesa.SlackBuild looks like. I gaved up on glamor and xf86-video-ati since I can stay with 7.2, I guess. I just want to rebuild mesa.
Code:
#!/bin/sh

# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PKGNAM=mesa
VERSION=10.1.0
DEMOVERS=8.1.0
BUILD=${BUILD:-1}

NUMJOBS=${NUMJOBS:--j8}

# Be sure this list is up-to-date:
DRI_DRIVERS="i915,i965,intel,nouveau,r200,radeon,swrast"

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
       *) export ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf Mesa-${VERSION}

tar xvf $CWD/MesaLib-${VERSION}.tar.?z* || exit 1
cd Mesa-$VERSION

# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;

# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
#   git checkout origin/8.0
#   git format-patch 3d657b14b4cab98a2945904823e78cd8950944f4.. # 8.0.3 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches/*.patch ; do
    patch -p1 < $patch || exit 1 ; 
  done
fi

if [ ! -r configure ]; then
  autoreconf || exit 1
fi

# Running autogen to avoid problems if our autotools don't match upstream's:
./autogen.sh

CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --docdir=/usr/doc/mesa-$VERSION \
  --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
  --with-dri-drivers="$DRI_DRIVERS" \
  --with-gallium-drivers=nouveau,r300,r600,svga \
  --enable-gallium-llvm \
  --enable-shared-glapi \
  --enable-xa \
  --enable-osmesa \
  --enable-texture-float \
  --enable-vdpau \
  --build=$ARCH-slackware-linux

# r300 requires llvm
# Other gallium drivers:
# galahad,i915,identity,llvmpipe,noop,nv50,nvc0,nvfx,rbug,softpipe,svga,trace

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1

# Now install the demos
( cd $TMP
  rm -rf mesa-demos-$DEMOVERS
  tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1
  cd mesa-demos-$DEMOVERS
  chown -R root:root .
  find . \
    \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
    -exec chmod 755 {} \; -o \
    \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
    -exec chmod 644 {} \;  
  CFLAGS="$SLKCFLAGS" \
  ./configure \
    --prefix=/usr \
    --build=$ARCH-slackware-linux
  # Build and install gears and glinfo, as well as a few other demos
  make -C src/demos gears glinfo
  make -C src/xdemos \
    glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
    glxheads glxinfo glxpbdemo glxpixmap
  mkdir -p $PKG/usr/bin
  cp -a src/demos/{gears,glinfo} $PKG/usr/bin
  for i in glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
      glxheads glxinfo glxpbdemo glxpixmap ; do
        cp -a src/xdemos/$i $PKG/usr/bin ;
  done
)
  
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9 $PKG/usr/info/*
fi

mkdir -p $PKG/usr/doc/Mesa-$VERSION/html
cp -a \
  docs/COPYING* docs/relnotes-${VERSION}*.html docs/README* docs/GL* \
  $PKG/usr/doc/Mesa-$VERSION
cp -a docs/*.html $PKG/usr/doc/Mesa-$VERSION/html
rm -f $PKG/usr/doc/Mesa-$VERSION/html/relnotes*.html

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz

Last edited by moisespedro; 03-11-2014 at 07:36 PM.
 
Old 03-11-2014, 08:11 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by moisespedro View Post
Ok, I did rebuild everything. Only one problem: xf86-video-ati. I can't figure out a way to make x11.SlackBuild to rebuild it, I tried rebuilding it manually and it gave me an error message. "glamor not found". So I went to here and I am now rebuilding mesa with the required options. Do I really need glamor? And how do I rebuild xf86-video-ati.
GLAMOR is only needed if you enabled it manually or if you use the newer xf86-video-ati 7.3, which has GLAMOR enabled by default. The usage of the x11.Slackbuild is described in the script itself. To build xf86-video-ati just run
Code:
./x11.Slackbuild driver xf86-video-ati
EDIT: Sorry, I forgot to mention that Mesa 10.1 by default uses dri3, you can either install driproto3 or add the --disable-dri3 option for Mesa. You may also want to have a look at the --disable-egl option and its companions. It helps to get a better overview of the available options when unpacking a Mesa tarball and looking at
Code:
./autogen.sh
./configure --help

Last edited by TobiSGD; 03-11-2014 at 08:18 PM.
 
Old 03-11-2014, 09:51 PM   #10
moisespedro
Member
 
Registered: Nov 2013
Distribution: Slackware
Posts: 749

Original Poster
Rep: Reputation: 77
If you change the tarball (to 7.3 version) running ./x11.SlackBuild driver xf86-video-ati doesn't work. But I guess I can stay with the 7.2, right?. And well I don't really know if I need dri3 nor egl. Actually, I don't even know what that means. Is it safe to disable it?
 
Old 03-11-2014, 10:05 PM   #11
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,874
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
It seems you're build script is missing some things. Here's a more completed support script sampler. I took the liberty of tidying it up a bit too.

I highlighted my additions and changes.

Code:
#!/bin/sh

# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PKGNAM=mesa
VERSION=10.1.0
DEMOVERS=8.1.0
BUILD=${BUILD:-1}

NUMJOBS=${NUMJOBS:--j8}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
       *) export ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf Mesa-${VERSION}

tar xvf $CWD/MesaLib-${VERSION}.tar.?z* || exit 1
cd Mesa-$VERSION

# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;

# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
#   git checkout origin/8.0
#   git format-patch 3d657b14b4cab98a2945904823e78cd8950944f4.. # 8.0.3 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches/*.patch ; do
    patch -p1 < $patch || exit 1 ; 
  done
fi

if [ ! -r configure ]; then
  autoreconf || exit 1
fi

# Running autogen to avoid problems if our autotools don't match upstream's:
./autogen.sh

CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --docdir=/usr/doc/mesa-$VERSION \
  --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
  --with-dri-drivers="i915,i965,intel,r200,radeon" \
  --with-egl-platforms="drm,x11" \
  --with-gallium-drivers="nouveau,r300,r600,svga,swrast,ilo,llvmpipe,galahad,softpipe" \
  --enable-gallium-llvm \
  --with-llvm-shared-libs \
  --enable-gles1 \
  --enable-gles2 \
  --enable-openvg \
  --enable-shared-glapi \
  --enable-xa \
  --enable-osmesa \
  --enable-gbm \
  --enable-gallium-egl \
  --enable-gallium-gbm \
  --enable-glx-tls \
  --enable-r600-llvm-compiler \
  --enable-texture-float \
  --enable-vdpau \
  --build=$ARCH-slackware-linux

# r300 requires llvm
# Other gallium drivers:
# i915,identity,noop,nv50,nvc0,nvfx,rbug,trace

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1

# Now install the demos
( cd $TMP
  rm -rf mesa-demos-$DEMOVERS
  tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1
  cd mesa-demos-$DEMOVERS
  chown -R root:root .
  find . \
    \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
    -exec chmod 755 {} \; -o \
    \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
    -exec chmod 644 {} \;  
  CFLAGS="$SLKCFLAGS" \
  ./configure \
    --prefix=/usr \
    --build=$ARCH-slackware-linux
  # Build and install gears and glinfo, as well as a few other demos
  make -C src/demos gears glinfo
  make -C src/xdemos \
    glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
    glxheads glxinfo glxpbdemo glxpixmap
  mkdir -p $PKG/usr/bin
  cp -a src/demos/{gears,glinfo} $PKG/usr/bin
  for i in glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
      glxheads glxinfo glxpbdemo glxpixmap ; do
        cp -a src/xdemos/$i $PKG/usr/bin ;
  done
)
  
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9 $PKG/usr/info/*
fi

mkdir -p $PKG/usr/doc/Mesa-$VERSION/html
cp -a \
  docs/COPYING* docs/relnotes-${VERSION}*.html docs/README* docs/GL* \
  $PKG/usr/doc/Mesa-$VERSION
cp -a docs/*.html $PKG/usr/doc/Mesa-$VERSION/html
rm -f $PKG/usr/doc/Mesa-$VERSION/html/relnotes*.html

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
This one should be a bit more thorough for proper support.

Last edited by ReaperX7; 03-11-2014 at 10:08 PM.
 
Old 03-11-2014, 10:15 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by moisespedro View Post
If you change the tarball (to 7.3 version) running ./x11.SlackBuild driver xf86-video-ati doesn't work.
xf86-video-ati needs in version 7.3 GLAMOR to be installed, as I said. You should be able to install it using
Code:
./x11.Slackbuild driver glamor
if you use the newest Xorg source-tree.
Quote:
But I guess I can stay with the 7.2, right?
Depends on your use-case. I would recommend to use 7.3, if possible, there are bug-fixes and performance and feature improvements that may be worth it for you.
Quote:
And well I don't really know if I need dri3 nor egl. Actually, I don't even know what that means. Is it safe to disable it?
DRI is a driver interface to circumvent Xorg's rendering. Basically any hardware of the last years uses DRI2 for rendering, DRI3 is a newer version. EGL is a interface between APIs like OpenGL and the windowing system. I am not sure if you need them (I would assume that at least EGL is needed, if your XFCE complains about it missing), I have them installed.
Tis is my mesa.Slackbuild:
Code:
#!/bin/sh

# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PKGNAM=mesa
VERSION=10.1.0
DEMOVERS=8.1.0
BUILD=${BUILD:-1}

NUMJOBS=${NUMJOBS:--j8}

# Be sure this list is up-to-date:
DRI_DRIVERS="radeon,swrast"

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
       *) export ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf Mesa-${VERSION}

tar xvf $CWD/MesaLib-${VERSION}.tar.?z* || exit 1
cd Mesa-$VERSION

# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api

# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;

# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
#   git checkout origin/8.0
#   git format-patch 3d657b14b4cab98a2945904823e78cd8950944f4.. # 8.0.3 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
  for patch in $CWD/patches/*.patch ; do
    patch -p1 < $patch || exit 1 ; 
  done
fi

if [ ! -r configure ]; then
  autoreconf || exit 1
fi

# Running autogen to avoid problems if our autotools don't match upstream's:
./autogen.sh

CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --docdir=/usr/doc/mesa-$VERSION \
  --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
  --with-dri-drivers="$DRI_DRIVERS" \
  --with-gallium-drivers=r600 \
  --enable-gbm \
  --enable-gallium-gbm \
  --enable-xorg \
  --enable-glx-tls \
  --enable-gallium-llvm \
  --enable-vdpau \
  --enable-texture-float \
  --enable-shared-glapi \
  --enable-xa \
  --enable-osmesa \
  --build=$ARCH-slackware-linux

# r300 requires llvm
# Other gallium drivers:
# galahad,i915,identity,llvmpipe,noop,nv50,nvc0,nvfx,rbug,softpipe,svga,trace

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1

# Now install the demos
( cd $TMP
  rm -rf mesa-demos-$DEMOVERS
  tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1
  cd mesa-demos-$DEMOVERS
  chown -R root:root .
  find . \
    \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
    -exec chmod 755 {} \; -o \
    \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
    -exec chmod 644 {} \;  
  CFLAGS="$SLKCFLAGS" \
  ./configure \
    --prefix=/usr \
    --build=$ARCH-slackware-linux
  # Build and install gears and glinfo, as well as a few other demos
  make -C src/demos gears glinfo
  make -C src/xdemos \
    glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
    glxheads glxinfo glxpbdemo glxpixmap
  mkdir -p $PKG/usr/bin
  cp -a src/demos/{gears,glinfo} $PKG/usr/bin
  for i in glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
      glxheads glxinfo glxpbdemo glxpixmap ; do
        cp -a src/xdemos/$i $PKG/usr/bin ;
  done
)
  
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9 $PKG/usr/info/*
fi

mkdir -p $PKG/usr/doc/Mesa-$VERSION/html
cp -a \
  docs/COPYING* docs/relnotes-${VERSION}*.html docs/README* docs/GL* \
  $PKG/usr/doc/Mesa-$VERSION
cp -a docs/*.html $PKG/usr/doc/Mesa-$VERSION/html
rm -f $PKG/usr/doc/Mesa-$VERSION/html/relnotes*.html

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
 
Old 03-11-2014, 10:32 PM   #13
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,874
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You don't use the --enable-r600-llvm-compiler option?
 
Old 03-11-2014, 10:40 PM   #14
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,411
Blog Entries: 2

Rep: Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995Reputation: 3995
Quote:
Originally Posted by ReaperX7 View Post
You don't use the --enable-r600-llvm-compiler option?
Last time I checked this this was not really stable and brought, if at all, only negligible performance improvements. Has that changed?
 
Old 03-11-2014, 10:51 PM   #15
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,874
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Haven't seen anything on it other than it was a switch to force the llvm/clang compiler to build the llvm/clang driver backend by default rather than gcc and you could switch back to gcc with an export environment variable of export R600_LLVM=0. It could actually be stable now since llvm-3.4 has been out. It was introduced back in 3.3 but by now llvm/clang has matured quite well.

This was the original flag, but I think it's been removed for some time:

--enable-experimental-targets=R600

Last edited by ReaperX7; 03-11-2014 at 10:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
amd catalyst 13.12 - libGL error failed to load driver swrast Dr.Thodt Slackware 1 01-25-2014 01:35 AM
no display: Xorg, Nvidia driver broken after Etch update; Failed to load module "glx" forgox Debian 19 07-12-2010 12:26 PM
Xorg -- (EE) Failed to load module "glx" (loader failed, 7) windowsrefugeeX Linux - Software 10 09-23-2009 05:51 PM
XML load failed krishnakant Linux - General 1 05-21-2009 01:11 PM
XServer failed to load... Kieffer87 Ubuntu 2 01-16-2006 08:38 PM


All times are GMT -5. The time now is 03:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration