You are not logged in.
Grrr.... I am trying to get a PKGBUILD working for mozart-oz http://www.mozart-oz.org/ (oz is a programming language). I have successfully built the package by hand, however my PKGBUILD fails with the following error.
make boot-init.linked && \
/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib/p2t.sh < boot-init.linked > boot-init.ozt && \
rm -f boot-init.linked
gzip -d < /home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib/boot-ozc.ozt.gz > boot-ozc.ozt
make[4]: Entering directory `/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib'
/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib/ozc -z 9 -DSITE_PROPERTY -l Base=/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib/Base.ozf -b /home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib/ -c dp/URL.oz -o URL.ozf
make[4]: /home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib/ozc: Command not found
make[4]: *** [URL.ozf] Error 127
make[4]: Leaving directory `/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib'
make[3]: *** [boot-init.ozt] Error 2
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib'
make[2]: *** [bootstrap] Error 2
make[2]: Leaving directory `/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share/lib'
make[1]: *** [bootstrap] Error 1
make[1]: Leaving directory `/home/mbeisser/packages/mozart/src/mozart-1.3.2.20060615/share'
make: *** [bootstrap] Error 1
==> ERROR: Build Failed. Aborting...
PKGBUILD
# Contributer: Matt Beisser <beissemj(at)gmail(dot)com>
pkgname=mozart
pkgver=1.3.2.20060615
pkgrel=1.1
pkgdesc="A Compiler for the Oz Programing Language"
arch=('i686')
url="http://www.mozart-oz.org"
license=('X11 style')
depends=('bison' 'gcc' 'gmp' 'zlib' 'emacs')
install=
source=(http://www.mozart-oz.org/download/mozart-ftp/store/1.3.2-2006-06-15-tar/mozart-1.3.2.20060615-src.tar.gz
http://www.mozart-oz.org/download/mozart-ftp/store/1.3.2-2006-06-15-tar/mozart-1.3.2.20060615-std.tar.gz)
md5sums=('b84fb3932eca573e6b8d5d1b26379371'
'0daf6c873990bebdde550ec1fd70bdb6')
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr --disable-doc --with-stdlib=../$pkgname-$pkgver-std
make || return 1
install -m 755 $pkgname $startdir/pkg/usr/
}
After doing a bit of googling I found someone with a similar problem, and this is what was said. The problem is it obviously can't find ozc.
> And I checked the Makefile and Makefile.in, I found that in order to
> compile the source codes in this directory, I need an executable named
> "ozc". But the question is that in order to make this "ozc", I need "ozc"
> itself. It is just like a circle. How can I fix this problem?Here is how one normally builds mozart from sources:
- fetch the sources into directory mozart
- optionally fetch the sources of mopzart-stdlib into directory mozart-stdlib
- create a sibling directory buildcd build
../mozart/configure --with-stdlib=../mozart-stdlib
make depend #this normally optional, but essential if you hack on the sources
make
make installNow, one very important detail is that in the top directory "make"
actually invokes "make bootstrap". It is very important to remember
this distinction if you are ever tempted to invoke make manually from
a lower directory. In this case, you should always invoke "make
bootstrap" otherwise things won't work.To answer your worry: how do
we get bootstrapped if we need the compiler in order to build the
compiler? The answer is that the sources contain a checked in version
of the Oz compiler (the boot compiler) stored using the text form of
the bytecode. We use it to compile the Oz sources, including the
sources of the compiler itself, thus obtaining a fresh build of a
production compiler (this is in fact how we can update the boot
compiler too).Cheers,
--
Denys Duchier -
I understand the solution and it makes sense, I just don't understand how to make makepkg do it...
Professor: This isn't right...It isn't even wrong...
Offline
To fix the build issue, add
options=('!makeflags')
to the PKGBUILD. This package has problems building on multi-thread or multi-core cpu. This is usually the case when you get this error message:
make[3]: *** Waiting for unfinished jobs....
Offline
That did indeed fix the problem.
Looks like: MAKEFLAGS="-j2" in my makepkg.conf was the culprit.
Professor: This isn't right...It isn't even wrong...
Offline