Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Compile 32bit radeon driver on slackware64-13.0

  1. #1
    Join Date
    Sep 2009
    Location
    Dublin
    Posts
    38

    Default Compile 32bit radeon driver on slackware64-13.0

    I have a running 64 bit xf86-video-ati for my r600 card on slackware 13
    The basic process was
    1. Update xorg-server(1.7.7), libva(0.31), libpixman(0.16.6) etc. etc. etc
    2. Compile the xf86-video-ati-6.9.0
    3. Install mesa devel-7.9 git

    Apart from backlight & suspend problems I'm good. The screen comes out of hibernate dark, adjustments to /sys/devices/virtual/backlight/acpi_video0/brightness are not permitted while X is running, despite the 0644 perms.

    I need 32 bit drivers also. I upgraded to multilib. Mesa won't compile for the lack of libdrm_radeon.so in 32 bit format, and xf86-video-ati won't configure to build 32 bit. I'm using

    ./configure --prefix=/usr --libdir=/usr/lib --host=x86_64 --build=??
    Any option fails there. Can someone give me the magic please?

  2. #2
    Join Date
    Feb 2009
    Location
    http://www.flickr.com/photos/smiteme/4170866438/
    Posts
    50

    Default

    do you know that 13.1 came out today? it should have all this already updated..

  3. #3
    Join Date
    Sep 2009
    Location
    Dublin
    Posts
    38

    Default

    Quote Originally Posted by frische View Post
    do you know that 13.1 came out today? it should have all this already updated..
    Yes I know Slackware-13.1 came out. It has a totally 64 bit system, and a totally 32 bit system. They're back a version on mesa, & libva, and what's more, I think I need to compile mesa myself anyhow with the ati video drivers installed.

    I need to be able to compile xf86-video-ati with --build=32 bits so I can recompile mesa with --enable-32-bit and come away with a 32 bit libGL.so. Slackware64-13.1 has been available as slackware64-current on ftp to me for the duration, and <I took as much as I could from it.

  4. #4
    Join Date
    May 2010
    Posts
    5

    Default

    Quote Originally Posted by business_kid View Post
    Yes I know Slackware-13.1 came out. It has a totally 64 bit system, and a totally 32 bit system. They're back a version on mesa, & libva, and what's more, I think I need to compile mesa myself anyhow with the ati video drivers installed.

    I need to be able to compile xf86-video-ati with --build=32 bits so I can recompile mesa with --enable-32-bit and come away with a 32 bit libGL.so. Slackware64-13.1 has been available as slackware64-current on ftp to me for the duration, and <I took as much as I could from it.
    I recompiled libdrm first then mesa, xf86-video-ati wont compile (and don't need to) in 32-bit.
    Using these slackbuilds i "borrowed" them from a user here on phoronix but i can't remember who is was, anyway big thanks for them!

    get-libdrm.sh
    Code:
    #!/bin/bash
    rm -rf drm
    #git clone git://anongit.freedesktop.org/mesa/drm
    git clone git://cgit.freedesktop.org/mesa/drm
    
    #cd drm
    #git checkout -t -b master origin/master
    #cd ..
    # package the source archive and clean up:
    DATE=$(date +%Y%m%d)
    #cp -R drm libdrm_${DATE}
    ( cd drm ; find . -type d -name .git -exec rm -rf {} \; 2> /dev/null )
    mv drm libdrm-${DATE}_git
    tar cjf libdrm-${DATE}_git.tar.bz2 libdrm-${DATE}_git
    rm -rf libdrm-${DATE}_git
    libdrm-compat32.Slackbuild
    Code:
    #!/bin/sh
    PKGNAM=libdrm
    VERSION=$(date +%Y%m%d)_git
    ARCH=${ARCH:-i486}       
    NUMJOBS=${NUMJOBS:-" -j2 "}
    BUILD=${BUILD:-1}          
    
    CWD=$(pwd)
    TMP=${TMP:-/tmp}
    PKG=$TMP/package-${PKGNAM}
    
    if [ "$ARCH" = "i486" ]; then
      SLKCFLAGS="-O2 -march=native -mtune=native -fPIC -pipe"
      LIBDIRSUFFIX=""                        
    elif [ "$ARCH" = "s390" ]; then          
      SLKCFLAGS="-O2"                        
      LIBDIRSUFFIX=""                        
    elif [ "$ARCH" = "x86_64" ]; then        
      SLKCFLAGS="-march=native -mtune=native -O2 -fPIC -pipe"                  
      LIBDIRSUFFIX=""                      
    fi                                       
    
    rm -rf $PKG
    mkdir -p $TMP $PKG
    cd $TMP           
    rm -rf ${PKGNAM}-${VERSION}
    tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
    cd ${PKGNAM}-$VERSION                            
    
    # 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 {} \;
    
    LIBDIRSUFFIX=""
    export CC="gcc -m32"
    export CXX="g++ -m32"
    export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH}"
    
    # Configure:
    ./autogen.sh
    
    LDFLAGS="-L/lib -L/usr/lib -L/usr/X11/lib" \
    CFLAGS="$SLKCFLAGS" \
    ./configure \
      --prefix=/usr \
      --libdir=/usr/lib${LIBDIRSUFFIX} \
      --build=i686-slackware-linux
    
    
    # Build and install:
    make $NUMJOBS || make || exit 1
    make install DESTDIR=$PKG || exit 1
    
    #cd linux-core
    #make $NUMJOBS || make || exit 1
    #make install DESTDIR=$PKG || exit 1
    #mkdir -p $PKG/lib/modules/`uname -r`/extra/
    #cp *.ko $PKG/lib/modules/`uname -r`/extra/ 
    #cd ..                                      
    
    # 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                
    
    # Compress and link manpages, if any:
    if [ -d $PKG/usr/man ]; then
      ( cd $PKG/usr/man
        for manpagedir in $(find . -type d -name "man*") ; do
          ( cd $manpagedir
            for eachpage in $( find . -type l -maxdepth 1) ; do
              ln -s $( readlink $eachpage ).gz $eachpage.gz
              rm $eachpage
            done
            gzip -9 *.?
          )
        done
      )
    fi
    
    # Compress info files, if any:
    if [ -d $PKG/usr/info ]; then
      ( cd $PKG/usr/info
        rm -f dir
        gzip -9 *
      )
    fi
    
    # Add a documentation directory:
    mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
    cp -a \
      README \
      $PKG/usr/doc/${PKGNAM}-$VERSION
    
    mkdir -p $PKG/install
    cat $CWD/slack-desc > $PKG/install/slack-desc
    
    cd $TMP/package-${PKGNAM}
    /sbin/makepkg -l y -c n $TMP/${PKGNAM}-compat32-$VERSION-$ARCH-$BUILD.txz
    
    mv $TMP/${PKGNAM}-compat32-$VERSION-$ARCH-$BUILD.txz  $CWD
    get-mesa.sh
    Code:
    #!/bin/bash
    rm -rf mesa
    git clone git://anongit.freedesktop.org/mesa/mesa
    # package the source archive and clean up:
    ( cd mesa ; find . -type d -name .git -exec rm -rf {} \; 2> /dev/null )
    DATE=$(date +%Y%m%d)
    mv mesa mesa-${DATE}_git
    tar cjf mesa-${DATE}_git.tar.bz2 mesa-${DATE}_git
    rm -rf mesa-${DATE}_git
    mesa-compat32.SlackBuild
    Code:
    #!/bin/sh
    PKGNAM=mesa
    VERSION=$(date +%Y%m%d)_git
    ARCH=${ARCH:-i486}       
    BUILD=${BUILD:-1}                                                                                                             
    NUMJOBS=${NUMJOBS:-" -j2 "}
    
    CWD=$(pwd)
    TMP=${TMP:-/tmp}
    PKG=$TMP/package-mesa
    
    if [ "$ARCH" = "i486" ]; then
      SLKCFLAGS="-O2 -march=native -mtune=native -fPIC -pipe"
      LIBDIRSUFFIX=""                        
    elif [ "$ARCH" = "x86_64" ]; then        
      SLKCFLAGS="-O2 -fPIC"                  
      LIBDIRSUFFIX=""                      
    else                                     
      SLKCFLAGS="-O2"                        
      LIBDIRSUFFIX=""                        
    fi                                       
    
    rm -rf $PKG
    mkdir -p $TMP $PKG
    cd $TMP           
    rm -rf mesa-${VERSION}
    tar xvf $CWD/mesa-${VERSION}.tar.bz2 || exit 1
    cd mesa-$VERSION                              
    
    # 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 {} \;                                                             
    
    LIBDIRSUFFIX=""
    export CC="gcc -m32"
    export CXX="g++ -m32"
    export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH}"
    
    ./autogen.sh
    LDFLAGS="-L/lib -L/usr/lib -L/usr/X11/lib" \
    CFLAGS="$SLKCFLAGS" \
    ./configure \
      --prefix=/usr \
      --sysconfdir=/etc \
      --libdir=/usr/lib${LIBDIRSUFFIX} \
      --mandir=/usr/man \
      --docdir=/usr/doc/mesa-$VERSION \
      --with-demos="" \
      --disable-gallium \
      --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
      --with-dri-drivers="r600,swrast" \
      --build=i686-slackware-linux || exit 1
    
     
    # Nobody else is enabling this.  Seems like it's asking for trouble.
    #  --enable-xcb                                                     
    
    make $NUMJOBS || make || exit 1
    make install DESTDIR=$PKG || exit 1
    
    # Install gears and glinfo manually, and make symlinks from the names
    # of the deprecated similar programs to reduce confusion:            
    mkdir -p $PKG/usr/bin/32                                                
    cp -a progs/demos/gears $PKG/usr/bin/32/gears                           
    cp -a progs/demos/glinfo $PKG/usr/bin/32/glinfo                         
    ( cd $PKG/usr/bin
      ln -sf 32/glinfo glxinfo-32
      ln -sf 32/gears glxgears-32
    )                                                                    
    
    # 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
    
    # Compress and link manpages, if any:
    if [ -d $PKG/usr/man ]; then
      ( cd $PKG/usr/man
        for manpagedir in $(find . -type d -name "man*") ; do
          ( cd $manpagedir
            for eachpage in $( find . -type l -maxdepth 1) ; do
              ln -s $( readlink $eachpage ).gz $eachpage.gz
              rm $eachpage
            done
            gzip -9 *.?
          )
        done
      )
    fi
    
    # Compress info files, if any:
    if [ -d $PKG/usr/info ]; then
      ( cd $PKG/usr/info
        rm -f dir
        gzip -9 *
      )
    fi
    
    mkdir -p $PKG/usr/doc/mesa-$VERSION/html
    cp -a COPYING docs/relnotes-$VERSION.html $PKG/usr/doc/mesa-$VERSION
    rm -f docs/relnotes*.html docs/RELNOTES*
    cp -a docs/*.html $PKG/usr/doc/mesa-$VERSION/html
    
    mkdir -p $PKG/install
    cat $CWD/slack-desc > $PKG/install/slack-desc
    
    cd $PKG
    /sbin/makepkg -l y -c n $TMP/${PKGNAM}-compat32-$VERSION-$ARCH-$BUILD.txz
    mv $TMP/${PKGNAM}-compat32-$VERSION-$ARCH-$BUILD.txz  $CWD
    You might have to modify them a bit for your system, specially the --with-dri-drivers line in mesa slackbuild

  5. #5
    Join Date
    May 2010
    Posts
    5

    Default

    This is the link to where i found the Slackbuilds i modified for multilib.

    http://www.linuxquestions.org/questi...-works-760963/

  6. #6
    Join Date
    May 2010
    Posts
    5

    Default

    This is the link to where i found the Slackbuilds i modified for multilib.

    http://www.linuxquestions.org/questi...-works-760963/

    My mistake, it wasn't on phoronix forum i found them. I lost some links in a upgrade but found it via google again.

  7. #7
    Join Date
    Sep 2009
    Location
    Dublin
    Posts
    38

    Default

    Quote Originally Posted by magge View Post
    I recompiled libdrm first then mesa, xf86-video-ati wont compile (and don't need to) in 32-bit.
    Using these slackbuilds i "borrowed" them from a user here on phoronix but i can't remember who is was, anyway big thanks for them!

    [snip Slackbuild Scripts]
    You might have to modify them a bit for your system, specially the --with-dri-drivers line in mesa slackbuild
    /Penny drops.
    Thanks very much.
    That's the key to it - a 32 bit libdrm, if that provides libdrm_radeon.so. Then mesa will move on to the next error :-/. Some of those scripts seem to be installing source as packages, but I can take the idea and run with it. I have a (paper) notebook here with pages full of weird & wonderful configure options. It seems like your scripting friend is continually updating automagically to the latest versions, which _is_ making a rod for your own back, but I suppose to hang out on phoronix you have to be up to date.

  8. #8
    Join Date
    May 2010
    Posts
    5

    Default

    Well if you just want 32 bit 3d-apps to work you could use convertpkg-compat32 (from aliens multilib packages) to convert the i686 libdrm and mesa packages from the slackware-13.1 repository. Then you can try /usr/bin/32/glinfo to see if it works. I don't think you would need the 32-bit xf86-video-ati driver since X-server usually is 64-bit pn a multilib system. Wine for example works great for me with this approach.

  9. #9
    Join Date
    Sep 2009
    Location
    Dublin
    Posts
    38

    Default

    I may try that. I was on the alien multilib site, but never noticed that. In order to get all the support libs, I was going the compile route, as if I took too many shortcuts I'd get embarrassed for libraries at some point.
    I think I just ran a mesa compile with some 32 bit options, but it defaulted to 64 bit in others, so I ended up with a 34 bit compile :-/. Mesa takes the biscuit for the longest tailspins before a compile finally dies off. I'll try again later

  10. #10
    Join Date
    Sep 2009
    Location
    Dublin
    Posts
    38

    Default

    Well, I went the compile-it route using the Slackbuild script which I did fiddle a bit. Got there after a few dependencies were added from the 32 bit Slackware-current. GE now craps out as follows:
    symbol lookup error: /usr/lib/libxcb-xlib.so.0: undefined symbol: _xcb_lock_io

    Now as far as I can tell, the slackpkg libxcb-1.6 (which is installed 32 bit and 64 bit) does not provide libxcb-xlib and I only have a 32 bit version. Of course GE is 32 bit

    Google gave me this
    http://lists.freedesktop.org/archive...il/005930.html

    Which, if I understand it correctly, means that google should not have called libxcb-xlib, and the guys writing X felt free to dump it as soon as they stopped needing it, and of course I updated X. I did try a little

    bash-3.1$ ldd /opt/google-earth/googleearth-bin |grep libxcb-xlib
    libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xf5202000)
    bash-3.1$ googleearth
    ./googleearth-bin: symbol lookup error: /usr/lib/libxcb-xlib.so.0: undefined symbol: _xcb_lock_io
    bash-3.1$ nm -D /usr/lib/libxcb-xlib.so |grep _xcb_lock_io
    U _xcb_lock_io

    bash-3.1$ readelf -s /usr/lib/libxcb-xlib.so.0 |grep _xcb_lock_io
    9: 00000000 0 FUNC GLOBAL DEFAULT UND _xcb_lock_io

    What is the U? It looks like it has the symbol to me :-o.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •