LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   care to share? (ati and compiling again) (https://www.linuxquestions.org/questions/slackware-14/care-to-share-ati-and-compiling-again-4175497737/)

moisespedro 04-07-2014 08:50 AM

I messed up with some backups here and I ended up breaking my system. I reinstalled it yesterday and I think I will give up on upgrading mesa for now. To be honest, with the stock packages the system feels faster (can't actually confirm that but anyways). I am not noticing a sluggish behaviour like I was before. I think I will let it this way.

hendrickxm 04-07-2014 09:14 AM

Quote:

Originally Posted by moisespedro (Post 5148128)
I messed up with some backups here and I ended up breaking my system. I reinstalled it yesterday and I think I will give up on upgrading mesa for now. To be honest, with the stock packages the system feels faster (can't actually confirm that but anyways). I am not noticing a sluggish behaviour like I was before. I think I will let it this way.

With the slackbuild for mesa I posted I succesfully updated to xorg-1.15. I have a nvidia gpu.

aaditya 04-07-2014 09:16 AM

Here is SlackBuild that I had used to build mesa-10.0.3 if it is of any interest..

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.0.3
DEMOVERS=8.1.0
BUILD=${BUILD:-1}

NUMJOBS=${NUMJOBS:--j3}

# Be sure this list is up-to-date:
DRI_DRIVERS="i915,i965,r200,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=${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 -march=native"
  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 \
  --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"_custom.txz


Stuferus 04-22-2014 05:26 PM

i dont have any news or new ideas for this, but i think it may be time for a push. maybe we solve it before the next release of slackware and take some work of the team? or maybe do it with the team? :)

greatings.

TobiSGD 04-22-2014 06:19 PM

I played with this a bit when I had some free time, but simply can't figure out what is going wrong here. I even tried it with a small Gentoo installation to figure out if there is maybe a regression somewhere, but on Gentoo everything compiles and works as intended. Sadly, I have no clue how Gentoo's ebuild files work, so that I can apply its build scripts to the Slackbuilds.

I am totally out of ideas here and, to be honest, currently thinking about switching my main machine to Gentoo (and learning how those ebuilds and Portage work). Portage seems to me to be sbopkg on steroids and I really like its concept.

moisespedro 04-22-2014 06:37 PM

Portage is cool, really complex but vrry nice. You gonna like Gentoo.

Stuferus 04-23-2014 04:31 AM

well ok, but i still hope the next slackware has xserver 1.15 und mesa 10.1.x - would be sweet.

ill guess this will be unsolved for ever.

moisespedro 04-23-2014 04:42 AM

By the way Tobi what happened? What went wrong?

TobiSGD 04-23-2014 09:34 AM

Quote:

Originally Posted by moisespedro (Post 5157599)
By the way Tobi what happened? What went wrong?

I am not able to compile a Mesa package in a way that it does not end up in /usr/local, which in turn seems to cause other packages to fail to compile. I just can't figure out what is wrong.

moisespedro 04-23-2014 09:40 AM

Have you tried the script aaditya posted? I am gonna do a clean Slackware install and try it once more.

TobiSGD 04-23-2014 12:43 PM

Quote:

Originally Posted by moisespedro (Post 5157741)
Have you tried the script aaditya posted?

No, in the relevant options of the configure command it is not different to mine, so I didn't try that.
Quote:

I am gonna do a clean Slackware install and try it once more.
Good luck with that.

ReaperX7 04-23-2014 01:22 PM

Did you check your account environment settings and see if there are any flags to redirect --prefix=/usr elsewhere?

moisespedro 04-23-2014 01:24 PM

I think I am giving up, it complains about a missing "dri3proto" even knowing I've set "disable-dri3" on it. I am with no mood to build dri3.

This is my mesa.SlackBuild, so far I've only build libdrm and llvm (had to put --enable-shared on llvm):

www.hastebin.com/ulovekuyen.parser3

TobiSGD 04-23-2014 01:40 PM

Quote:

Originally Posted by ReaperX7 (Post 5157905)
Did you check your account environment settings and see if there are any flags to redirect --prefix=/usr elsewhere?

Yes. This was done in a clean chroot with no additions from me and all other packages compiled just fine and into the directories they belonged in.

hendrickxm 04-23-2014 03:09 PM

Did you build llvm3.4?


All times are GMT -5. The time now is 10:43 AM.