You are not logged in.
I found that I can't use mpicc when I was writing a PKGBUILD.
It seems that the mpicc doesn't work under fakeroot.
Here is a simple PKGBUILD show how it's happened.
pkgname=Testing-openmpi-on-fakeroot
pkgver=1337
pkgrel=42
arch=('i686' 'x86_64')
makedepends=('openmpi')
build() {
mpicc --help
}
Later, I found that I couldn't even run this simple command on my machine.
fakeroot mpicc --help
Another example shows makepkg was unable to achieve coherence.
pkgbase=More_Testing_mpicc
pkgname=('Testing_mpicc_example')
pkgver=x86
pkgrel=64
arch=('i686')
makedepends=('openmpi')
build() {
mpicc --help # ok: it works.
}
package_Testing_mpicc_example() {
mpicc --help # error: called by fakeroot.
}
Won't that fail to run, or am I missing something?
Some information:
pacman 3.5.2-1
openmpi 1.5.3-2
gcc 4.6.0-3
fakeroot 1.15.1-1
Linux 2.6.38.3-1
Last edited by ytj (2011-04-24 07:11:59)
Offline
There is a way to avoid this issue. Don't put everything in build().
Split the install part to package().
Then the makepkg will enter fakeroot after build() finished.
pkgname=Final-test-openmpi-on-fakeroot
pkgver=9527
pkgrel=101010
arch=('i686' 'x86_64')
makedepends=('openmpi')
build() {
mpicc --help # ok: now this works.
}
package() {
mkdir $pkgdir/tmp
# Install something.
}
Offline
I can confirm this fixes the problem.
Thanks ytj, you just saved me a lot of headache!
Offline