Official NuTyX forums

Help => Tips and Tricks => Topic started by: bci_ on Tue May 05 13:47:08 2020

Title: Creating a new package: gforth
Post by: bci_ on Tue May 05 13:47:08 2020
I'm working on installing a custom package, gforth https://www.gnu.org/software/gforth/ (https://www.gnu.org/software/gforth/)

I'm using this package file:

Code: [Select]
name=gforth
version=0.7.3
release=1
source=(https://ftp.gnu.org/gnu/${name}/${name}-${version}.tar.gz)

build() {
cd ${name}-${version}
./configure
make
make DESTDIR=$PKG install
}
I've made the directory /usr/ports/perso/gforth, and invoke

Code: [Select]
sudo pkgmk -d
Everything works smooth, but at one point I get
Code: [Select]
make[3]: Leaving directory '/usr/ports/perso/gforth/work/src/gforth-0.7.3'
make[2]: Leaving directory '/usr/ports/perso/gforth/work/src/gforth-0.7.3'
make[1]: Leaving directory '/usr/ports/perso/gforth/work/src/gforth-0.7.3'
=======> ERROR: Building '/usr/ports/perso/gforth/gforth1588685885x86_64.cards.tar.xz' failed.

To check my work, I went ahead and installed the application  normally (not as a package). The installation went through smoothly (so I know it's not a problem with the application itself), and then, for kicks, I went ahead and attempted to complete the package installation - and it worked! I was then able to add the package and have it on my system. However, to make sure my package formula was correct, I uninstalled the package, and got rid of the conventional installation. That is, no more 'gforth' files on my system, except the Pkgfile in gforth's ports folder.

I reattempt the install, and I get this error. When I had succeeded in installing the package, I did, in fact, get that tar.xz file, and was able to use it to fully install the package.
Title: Re: Creating a new package: gforth
Post by: Thierry on Wed May 06 09:51:52 2020
Your output:
Code: [Select]
=======> ERROR: Building '/usr/ports/perso/gforth/gforth1588685885x86_64.cards.tar.xz' failed.is the result of the compilation error.
As the package is  simple, I went to check if ArchLinux had it in they AUR.

Package is committed. I just add what was missing in your recept. (https://github.com/NuTyX/packages-x86_64/commit/b24d49f235af09395dbc926a5f42d0c9b67858c8)

Title: Re: Creating a new package: gforth
Post by: bci_ on Thu May 07 01:33:23 2020
Thanks. It's interesting to see what the necessary modifications turned out to be. Maybe it'll help in the building of future
packages.  :)

Also, being able to check build recipes in the AUR is a neat trick.