You are not logged in.

#1 2009-03-30 03:46:54

Neo_The_User
Member
From: The Matrix
Registered: 2009-03-30
Posts: 96
Website

[SOLVED] Compiling Mesa from source on Arch (i686) and xf86-video-ati

I did a search for Mesa on the forums and I found a lot of results but I didn't dig through all 26 pages just to see if this is a duplicate thread. Sorry if this thread has been made before.

I followed these 2 guides to see if building mesa is similar to building and installing it on Xubuntu / Ubuntu 8.10+ but it definitly isn't..:

http://dri.freedesktop.org/wiki/Building
http://www.x.org/wiki/Development/git

But I still can't figure this out. When I type in cd mesa; make linux-dri-x86, I get:

make[3]: makedepend: Command not found
make[3]: *** No rule to make target `depend', needed by `default'.  Stop.
make[3]: Leaving directory `/home/neo93/mesa/src/glx/x11'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/home/neo93/mesa/src'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/home/neo93/mesa'
make: *** [linux-dri-x86] Error 2

Another thing is when I downloaded the source for xf86-video-ati via git, I did ./autogen.sh --prefix=/usr; make; sudo make install and I rebooted and everything worked fine but I don't think that driver was being used. I'm an archlinux building noob but I'd love to learn how to package everything from source as that is my favorite thing to do. I would appreciate any assistance. Any useful documentation or wikis would also be of great help. This is my first post, I might be new, but I'll learn. And this is definitley not my last post as I'd like to help others in the future as my archlinux skills increase.

Thank you so much in advance.

Last edited by Neo_The_User (2009-03-30 17:12:11)


AMD Phenom II X4 955 with Optimized Kernel
5 GB DDR2 RAM
320 GB SATA Hard Drive + 160 GB SATA Hard Drive
ATi RadeonHD 5830 GIGABYTE

Offline

#2 2009-03-30 05:25:50

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Compiling Mesa from source on Arch (i686) and xf86-video-ati

Welcome to the forums. I highly recommend that you learn about ABS (and AUR) if you like to build your own packages. It will give full control over the build process and it will allow you to use a package manager for dependency tracking and clean installation and removal. You can also see how Arch devs handled building the packages that you're having trouble with:

http://wiki.archlinux.org/index.php/ABS
http://wiki.archlinux.org/index.php/AUR

Offline

#3 2009-03-30 06:28:31

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: [SOLVED] Compiling Mesa from source on Arch (i686) and xf86-video-ati

Neo_The_User,

I ran into the exact same thing yesterday.  I got the mesa-git PKGBUILD from the AUR, and saw that it had imake as a makedepend.  I didn't believe imake was necessary, so I removed it.  I was wrong.  Please try again with imake installed.

Oh, and take skottish's advice.  If you install something from source, especially under /usr, you'll probably regret it at some point.  Packages can be removed very easily.

Offline

#4 2009-03-30 16:43:33

Neo_The_User
Member
From: The Matrix
Registered: 2009-03-30
Posts: 96
Website

Re: [SOLVED] Compiling Mesa from source on Arch (i686) and xf86-video-ati

After viewing the following website, I realized that the ABS way is made for using already pre-built packages with the PKGBUILD file already in there. Now that I know a bit more about Arch, would it be difficult to write a PKGBUILD file by slighty modifying the last PKGBUILD file that was used?

For example:

lets say I want to compile Mesa from git. I download the source, and as expected, there is no PKGBUILD file. Now what if I go into /var/abs/mesa and change the PKGBUILD file around like this and place it in the root of the mesa source from git:

# $Id: PKGBUILD 29396 2009-03-08 14:09:13Z jgc $
# Maintainer: Alexander Baldeck <alexander@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=mesa
#Changed to 7.4
pkgver=7.4
pkgrel=2
pkgdesc="Mesa OpenGL library"
#Changed to just i686
arch=(i686)
license=('LGPL')
url="http://mesa3d.sourceforge.net"
depends=('libgl' 'libx11>=1.2' 'libxt' 'gcc-libs>=4.3.3' 'dri2proto>=1.99.3' 'libdrm>=2.4.5')
makedepends=('pkgconfig' 'glproto>=1.4.9')
conflicts=('mesa-apps')
replaces=('mesa-apps')
source=(http://downloads.sourceforge.net/mesa3d/MesaLib-${pkgver}.tar.bz2
    http://downloads.sourceforge.net/mesa3d/MesaDemos-${pkgver}.tar.bz2
    ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2)
md5sums=('781e7811a6ed5c97b2b8defefc8ffbc9'
         '3f0741394069bdf2329565a387396cda'
         '6ae05158e678f4594343f32c2ca50515')

build() {
  cd "${srcdir}/Mesa-${pkgver}"
  ./configure --prefix=/usr \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-dri-drivers=swrast \
    --enable-glx-tls \
    --with-driver=dri \
    --enable-xcb \
    --disable-glut || return 1
  make || return 1
  make DESTDIR="${pkgdir}" install || return 1

  install -m755 -d "${pkgdir}/usr/bin"
  install -m755 progs/xdemos/glx{gears,info} "${pkgdir}/usr/bin/" || return 1

  rm -f "${pkgdir}/usr/lib/libGL.so"*
  rm -rf "${pkgdir}/usr/lib/xorg"

  cd "${srcdir}/gl-manpages-1.0.1"
  ./configure --prefix=/usr || return 1
  make || return 1
  make DESTDIR="${pkgdir}" install || return 1
}

With the modified PKGBUILD, if I "cd" to the root of the mesa git source and type in makepkg -s, would this work?

@peart: imake works. Thank you.

Oh and one more thing, in my 3 years of experience with Debian, I noticed the apt-get build-dep feature was really helpful. Does Arch have their own version of the apt-get build-dep command? What it does, is fetch everything that you need to get a sucessful ./configure without much missing. It really comes in handy when compiling GCC from source as there are over 100 different things you need in order to start compiling.

Thanks again for all your help.

Last edited by Neo_The_User (2009-03-30 16:47:49)


AMD Phenom II X4 955 with Optimized Kernel
5 GB DDR2 RAM
320 GB SATA Hard Drive + 160 GB SATA Hard Drive
ATi RadeonHD 5830 GIGABYTE

Offline

#5 2009-03-30 17:06:20

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Compiling Mesa from source on Arch (i686) and xf86-video-ati

Arch has a very cool mechanism for creating packages around VCS:

http://wiki.archlinux.org/index.php/Arc … guidelines

This way you can design your PKGBUILDs to do exactly what you want them to do, and have the process of downloading and maintaining the versioned file trees locally in a simple way.

Offline

#6 2009-03-30 17:10:19

Neo_The_User
Member
From: The Matrix
Registered: 2009-03-30
Posts: 96
Website

Re: [SOLVED] Compiling Mesa from source on Arch (i686) and xf86-video-ati

Thank you so much. I'll have a look into that. Have a fantastic day!

Last edited by Neo_The_User (2009-03-30 17:13:48)


AMD Phenom II X4 955 with Optimized Kernel
5 GB DDR2 RAM
320 GB SATA Hard Drive + 160 GB SATA Hard Drive
ATi RadeonHD 5830 GIGABYTE

Offline

Board footer

Powered by FluxBB